示例#1
0
 public override void Close()
 {
     lock (this.ThisLock)
     {
         if (!this.closed)
         {
             this.closed     = true;
             this.bodyWriter = null;
             this.headers    = null;
             this.properties = null;
         }
     }
 }
 public override void Close()
 {
     lock (this.ThisLock)
     {
         if (!this.closed)
         {
             this.closed = true;
             this.bodyWriter = null;
             this.headers = null;
             this.properties = null;
         }
     }
 }
示例#3
0
 protected override MessageBuffer OnCreateBufferedCopy(int maxBufferSize)
 {
     System.ServiceModel.Channels.BodyWriter bodyWriter;
     if (this.bodyWriter.IsBuffered)
     {
         bodyWriter = this.bodyWriter;
     }
     else
     {
         bodyWriter = this.bodyWriter.CreateBufferedCopy(maxBufferSize);
     }
     KeyValuePair <string, object>[] array = new KeyValuePair <string, object> [this.Properties.Count];
     ((ICollection <KeyValuePair <string, object> >) this.Properties).CopyTo(array, 0);
     return(new BodyWriterMessageBuffer(this.headers, array, bodyWriter));
 }
示例#4
0
        protected override void OnClose()
        {
            Exception exception = null;

            try
            {
                base.OnClose();
            }
            catch (Exception exception2)
            {
                if (Fx.IsFatal(exception2))
                {
                    throw;
                }
                exception = exception2;
            }
            try
            {
                if (this.properties != null)
                {
                    this.properties.Dispose();
                }
            }
            catch (Exception exception3)
            {
                if (Fx.IsFatal(exception3))
                {
                    throw;
                }
                if (exception == null)
                {
                    exception = exception3;
                }
            }
            if (exception != null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(exception);
            }
            this.bodyWriter = null;
        }
 public BodyWriterMessageBuffer(MessageHeaders headers, KeyValuePair<string, object>[] properties, System.ServiceModel.Channels.BodyWriter bodyWriter)
 {
     this.bodyWriter = bodyWriter;
     this.headers = new MessageHeaders(headers);
     this.properties = properties;
 }
 protected override MessageBuffer OnCreateBufferedCopy(int maxBufferSize)
 {
     System.ServiceModel.Channels.BodyWriter bodyWriter;
     if (this.bodyWriter.IsBuffered)
     {
         bodyWriter = this.bodyWriter;
     }
     else
     {
         bodyWriter = this.bodyWriter.CreateBufferedCopy(maxBufferSize);
     }
     KeyValuePair<string, object>[] array = new KeyValuePair<string, object>[this.Properties.Count];
     ((ICollection<KeyValuePair<string, object>>) this.Properties).CopyTo(array, 0);
     return new BodyWriterMessageBuffer(this.headers, array, bodyWriter);
 }
 protected override void OnClose()
 {
     Exception exception = null;
     try
     {
         base.OnClose();
     }
     catch (Exception exception2)
     {
         if (Fx.IsFatal(exception2))
         {
             throw;
         }
         exception = exception2;
     }
     try
     {
         if (this.properties != null)
         {
             this.properties.Dispose();
         }
     }
     catch (Exception exception3)
     {
         if (Fx.IsFatal(exception3))
         {
             throw;
         }
         if (exception == null)
         {
             exception = exception3;
         }
     }
     if (exception != null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(exception);
     }
     this.bodyWriter = null;
 }
 private BodyWriterMessage(System.ServiceModel.Channels.BodyWriter bodyWriter)
 {
     this.bodyWriter = bodyWriter;
 }
示例#9
0
 public BodyWriterMessageBuffer(MessageHeaders headers, KeyValuePair <string, object>[] properties, System.ServiceModel.Channels.BodyWriter bodyWriter)
 {
     this.bodyWriter = bodyWriter;
     this.headers    = new MessageHeaders(headers);
     this.properties = properties;
 }
示例#10
0
 public BodyWriterMessage(MessageVersion version, string action, System.ServiceModel.Channels.BodyWriter bodyWriter) : this(bodyWriter)
 {
     this.headers        = new MessageHeaders(version);
     this.headers.Action = action;
 }
示例#11
0
 public BodyWriterMessage(MessageVersion version, ActionHeader actionHeader, System.ServiceModel.Channels.BodyWriter bodyWriter) : this(bodyWriter)
 {
     this.headers = new MessageHeaders(version);
     this.headers.SetActionHeader(actionHeader);
 }
示例#12
0
 public BodyWriterMessage(MessageHeaders headers, KeyValuePair <string, object>[] properties, System.ServiceModel.Channels.BodyWriter bodyWriter) : this(bodyWriter)
 {
     this.headers    = new MessageHeaders(headers);
     this.properties = new MessageProperties(properties);
 }
示例#13
0
 private BodyWriterMessage(System.ServiceModel.Channels.BodyWriter bodyWriter)
 {
     this.bodyWriter = bodyWriter;
 }