System.Net.CommandStream.MarkAsRecoverableFailure C# (CSharp) Method

MarkAsRecoverableFailure() protected method

protected MarkAsRecoverableFailure ( ) : void
return void
        protected void MarkAsRecoverableFailure()
        {
            if (_index <= 1)
            {
                _recoverableFailure = true;
            }
        }

Usage Example

Beispiel #1
0
        /// <summary>
        ///    <para>Provides a wrapper for the async write operations</para>
        /// </summary>
        private static void WriteCallback(IAsyncResult asyncResult)
        {
            CommandStream connection = (CommandStream)asyncResult.AsyncState;

            try {
                try {
                    connection.EndWrite(asyncResult);
                }
                catch (IOException) {
                    connection.MarkAsRecoverableFailure();
                    throw;
                }
                catch {
                    throw;
                }
                Stream stream = null;
                if (connection.PostSendCommandProcessing(ref stream))
                {
                    return;
                }
                connection.ContinueCommandPipeline();
            } catch (Exception e) {
                connection.Abort(e);
            }
        }
All Usage Examples Of System.Net.CommandStream::MarkAsRecoverableFailure