/// <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); } }
private static void WriteCallback(IAsyncResult asyncResult) { CommandStream asyncState = (CommandStream)asyncResult.AsyncState; try { try { asyncState.EndWrite(asyncResult); } catch (IOException) { asyncState.MarkAsRecoverableFailure(); throw; } catch { throw; } Stream stream = null; if (!asyncState.PostSendCommandProcessing(ref stream)) { asyncState.ContinueCommandPipeline(); } } catch (Exception exception) { asyncState.Abort(exception); } }