#region Copyright notice and license // Copyright 2015-2016 gRPC authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #endregion using System; namespace Grpc.Core { /// /// Flags for write operations. /// [Flags] public enum WriteFlags { /// /// Hint that the write may be buffered and need not go out on the wire immediately. /// gRPC is free to buffer the message until the next non-buffered /// write, or until write stream completion, but it need not buffer completely or at all. /// BufferHint = 0x1, /// /// Force compression to be disabled for a particular write. /// NoCompress = 0x2 } /// /// Options for write operations. /// public class WriteOptions { /// /// Default write options. /// public static readonly WriteOptions Default = new WriteOptions(); private readonly WriteFlags flags; /// /// Initializes a new instance of WriteOptions class. /// /// The write flags. public WriteOptions(WriteFlags flags = default(WriteFlags)) { this.flags = flags; } /// /// Gets the write flags. /// public WriteFlags Flags { get { return this.flags; } } } }