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); }
public MiCommunicationFactory(IMiTransport transport, IResponsesParser parser) { _transport = transport; _parser = parser; }