/// <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);
}
}