Пример #1
0
        public async Task OpenAsync()
        {
            Log.Information("Opened ModuleClient");
            TaskTimer.Start();

            await Task.FromResult(0);
        }
Пример #2
0
        public MockModuleClientProxy(CancellationTokenSource cancellationTokenSource)
        {
            CancellationTokenSource = cancellationTokenSource;

            MessageQueues         = new Dictionary <string, List <Message> >();
            InputMessageHandlers  = new Dictionary <string, (MessageHandler, object)>();
            MethodMessageHandlers = new Dictionary <string, MethodCallback>();
            TaskTimer             = new TaskTimer(OnTimer,
                                                  TimeSpan.FromSeconds(1),
                                                  CancellationTokenSource);
        }