| Index: third_party/grpc/src/csharp/Grpc.Core/IAsyncStreamWriter.cs
|
| diff --git a/third_party/protobuf/csharp/src/Google.Protobuf/IDeepCloneable.cs b/third_party/grpc/src/csharp/Grpc.Core/IAsyncStreamWriter.cs
|
| similarity index 66%
|
| copy from third_party/protobuf/csharp/src/Google.Protobuf/IDeepCloneable.cs
|
| copy to third_party/grpc/src/csharp/Grpc.Core/IAsyncStreamWriter.cs
|
| index c9c71bbe2c013465f3375cbc26f2c301bf67824d..9c0d2d312ebde149c9ee82d019c60cf1f6ec3a89 100644
|
| --- a/third_party/protobuf/csharp/src/Google.Protobuf/IDeepCloneable.cs
|
| +++ b/third_party/grpc/src/csharp/Grpc.Core/IAsyncStreamWriter.cs
|
| @@ -1,7 +1,7 @@
|
| #region Copyright notice and license
|
| -// Protocol Buffers - Google's data interchange format
|
| -// Copyright 2015 Google Inc. All rights reserved.
|
| -// https://developers.google.com/protocol-buffers/
|
| +
|
| +// Copyright 2015, Google Inc.
|
| +// All rights reserved.
|
| //
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| @@ -28,27 +28,35 @@
|
| // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| +
|
| #endregion
|
|
|
| -namespace Google.Protobuf
|
| +using System;
|
| +using System.Collections.Generic;
|
| +using System.Linq;
|
| +using System.Text;
|
| +using System.Threading.Tasks;
|
| +
|
| +namespace Grpc.Core
|
| {
|
| /// <summary>
|
| - /// Generic interface for a deeply cloneable type.
|
| + /// A writable stream of messages.
|
| /// </summary>
|
| - /// <remarks>
|
| - /// <para>
|
| - /// All generated messages implement this interface, but so do some non-message types.
|
| - /// Additionally, due to the type constraint on <c>T</c> in <see cref="IMessage{T}"/>,
|
| - /// it is simpler to keep this as a separate interface.
|
| - /// </para>
|
| - /// </remarks>
|
| - /// <typeparam name="T">The type itself, returned by the <see cref="Clone"/> method.</typeparam>
|
| - public interface IDeepCloneable<T>
|
| + /// <typeparam name="T">The message type.</typeparam>
|
| + public interface IAsyncStreamWriter<T>
|
| {
|
| /// <summary>
|
| - /// Creates a deep clone of this object.
|
| + /// Writes a single asynchronously. Only one write can be pending at a time.
|
| + /// </summary>
|
| + /// <param name="message">the message to be written. Cannot be null.</param>
|
| + Task WriteAsync(T message);
|
| +
|
| + /// <summary>
|
| + /// Write options that will be used for the next write.
|
| + /// If null, default options will be used.
|
| + /// Once set, this property maintains its value across subsequent
|
| + /// writes.
|
| /// </summary>
|
| - /// <returns>A deep clone of this object.</returns>
|
| - T Clone();
|
| + WriteOptions WriteOptions { get; set; }
|
| }
|
| }
|
|
|