review comments

pull/15223/head
Jan Tattermusch 6 years ago
parent 98bce85cac
commit bc75644385
  1. 14
      src/csharp/Grpc.Core/Metadata.cs

@ -135,20 +135,16 @@ namespace Grpc.Core
} }
/// <summary> /// <summary>
/// <see cref="T:IList`1"/> /// Adds a new ASCII-valued metadata entry. See <c>Metadata.Entry</c> constructor for params.
/// </summary> /// </summary>
/// <param name="key">Metadata key. Gets converted to lowercase. Must not use suffix indicating a binary valued metadata entry. Can only contain lowercase alphanumeric characters, underscores and hyphens.</param>
/// <param name="value">Value string. Only ASCII characters are allowed.</param>
public void Add(string key, string value) public void Add(string key, string value)
{ {
Add(new Entry(key, value)); Add(new Entry(key, value));
} }
/// <summary> /// <summary>
/// <see cref="T:IList`1"/> /// Adds a new binary-valued metadata entry. See <c>Metadata.Entry</c> constructor for params.
/// </summary> /// </summary>
/// <param name="key">Metadata key. Gets converted to lowercase. Needs to have suffix indicating a binary valued metadata entry. Can only contain lowercase alphanumeric characters, underscores and hyphens.</param>
/// <param name="valueBytes">Value bytes.</param>
public void Add(string key, byte[] valueBytes) public void Add(string key, byte[] valueBytes)
{ {
Add(new Entry(key, valueBytes)); Add(new Entry(key, valueBytes));
@ -243,7 +239,7 @@ namespace Grpc.Core
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Grpc.Core.Metadata.Entry"/> struct with a binary value. /// Initializes a new instance of the <see cref="Grpc.Core.Metadata.Entry"/> struct with a binary value.
/// </summary> /// </summary>
/// <param name="key">Metadata key. Gets converted to lowercase. Needs to have suffix indicating a binary valued metadata entry. Can only contain lowercase alphanumeric characters, underscores and hyphens.</param> /// <param name="key">Metadata key. Gets converted to lowercase. Needs to have suffix indicating a binary valued metadata entry. Can only contain lowercase alphanumeric characters, underscores, hyphens and dots.</param>
/// <param name="valueBytes">Value bytes.</param> /// <param name="valueBytes">Value bytes.</param>
public Entry(string key, byte[] valueBytes) public Entry(string key, byte[] valueBytes)
{ {
@ -257,9 +253,9 @@ namespace Grpc.Core
} }
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Grpc.Core.Metadata.Entry"/> struct holding an ASCII value. /// Initializes a new instance of the <see cref="Grpc.Core.Metadata.Entry"/> struct with an ASCII value.
/// </summary> /// </summary>
/// <param name="key">Metadata key. Gets converted to lowercase. Must not use suffix indicating a binary valued metadata entry. Can only contain lowercase alphanumeric characters, underscores and hyphens.</param> /// <param name="key">Metadata key. Gets converted to lowercase. Must not use suffix indicating a binary valued metadata entry. Can only contain lowercase alphanumeric characters, underscores, hyphens and dots.</param>
/// <param name="value">Value string. Only ASCII characters are allowed.</param> /// <param name="value">Value string. Only ASCII characters are allowed.</param>
public Entry(string key, string value) public Entry(string key, string value)
{ {

Loading…
Cancel
Save