public DecodeFailedUpgradeAsyncResult(ClientFramingDecoder decoder, IConnection connection, Uri via, string contentType, ref TimeoutHelper timeoutHelper, AsyncCallback callback, object state) : base(callback, state) { ConnectionUpgradeHelper.ValidateReadingFaultString(decoder); this.decoder = decoder; this.connection = connection; this.via = via; this.contentType = contentType; this.timeoutHelper = timeoutHelper; if (connection.BeginRead(0, Math.Min(0x100, connection.AsyncReadBufferSize), timeoutHelper.RemainingTime(), onReadFaultData, this) != AsyncReadResult.Queued) { this.CompleteReadFaultData(); } }