/// <summary> /// Instantiate a new client /// </summary> /// <param name="path">The path the client was registered at</param> /// <returns>The instantiated WebSocketClient</returns> public WebSocketConnection Create(string path) { if (types.ContainsKey(path)) { try { var ws = container.Resolve(types[path]); var wsc = new WebSocketConnection(new WebSocketWrapper(ws)); var sws = (ASendingWebSocket)ws; sws.Connection = wsc; return(wsc); } catch { return(null); } } else { return(null); } }