Beispiel #1
0
                    static bool HandleWriteBodyContents(IAsyncResult result)
                    {
                        WriteBodyContentsAsyncResult thisPtr = (WriteBodyContentsAsyncResult)result.AsyncState;

                        thisPtr.writer.WriteEndElement();
                        return(true);
                    }
Beispiel #2
0
                    static bool HandleWriteBodyContents(IAsyncResult result)
                    {
                        // If result is a task, we need to get the result so that exceptions are bubbled up in case the task is faulted.
                        Task t = result as Task;

                        if (t != null)
                        {
                            t.GetAwaiter().GetResult();
                        }

                        WriteBodyContentsAsyncResult thisPtr = (WriteBodyContentsAsyncResult)result.AsyncState;

                        thisPtr.writer.WriteEndElement();
                        return(true);
                    }
Beispiel #3
0
 protected override void OnEndWriteBodyContents(IAsyncResult result)
 {
     WriteBodyContentsAsyncResult.End(result);
 }