示例#1
0
 public MiCommunication(IMiTransport transport, IResponsesParser parser, Func <ICommandResponse, Task> responseHandler, IKeyGenerator keyGenerator)
 {
     _transport       = transport;
     _parser          = parser;
     _responseHandler = responseHandler;
     _keyGenerator    = keyGenerator;
     Task.Run(() => ListenForResponses(_cts.Token), _cts.Token);
 }
示例#2
0
 public MiCommunicationFactory(IMiTransport transport, IResponsesParser parser)
 {
     _transport = transport;
     _parser    = parser;
 }