make unneeded API internal-only, update docs

pull/3051/head
Jan Tattermusch 9 years ago
parent 99d376147e
commit f637573b95
  1. 2
      src/csharp/Grpc.Core/AsyncClientStreamingCall.cs
  2. 2
      src/csharp/Grpc.Core/AsyncDuplexStreamingCall.cs
  3. 2
      src/csharp/Grpc.Core/AsyncServerStreamingCall.cs
  4. 2
      src/csharp/Grpc.Core/AsyncUnaryCall.cs
  5. 12
      src/csharp/Grpc.Core/Metadata.cs

@ -49,7 +49,7 @@ namespace Grpc.Core
readonly Func<Metadata> getTrailersFunc; readonly Func<Metadata> getTrailersFunc;
readonly Action disposeAction; readonly Action disposeAction;
public AsyncClientStreamingCall(IClientStreamWriter<TRequest> requestStream, Task<TResponse> responseAsync, Task<Metadata> responseHeadersAsync, Func<Status> getStatusFunc, Func<Metadata> getTrailersFunc, Action disposeAction) internal AsyncClientStreamingCall(IClientStreamWriter<TRequest> requestStream, Task<TResponse> responseAsync, Task<Metadata> responseHeadersAsync, Func<Status> getStatusFunc, Func<Metadata> getTrailersFunc, Action disposeAction)
{ {
this.requestStream = requestStream; this.requestStream = requestStream;
this.responseAsync = responseAsync; this.responseAsync = responseAsync;

@ -48,7 +48,7 @@ namespace Grpc.Core
readonly Func<Metadata> getTrailersFunc; readonly Func<Metadata> getTrailersFunc;
readonly Action disposeAction; readonly Action disposeAction;
public AsyncDuplexStreamingCall(IClientStreamWriter<TRequest> requestStream, IAsyncStreamReader<TResponse> responseStream, Task<Metadata> responseHeadersAsync, Func<Status> getStatusFunc, Func<Metadata> getTrailersFunc, Action disposeAction) internal AsyncDuplexStreamingCall(IClientStreamWriter<TRequest> requestStream, IAsyncStreamReader<TResponse> responseStream, Task<Metadata> responseHeadersAsync, Func<Status> getStatusFunc, Func<Metadata> getTrailersFunc, Action disposeAction)
{ {
this.requestStream = requestStream; this.requestStream = requestStream;
this.responseStream = responseStream; this.responseStream = responseStream;

@ -47,7 +47,7 @@ namespace Grpc.Core
readonly Func<Metadata> getTrailersFunc; readonly Func<Metadata> getTrailersFunc;
readonly Action disposeAction; readonly Action disposeAction;
public AsyncServerStreamingCall(IAsyncStreamReader<TResponse> responseStream, Task<Metadata> responseHeadersAsync, Func<Status> getStatusFunc, Func<Metadata> getTrailersFunc, Action disposeAction) internal AsyncServerStreamingCall(IAsyncStreamReader<TResponse> responseStream, Task<Metadata> responseHeadersAsync, Func<Status> getStatusFunc, Func<Metadata> getTrailersFunc, Action disposeAction)
{ {
this.responseStream = responseStream; this.responseStream = responseStream;
this.responseHeadersAsync = responseHeadersAsync; this.responseHeadersAsync = responseHeadersAsync;

@ -48,7 +48,7 @@ namespace Grpc.Core
readonly Func<Metadata> getTrailersFunc; readonly Func<Metadata> getTrailersFunc;
readonly Action disposeAction; readonly Action disposeAction;
public AsyncUnaryCall(Task<TResponse> responseAsync, Task<Metadata> responseHeadersAsync, Func<Status> getStatusFunc, Func<Metadata> getTrailersFunc, Action disposeAction) internal AsyncUnaryCall(Task<TResponse> responseAsync, Task<Metadata> responseHeadersAsync, Func<Status> getStatusFunc, Func<Metadata> getTrailersFunc, Action disposeAction)
{ {
this.responseAsync = responseAsync; this.responseAsync = responseAsync;
this.responseHeadersAsync = responseHeadersAsync; this.responseHeadersAsync = responseHeadersAsync;

@ -41,7 +41,7 @@ using Grpc.Core.Utils;
namespace Grpc.Core namespace Grpc.Core
{ {
/// <summary> /// <summary>
/// Provides access to read and write metadata values to be exchanged during a call. /// A collection of metadata entries that can be exchanged during a call.
/// </summary> /// </summary>
public sealed class Metadata : IList<Metadata.Entry> public sealed class Metadata : IList<Metadata.Entry>
{ {
@ -58,21 +58,19 @@ namespace Grpc.Core
readonly List<Entry> entries; readonly List<Entry> entries;
bool readOnly; bool readOnly;
/// <summary>
/// Initializes a new instance of <c>Metadata</c>.
/// </summary>
public Metadata() public Metadata()
{ {
this.entries = new List<Entry>(); this.entries = new List<Entry>();
} }
public Metadata(ICollection<Entry> entries)
{
this.entries = new List<Entry>(entries);
}
/// <summary> /// <summary>
/// Makes this object read-only. /// Makes this object read-only.
/// </summary> /// </summary>
/// <returns>this object</returns> /// <returns>this object</returns>
public Metadata Freeze() internal Metadata Freeze()
{ {
this.readOnly = true; this.readOnly = true;
return this; return this;

Loading…
Cancel
Save