- How to get it running
- Data Types
- Using it in a development environment
- Using it in a production environment
- Generic vs Non-Generic
Disable-UAC | |
Set-ExplorerOptions -showHiddenFilesFoldersDrives | |
Enable-RemoteDesktop | |
Set-TaskbarSmall | |
cinst VisualStudio2013Ultimate | |
cinst Fiddler | |
cinst SublimeText2 | |
cinst kdiff3 | |
cinst Dropbox |
/* | |
Sometimes you need to just update something and assure that it happens | |
*/ | |
public static class GenericReplaceLock | |
{ | |
public static void UpdateListItem<T>(this IRedisClientsManager Manager, string key, T old, T newer) | |
{ | |
using (var Client = Manager.GetClient()) | |
using (var redis = Client.As<T>()) | |
using (var transaction = redis.CreateTransaction()) |
public static TResult Retry(this IRedisClient client, Func<TResult> Retry) | |
{ | |
try | |
{ | |
return (TResult)Retry.Invoke(); | |
} | |
catch(RedisException RedisException) | |
{ | |
//Do Something Here To Wait | |
return (TResult)Retry.Invoke(); |
var oldUser = User; | |
User.UserStatus = (UserStatuses)Status; | |
var newUser = User; | |
using(var client = ClientManager.GetClient()) | |
{ | |
client.Replace<UserModel>(UsersKey, oldUser, newUser); | |
} | |
return User; |
/* | |
Sometimes you need to just udpate something and assure that it happens | |
*/ | |
public static class GenericReplaceLock | |
{ | |
public static void Replace<T>(this IRedisClient Client, string key, T old, T newer) | |
{ | |
using (var redis = Client.As<T>()) | |
using (var transaction = redis.CreateTransaction()) | |
{ |
/// <summary> | |
/// Joins the chat. | |
/// </summary> | |
/// <param name="UserName">Name of the user.</param> | |
/// <param name="authguid">The authguid.</param> | |
/// <exception cref="System.Exception"> | |
/// Unable to find user | |
/// or | |
/// Unable to authorize user | |
/// </exception> |
public async void CheckForRooms() | |
{ | |
var getRooms = new Task<IList<RoomModel>>(() => { return _roomRepo.Rooms(); }); | |
var Rooms = await getRooms; | |
var emptyRooms = new List<RoomModel>(); | |
foreach (var room in Rooms) | |
{ | |
if (_userRoomRepo.GetUsersForRoom(room.RoomName).Any()) | |
{ | |
emptyRooms.Add(room); |
using Microsoft.AspNet.SignalR; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
namespace noproxySignalR | |
{ | |
//This is the code required for the hub |
//This is the code required for the hub | |
public class TestHub :Hub | |
{ | |
public void joinGroup() | |
{ | |
Groups.Add(Context.ConnectionId, "base"); | |
} | |
public void Send() |