示例#1
0
            protected override MessageBuffer OnCreateBufferedCopy(int maxBufferSize)
            {
                BodyWriter bufferedBodyWriter;

                if (BodyWriter.IsBuffered)
                {
                    bufferedBodyWriter = BodyWriter;
                }
                else
                {
                    bufferedBodyWriter = BodyWriter.CreateBufferedCopy(maxBufferSize);
                }
                KeyValuePair <string, object>[] properties = new KeyValuePair <string, object> [base.Properties.Count];
                ((ICollection <KeyValuePair <string, object> >)base.Properties).CopyTo(properties, 0);
                return(new OperationFormatterMessageBuffer(base.Headers, properties, bufferedBodyWriter));
            }