public override void Close() { lock (this.ThisLock) { if (!this.closed) { this.closed = true; this.bodyWriter = null; this.headers = null; this.properties = null; } } }
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; }
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); }
private BodyWriterMessage(System.ServiceModel.Channels.BodyWriter bodyWriter) { this.bodyWriter = bodyWriter; }
public BodyWriterMessageBuffer(MessageHeaders headers, KeyValuePair <string, object>[] properties, System.ServiceModel.Channels.BodyWriter bodyWriter) { this.bodyWriter = bodyWriter; this.headers = new MessageHeaders(headers); this.properties = properties; }
public BodyWriterMessage(MessageVersion version, string action, System.ServiceModel.Channels.BodyWriter bodyWriter) : this(bodyWriter) { this.headers = new MessageHeaders(version); this.headers.Action = action; }
public BodyWriterMessage(MessageVersion version, ActionHeader actionHeader, System.ServiceModel.Channels.BodyWriter bodyWriter) : this(bodyWriter) { this.headers = new MessageHeaders(version); this.headers.SetActionHeader(actionHeader); }
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); }