Beispiel #1
0
 public WebSocketManagerTests()
 {
     manager    = new WebSocketManager();
     socket     = new Mock <WebSocket>();
     connection = new Mock <Connection>();
     connection.Object.Socket = socket.Object;
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WebSocketService"/> class.
 /// </summary>
 /// <param name="webSocketManager">The web socket manager.</param>
 /// <param name="serializer">The serializer.</param>
 /// <param name="context">The request context.</param>
 public WebSocketService(WebSocketManager webSocketManager, WebSocketViewModelSerializer serializer,
                         IDotvvmRequestContext context)
 {
     WebSocketManager = webSocketManager;
     Serializer       = serializer;
     Context          = context;
     webSocketManager.WebSocketPaths.TryGetValue(GetType(), out var socketPath);
     Path = socketPath.Value;
 }