void OnFieldsChanged(object sender, HeaderListChangedEventArgs e) { var stream = new MemoryBlockStream(); var options = FormatOptions.Default; fields.WriteTo(options, stream); stream.Position = 0; ContentObject = new ContentObject(stream); }
void OnFieldsChanged(object sender, HeaderListChangedEventArgs e) { var options = FormatOptions.GetDefault(); var stream = new MemoryBlockStream(); fields.WriteTo(options, stream); stream.Write(options.NewLineBytes, 0, options.NewLineBytes.Length); stream.Position = 0; ContentObject = new ContentObject(stream); }