private InProcServerTransportController(InProcServerTransportManager transportManager, bool ownsTransportManager) { this._transportManager = transportManager; this._transport = transportManager.NewSession(); this._transportManager.Response += this.OnTransportResponse; this._ownsTransportManager = ownsTransportManager; }
/// <summary> /// Initializes a new instance of the <see cref="InProcServerTransport"/> class. /// </summary> /// <param name="manager">The manager which will manage this instance.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="manager"/> is <c>null</c>. /// </exception> public InProcServerTransport(InProcServerTransportManager manager) : base(manager) { this._manager = manager; this._inboundQueue = new BlockingCollection <byte[]>(); this._pendingPackets = new ConcurrentQueue <InProcPacket>(); manager.Response += this.OnManagerResponse; this._cancellationTokenSource = new CancellationTokenSource(); this._receivingCancellationTokenSource = CancellationTokenSource.CreateLinkedTokenSource(manager.CancellationToken, this._cancellationTokenSource.Token); }
private static InProcServerTransportController Create(InProcServerTransportManager asInProcServerTransportManager, bool ownsTransportManager) { return(new InProcServerTransportController(asInProcServerTransportManager, ownsTransportManager)); }