public ReceiveAsyncResult( CompactSignatureSecurityDuplexChannel channel, TimeSpan timeout, AsyncCallback callback, object state) : base(channel, timeout, callback, state) { }
public ReceiveAsyncResultBase( CompactSignatureSecurityDuplexChannel channel, TimeSpan timeout, AsyncCallback callback, object state) : base(callback, state) { this.Timeout = timeout; this.Channel = channel; IAsyncResult result = this.BeginReceive(); if (result.CompletedSynchronously) { this.HandleReceiveComplete(result); } }
IDuplexChannel WrapChannel(IDuplexChannel innerChannel) { if (innerChannel == null) { return(null); } if (typeof(IDuplexChannel) == typeof(IDuplexChannel)) { CompactSignatureSecurityDuplexChannel channel = new CompactSignatureSecurityDuplexChannel( this, (IDuplexChannel)innerChannel, this.discoveryVersion, this.signingCertificate, this.receivedCertificatesStoreSettings); return((IDuplexChannel)(object)channel); } // Can't wrap this channel throw new ArgumentException("Unexpected channel type: only IDuplexChannel channel types are expected."); }