Ejemplo n.º 1
0
        public static LocalInsider CreateInsider(this ILocalInsiderConfiguration configuration)
        {
            var uiStreamingServer   = configuration.CreateUIStreamingServer();
            var uiStreamingProtocol = configuration.CreateUIStreamingProtocol();
            var uiWebServer         = configuration.CreateUIWebServer();

            return(new LocalInsider(uiStreamingServer, uiStreamingProtocol, uiWebServer));
        }
Ejemplo n.º 2
0
        public static ILocalInsiderConfiguration ConfigureDefault(this ILocalInsiderConfiguration configuration)
        {
            var messagesQueue = new ConcurrentQueue <byte[]>();

            return(configuration
                   .UseJsonRpcUIStreamingProtocol(messagesQueue)
                   .UseWebSocketUIStreamingServer(new HttpListenerWebSocketUIStreamingServerSettings(), messagesQueue)
                   .UseHttpUIWebServer(new HttpListenerUIWebServerSettings()));
        }
Ejemplo n.º 3
0
 public static ILocalInsiderConfiguration UseHttpUIWebServer(this ILocalInsiderConfiguration configuration, IHttpListenerUIWebServerSettings settings) => configuration
 .UseUIWebServer(create: () => new HttpListenerUIWebServer(settings));
Ejemplo n.º 4
0
 public static ILocalInsiderConfiguration UseJsonRpcUIStreamingProtocol(this ILocalInsiderConfiguration configuration, ConcurrentQueue <byte[]> messagesQueue) => configuration
 .UseUIStreamingProtocol(create: () => new JsonRpcUIStreamingProtocol(messagesQueue));
Ejemplo n.º 5
0
 public static ILocalInsiderConfiguration UseWebSocketUIStreamingServer(this ILocalInsiderConfiguration configuration, IHttpListenerWebSocketUIStreamingServerSettings settings, ConcurrentQueue <byte[]> messagesQueue) => configuration
 .UseUIStreamingServer(create: () => new HttpListenerWebSocketUIStreamingServer(settings, messagesQueue));
Ejemplo n.º 6
0
 public static ILocalInsiderConfiguration UseDummyUIWebServer(this ILocalInsiderConfiguration configuration) => configuration
 .UseUIWebServer(create: () => new DummyUIWebServer());
Ejemplo n.º 7
0
 public static ILocalInsiderConfiguration UseDummyUIStreamingProtocol(this ILocalInsiderConfiguration configuration) => configuration
 .UseUIStreamingProtocol(create: () => new DummyUIStreamingProtocol());
Ejemplo n.º 8
0
 public static ILocalInsiderConfiguration UseUIWebServer(this ILocalInsiderConfiguration configuration, Func <IUIWebServer> create)
 {
     configuration.CreateUIWebServer = create;
     return(configuration);
 }
Ejemplo n.º 9
0
 public static ILocalInsiderConfiguration UseUIStreamingProtocol(this ILocalInsiderConfiguration configuration, Func <IUIStreamingProtocol> create)
 {
     configuration.CreateUIStreamingProtocol = create;
     return(configuration);
 }