private VideoHub(string streamId, string homeHubId, string nodeName) { _streamId = streamId; _nodeName = nodeName; _refCount = 0; _chatHub = ChatHub.Get(homeHubId); }
public UserAppSocket(WebSocket socket, ApiServices services, string homeHubId, string userEmail) : base(socket, services) { Debug.WriteLine("UserApp Conection opened"); _userEmail = userEmail; _chatHub = ChatHub.Get(homeHubId); _chatHub.ClientMessage += _chatHub_ClientMessage; _checkInOutMonitor = CheckInOutMonitor.Create(homeHubId); _checkInOutMonitor.CheckInOut += _checkInOutMonitor_CheckInOut; ; SendInitialStates(homeHubId); SendInitialConnectionStatus(); SendInitialUserInOut(); }
public static ChatHub Get(string homeHubId) { lock (_instances) { ChatHub chatHub = null; if (_instances.ContainsKey(homeHubId)) { chatHub = _instances[homeHubId]; } else { chatHub = new ChatHub(homeHubId); _instances[homeHubId] = chatHub; } chatHub.AddRef(); return chatHub; } }
protected CameraActivator(string hub, string node) { _chatHub = ChatHub.Get(hub); _hub = hub; _node = node; _chatHub.MessageToHome(new HubCameraCommand { Node = _node, Active = true, Type = "timelapse" }); }