public IntercomClientChannel(string pipeName) { _serviceStream = new NamedPipeServerStream(pipeName, PipeDirection.InOut); _formatter = new BinaryFormatter(); _typeInfoProvider = new TypeInfoProvider(typeof(T)); }
public IntercomServerChannel(T service, string pipeName, bool reconnectable = false) { _pipeName = pipeName; _service = service; _reconnectable = reconnectable; _typeInfoProvider = new TypeInfoProvider(service); _formatter = new BinaryFormatter(); _cancellationTokenSource = new CancellationTokenSource(); _cycleTask = ConnectAsync(_cancellationTokenSource.Token); }