Esempio n. 1
0
        public Customizer(IConfiguration configuration, CommandQueues cq)
        {
            commandQueue = cq;
            var customizerConfiguration = configuration.GetSection("Customizer");

            PayloadTemplateDir = customizerConfiguration.GetValue(nameof(PayloadTemplateDir), defaultPayloadTemplateDir);
            PatchBufferSize    = customizerConfiguration.GetValue(nameof(PatchBufferSize), defaultPatchBufferSize);
            UseDebugBinaries   = customizerConfiguration.GetValue(nameof(UseDebugBinaries), false);
        }
Esempio n. 2
0
 public GatewayConnectionHandler(MessageFramingTcpClient client, IServiceProvider services, CancellationToken ct)
 {
     tcpClient     = client;
     Services      = services;
     commandQueues = services.GetRequiredService <CommandQueues>();
     selfCTS       = new CancellationTokenSource();
     anyCTS        = CancellationTokenSource.CreateLinkedTokenSource(selfCTS.Token, ct);
     ReceivingTask = StartReceivingTask();
     // Sending task is started after correctly receiving first message
 }