コード例 #1
0
 private void WritePendingMessageData(bool reportMessageCompleted)
 {
     if (this.CurrentOperationMessage != null)
     {
         if (this.CurrentOperationResponseMessage != null)
         {
             int    statusCode    = this.CurrentOperationResponseMessage.StatusCode;
             string statusMessage = HttpUtils.GetStatusMessage(statusCode);
             this.rawOutputContext.TextWriter.WriteLine("{0} {1} {2}", "HTTP/1.1", statusCode, statusMessage);
         }
         bool   flag      = (this.CurrentOperationRequestMessage != null) && (this.changeSetBoundary != null);
         string contentId = null;
         IEnumerable <KeyValuePair <string, string> > headers = this.CurrentOperationMessage.Headers;
         if (headers != null)
         {
             foreach (KeyValuePair <string, string> pair in headers)
             {
                 string key  = pair.Key;
                 string str4 = pair.Value;
                 this.rawOutputContext.TextWriter.WriteLine(string.Format(CultureInfo.InvariantCulture, "{0}: {1}", new object[] { key, str4 }));
                 if (flag && (string.CompareOrdinal("Content-ID", key) == 0))
                 {
                     contentId = str4;
                 }
             }
         }
         if (flag)
         {
             this.RememberContentIdHeader(contentId);
         }
         this.rawOutputContext.TextWriter.WriteLine();
         if (reportMessageCompleted)
         {
             this.CurrentOperationMessage.PartHeaderProcessingCompleted();
             this.CurrentOperationRequestMessage  = null;
             this.CurrentOperationResponseMessage = null;
         }
     }
 }