aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2015-08-03 08:14:30 -0700
committerGravatar Jan Tattermusch <jtattermusch@google.com>2015-08-08 00:40:04 -0700
commit5c42d8daea5d35fb09323f78fc96c9ad4611902f (patch)
tree6293fb7a5161144840121cdb1e8c22f9975c030e
parent85f24b5862d93ebfd312d648cafb072462b12135 (diff)
regenerate protos
-rw-r--r--src/csharp/Grpc.Examples/Math.cs1661
-rw-r--r--src/csharp/Grpc.Examples/MathGrpc.cs44
-rw-r--r--src/csharp/Grpc.Examples/MathServiceImpl.cs2
-rw-r--r--src/csharp/Grpc.HealthCheck/Health.cs720
-rw-r--r--src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj46
-rw-r--r--src/csharp/Grpc.IntegrationTesting/Test.cs48
-rw-r--r--src/csharp/Grpc.IntegrationTesting/TestGrpc.cs67
7 files changed, 686 insertions, 1902 deletions
diff --git a/src/csharp/Grpc.Examples/Math.cs b/src/csharp/Grpc.Examples/Math.cs
index 75b1e9dbc2..953895e970 100644
--- a/src/csharp/Grpc.Examples/Math.cs
+++ b/src/csharp/Grpc.Examples/Math.cs
@@ -1,80 +1,46 @@
-// Generated by ProtoGen, Version=2.4.1.521, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: math.proto
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
-using pb = global::Google.ProtocolBuffers;
-using pbc = global::Google.ProtocolBuffers.Collections;
-using pbd = global::Google.ProtocolBuffers.Descriptors;
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
-namespace math {
+namespace Math {
namespace Proto {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static partial class Math {
- #region Extension registration
- public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
- }
- #endregion
- #region Static variables
- internal static pbd::MessageDescriptor internal__static_math_DivArgs__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::math.DivArgs, global::math.DivArgs.Builder> internal__static_math_DivArgs__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_math_DivReply__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::math.DivReply, global::math.DivReply.Builder> internal__static_math_DivReply__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_math_FibArgs__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::math.FibArgs, global::math.FibArgs.Builder> internal__static_math_FibArgs__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_math_Num__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::math.Num, global::math.Num.Builder> internal__static_math_Num__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_math_FibReply__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::math.FibReply, global::math.FibReply.Builder> internal__static_math_FibReply__FieldAccessorTable;
- #endregion
#region Descriptor
- public static pbd::FileDescriptor Descriptor {
+ public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
- private static pbd::FileDescriptor descriptor;
+ private static pbr::FileDescriptor descriptor;
static Math() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
- "CgptYXRoLnByb3RvEgRtYXRoIiwKB0RpdkFyZ3MSEAoIZGl2aWRlbmQYASAB",
- "KAMSDwoHZGl2aXNvchgCIAEoAyIvCghEaXZSZXBseRIQCghxdW90aWVudBgB",
- "IAEoAxIRCglyZW1haW5kZXIYAiABKAMiGAoHRmliQXJncxINCgVsaW1pdBgB",
- "IAEoAyISCgNOdW0SCwoDbnVtGAEgASgDIhkKCEZpYlJlcGx5Eg0KBWNvdW50",
- "GAEgASgDMqQBCgRNYXRoEiYKA0RpdhINLm1hdGguRGl2QXJncxoOLm1hdGgu",
- "RGl2UmVwbHkiABIuCgdEaXZNYW55Eg0ubWF0aC5EaXZBcmdzGg4ubWF0aC5E",
- "aXZSZXBseSIAKAEwARIjCgNGaWISDS5tYXRoLkZpYkFyZ3MaCS5tYXRoLk51",
- "bSIAMAESHwoDU3VtEgkubWF0aC5OdW0aCS5tYXRoLk51bSIAKAE="));
- pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
- descriptor = root;
- internal__static_math_DivArgs__Descriptor = Descriptor.MessageTypes[0];
- internal__static_math_DivArgs__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::math.DivArgs, global::math.DivArgs.Builder>(internal__static_math_DivArgs__Descriptor,
- new string[] { "Dividend", "Divisor", });
- internal__static_math_DivReply__Descriptor = Descriptor.MessageTypes[1];
- internal__static_math_DivReply__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::math.DivReply, global::math.DivReply.Builder>(internal__static_math_DivReply__Descriptor,
- new string[] { "Quotient", "Remainder", });
- internal__static_math_FibArgs__Descriptor = Descriptor.MessageTypes[2];
- internal__static_math_FibArgs__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::math.FibArgs, global::math.FibArgs.Builder>(internal__static_math_FibArgs__Descriptor,
- new string[] { "Limit", });
- internal__static_math_Num__Descriptor = Descriptor.MessageTypes[3];
- internal__static_math_Num__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::math.Num, global::math.Num.Builder>(internal__static_math_Num__Descriptor,
- new string[] { "Num_", });
- internal__static_math_FibReply__Descriptor = Descriptor.MessageTypes[4];
- internal__static_math_FibReply__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::math.FibReply, global::math.FibReply.Builder>(internal__static_math_FibReply__Descriptor,
- new string[] { "Count", });
- pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
- RegisterAllExtensions(registry);
- return registry;
- };
- pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
- new pbd::FileDescriptor[] {
- }, assigner);
+ "CgptYXRoLnByb3RvEgRtYXRoIiwKB0RpdkFyZ3MSEAoIZGl2aWRlbmQYASAB",
+ "KAMSDwoHZGl2aXNvchgCIAEoAyIvCghEaXZSZXBseRIQCghxdW90aWVudBgB",
+ "IAEoAxIRCglyZW1haW5kZXIYAiABKAMiGAoHRmliQXJncxINCgVsaW1pdBgB",
+ "IAEoAyISCgNOdW0SCwoDbnVtGAEgASgDIhkKCEZpYlJlcGx5Eg0KBWNvdW50",
+ "GAEgASgDMqQBCgRNYXRoEiYKA0RpdhINLm1hdGguRGl2QXJncxoOLm1hdGgu",
+ "RGl2UmVwbHkiABIuCgdEaXZNYW55Eg0ubWF0aC5EaXZBcmdzGg4ubWF0aC5E",
+ "aXZSZXBseSIAKAEwARIjCgNGaWISDS5tYXRoLkZpYkFyZ3MaCS5tYXRoLk51",
+ "bSIAMAESHwoDU3VtEgkubWF0aC5OdW0aCS5tYXRoLk51bSIAKAFiBnByb3Rv",
+ "Mw=="));
+ descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] {
+ new pbr::GeneratedCodeInfo(typeof(global::Math.DivArgs), new[]{ "Dividend", "Divisor" }, null, null, null),
+ new pbr::GeneratedCodeInfo(typeof(global::Math.DivReply), new[]{ "Quotient", "Remainder" }, null, null, null),
+ new pbr::GeneratedCodeInfo(typeof(global::Math.FibArgs), new[]{ "Limit" }, null, null, null),
+ new pbr::GeneratedCodeInfo(typeof(global::Math.Num), new[]{ "Num_" }, null, null, null),
+ new pbr::GeneratedCodeInfo(typeof(global::Math.FibReply), new[]{ "Count" }, null, null, null)
+ }));
}
#endregion
@@ -82,1448 +48,587 @@ namespace math {
}
#region Messages
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class DivArgs : pb::GeneratedMessage<DivArgs, DivArgs.Builder> {
- private DivArgs() { }
- private static readonly DivArgs defaultInstance = new DivArgs().MakeReadOnly();
- private static readonly string[] _divArgsFieldNames = new string[] { "dividend", "divisor" };
- private static readonly uint[] _divArgsFieldTags = new uint[] { 8, 16 };
- public static DivArgs DefaultInstance {
- get { return defaultInstance; }
+ public sealed partial class DivArgs : pb::IMessage<DivArgs> {
+ private static readonly pb::MessageParser<DivArgs> _parser = new pb::MessageParser<DivArgs>(() => new DivArgs());
+ public static pb::MessageParser<DivArgs> Parser { get { return _parser; } }
+
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Math.Proto.Math.Descriptor.MessageTypes[0]; }
}
- public override DivArgs DefaultInstanceForType {
- get { return DefaultInstance; }
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
}
- protected override DivArgs ThisMessage {
- get { return this; }
+ public DivArgs() {
+ OnConstruction();
}
- public static pbd::MessageDescriptor Descriptor {
- get { return global::math.Proto.Math.internal__static_math_DivArgs__Descriptor; }
+ partial void OnConstruction();
+
+ public DivArgs(DivArgs other) : this() {
+ dividend_ = other.dividend_;
+ divisor_ = other.divisor_;
}
- protected override pb::FieldAccess.FieldAccessorTable<DivArgs, DivArgs.Builder> InternalFieldAccessors {
- get { return global::math.Proto.Math.internal__static_math_DivArgs__FieldAccessorTable; }
+ public DivArgs Clone() {
+ return new DivArgs(this);
}
public const int DividendFieldNumber = 1;
- private bool hasDividend;
private long dividend_;
- public bool HasDividend {
- get { return hasDividend; }
- }
public long Dividend {
get { return dividend_; }
+ set {
+ dividend_ = value;
+ }
}
public const int DivisorFieldNumber = 2;
- private bool hasDivisor;
private long divisor_;
- public bool HasDivisor {
- get { return hasDivisor; }
- }
public long Divisor {
get { return divisor_; }
+ set {
+ divisor_ = value;
+ }
}
- public override bool IsInitialized {
- get {
- return true;
- }
+ public override bool Equals(object other) {
+ return Equals(other as DivArgs);
}
- public override void WriteTo(pb::ICodedOutputStream output) {
- int size = SerializedSize;
- string[] field_names = _divArgsFieldNames;
- if (hasDividend) {
- output.WriteInt64(1, field_names[0], Dividend);
+ public bool Equals(DivArgs other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
}
- if (hasDivisor) {
- output.WriteInt64(2, field_names[1], Divisor);
+ if (ReferenceEquals(other, this)) {
+ return true;
}
- UnknownFields.WriteTo(output);
+ if (Dividend != other.Dividend) return false;
+ if (Divisor != other.Divisor) return false;
+ return true;
}
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasDividend) {
- size += pb::CodedOutputStream.ComputeInt64Size(1, Dividend);
- }
- if (hasDivisor) {
- size += pb::CodedOutputStream.ComputeInt64Size(2, Divisor);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Dividend != 0L) hash ^= Dividend.GetHashCode();
+ if (Divisor != 0L) hash ^= Divisor.GetHashCode();
+ return hash;
}
- public static DivArgs ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static DivArgs ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static DivArgs ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static DivArgs ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static DivArgs ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static DivArgs ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static DivArgs ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static DivArgs ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static DivArgs ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static DivArgs ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private DivArgs MakeReadOnly() {
- return this;
- }
-
- public static Builder CreateBuilder() { return new Builder(); }
- public override Builder ToBuilder() { return CreateBuilder(this); }
- public override Builder CreateBuilderForType() { return new Builder(); }
- public static Builder CreateBuilder(DivArgs prototype) {
- return new Builder(prototype);
+ public override string ToString() {
+ return pb::JsonFormatter.Default.Format(this);
}
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<DivArgs, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(DivArgs cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (Dividend != 0L) {
+ output.WriteRawTag(8);
+ output.WriteInt64(Dividend);
}
-
- private bool resultIsReadOnly;
- private DivArgs result;
-
- private DivArgs PrepareBuilder() {
- if (resultIsReadOnly) {
- DivArgs original = result;
- result = new DivArgs();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override DivArgs MessageBeingBuilt {
- get { return PrepareBuilder(); }
- }
-
- public override Builder Clear() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- return this;
- }
-
- public override Builder Clone() {
- if (resultIsReadOnly) {
- return new Builder(result);
- } else {
- return new Builder().MergeFrom(result);
- }
+ if (Divisor != 0L) {
+ output.WriteRawTag(16);
+ output.WriteInt64(Divisor);
}
+ }
- public override pbd::MessageDescriptor DescriptorForType {
- get { return global::math.DivArgs.Descriptor; }
+ public int CalculateSize() {
+ int size = 0;
+ if (Dividend != 0L) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(Dividend);
}
-
- public override DivArgs DefaultInstanceForType {
- get { return global::math.DivArgs.DefaultInstance; }
+ if (Divisor != 0L) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(Divisor);
}
+ return size;
+ }
- public override DivArgs BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
+ public void MergeFrom(DivArgs other) {
+ if (other == null) {
+ return;
}
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is DivArgs) {
- return MergeFrom((DivArgs) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
+ if (other.Dividend != 0L) {
+ Dividend = other.Dividend;
}
-
- public override Builder MergeFrom(DivArgs other) {
- if (other == global::math.DivArgs.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasDividend) {
- Dividend = other.Dividend;
- }
- if (other.HasDivisor) {
- Divisor = other.Divisor;
- }
- this.MergeUnknownFields(other.UnknownFields);
- return this;
- }
-
- public override Builder MergeFrom(pb::ICodedInputStream input) {
- return MergeFrom(input, pb::ExtensionRegistry.Empty);
+ if (other.Divisor != 0L) {
+ Divisor = other.Divisor;
}
+ }
- public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- PrepareBuilder();
- pb::UnknownFieldSet.Builder unknownFields = null;
- uint tag;
- string field_name;
- while (input.ReadTag(out tag, out field_name)) {
- if(tag == 0 && field_name != null) {
- int field_ordinal = global::System.Array.BinarySearch(_divArgsFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _divArgsFieldTags[field_ordinal];
- else {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- continue;
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while (input.ReadTag(out tag)) {
+ switch(tag) {
+ case 0:
+ throw pb::InvalidProtocolBufferException.InvalidTag();
+ default:
+ if (pb::WireFormat.IsEndGroupTag(tag)) {
+ return;
}
+ break;
+ case 8: {
+ Dividend = input.ReadInt64();
+ break;
}
- switch (tag) {
- case 0: {
- throw pb::InvalidProtocolBufferException.InvalidTag();
- }
- default: {
- if (pb::WireFormat.IsEndGroupTag(tag)) {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- break;
- }
- case 8: {
- result.hasDividend = input.ReadInt64(ref result.dividend_);
- break;
- }
- case 16: {
- result.hasDivisor = input.ReadInt64(ref result.divisor_);
- break;
- }
+ case 16: {
+ Divisor = input.ReadInt64();
+ break;
}
}
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasDividend {
- get { return result.hasDividend; }
}
- public long Dividend {
- get { return result.Dividend; }
- set { SetDividend(value); }
- }
- public Builder SetDividend(long value) {
- PrepareBuilder();
- result.hasDividend = true;
- result.dividend_ = value;
- return this;
- }
- public Builder ClearDividend() {
- PrepareBuilder();
- result.hasDividend = false;
- result.dividend_ = 0L;
- return this;
- }
-
- public bool HasDivisor {
- get { return result.hasDivisor; }
- }
- public long Divisor {
- get { return result.Divisor; }
- set { SetDivisor(value); }
- }
- public Builder SetDivisor(long value) {
- PrepareBuilder();
- result.hasDivisor = true;
- result.divisor_ = value;
- return this;
- }
- public Builder ClearDivisor() {
- PrepareBuilder();
- result.hasDivisor = false;
- result.divisor_ = 0L;
- return this;
- }
- }
- static DivArgs() {
- object.ReferenceEquals(global::math.Proto.Math.Descriptor, null);
}
+
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class DivReply : pb::GeneratedMessage<DivReply, DivReply.Builder> {
- private DivReply() { }
- private static readonly DivReply defaultInstance = new DivReply().MakeReadOnly();
- private static readonly string[] _divReplyFieldNames = new string[] { "quotient", "remainder" };
- private static readonly uint[] _divReplyFieldTags = new uint[] { 8, 16 };
- public static DivReply DefaultInstance {
- get { return defaultInstance; }
+ public sealed partial class DivReply : pb::IMessage<DivReply> {
+ private static readonly pb::MessageParser<DivReply> _parser = new pb::MessageParser<DivReply>(() => new DivReply());
+ public static pb::MessageParser<DivReply> Parser { get { return _parser; } }
+
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Math.Proto.Math.Descriptor.MessageTypes[1]; }
}
- public override DivReply DefaultInstanceForType {
- get { return DefaultInstance; }
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
}
- protected override DivReply ThisMessage {
- get { return this; }
+ public DivReply() {
+ OnConstruction();
}
- public static pbd::MessageDescriptor Descriptor {
- get { return global::math.Proto.Math.internal__static_math_DivReply__Descriptor; }
+ partial void OnConstruction();
+
+ public DivReply(DivReply other) : this() {
+ quotient_ = other.quotient_;
+ remainder_ = other.remainder_;
}
- protected override pb::FieldAccess.FieldAccessorTable<DivReply, DivReply.Builder> InternalFieldAccessors {
- get { return global::math.Proto.Math.internal__static_math_DivReply__FieldAccessorTable; }
+ public DivReply Clone() {
+ return new DivReply(this);
}
public const int QuotientFieldNumber = 1;
- private bool hasQuotient;
private long quotient_;
- public bool HasQuotient {
- get { return hasQuotient; }
- }
public long Quotient {
get { return quotient_; }
+ set {
+ quotient_ = value;
+ }
}
public const int RemainderFieldNumber = 2;
- private bool hasRemainder;
private long remainder_;
- public bool HasRemainder {
- get { return hasRemainder; }
- }
public long Remainder {
get { return remainder_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
+ set {
+ remainder_ = value;
}
}
- public override void WriteTo(pb::ICodedOutputStream output) {
- int size = SerializedSize;
- string[] field_names = _divReplyFieldNames;
- if (hasQuotient) {
- output.WriteInt64(1, field_names[0], Quotient);
- }
- if (hasRemainder) {
- output.WriteInt64(2, field_names[1], Remainder);
- }
- UnknownFields.WriteTo(output);
+ public override bool Equals(object other) {
+ return Equals(other as DivReply);
}
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasQuotient) {
- size += pb::CodedOutputStream.ComputeInt64Size(1, Quotient);
- }
- if (hasRemainder) {
- size += pb::CodedOutputStream.ComputeInt64Size(2, Remainder);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
+ public bool Equals(DivReply other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
}
+ if (Quotient != other.Quotient) return false;
+ if (Remainder != other.Remainder) return false;
+ return true;
}
- public static DivReply ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static DivReply ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static DivReply ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static DivReply ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static DivReply ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static DivReply ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static DivReply ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static DivReply ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static DivReply ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static DivReply ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private DivReply MakeReadOnly() {
- return this;
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Quotient != 0L) hash ^= Quotient.GetHashCode();
+ if (Remainder != 0L) hash ^= Remainder.GetHashCode();
+ return hash;
}
- public static Builder CreateBuilder() { return new Builder(); }
- public override Builder ToBuilder() { return CreateBuilder(this); }
- public override Builder CreateBuilderForType() { return new Builder(); }
- public static Builder CreateBuilder(DivReply prototype) {
- return new Builder(prototype);
+ public override string ToString() {
+ return pb::JsonFormatter.Default.Format(this);
}
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<DivReply, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(DivReply cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (Quotient != 0L) {
+ output.WriteRawTag(8);
+ output.WriteInt64(Quotient);
}
-
- private bool resultIsReadOnly;
- private DivReply result;
-
- private DivReply PrepareBuilder() {
- if (resultIsReadOnly) {
- DivReply original = result;
- result = new DivReply();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override DivReply MessageBeingBuilt {
- get { return PrepareBuilder(); }
- }
-
- public override Builder Clear() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- return this;
- }
-
- public override Builder Clone() {
- if (resultIsReadOnly) {
- return new Builder(result);
- } else {
- return new Builder().MergeFrom(result);
- }
+ if (Remainder != 0L) {
+ output.WriteRawTag(16);
+ output.WriteInt64(Remainder);
}
+ }
- public override pbd::MessageDescriptor DescriptorForType {
- get { return global::math.DivReply.Descriptor; }
+ public int CalculateSize() {
+ int size = 0;
+ if (Quotient != 0L) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(Quotient);
}
-
- public override DivReply DefaultInstanceForType {
- get { return global::math.DivReply.DefaultInstance; }
- }
-
- public override DivReply BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
+ if (Remainder != 0L) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(Remainder);
}
+ return size;
+ }
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is DivReply) {
- return MergeFrom((DivReply) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
+ public void MergeFrom(DivReply other) {
+ if (other == null) {
+ return;
}
-
- public override Builder MergeFrom(DivReply other) {
- if (other == global::math.DivReply.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasQuotient) {
- Quotient = other.Quotient;
- }
- if (other.HasRemainder) {
- Remainder = other.Remainder;
- }
- this.MergeUnknownFields(other.UnknownFields);
- return this;
+ if (other.Quotient != 0L) {
+ Quotient = other.Quotient;
}
-
- public override Builder MergeFrom(pb::ICodedInputStream input) {
- return MergeFrom(input, pb::ExtensionRegistry.Empty);
+ if (other.Remainder != 0L) {
+ Remainder = other.Remainder;
}
+ }
- public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- PrepareBuilder();
- pb::UnknownFieldSet.Builder unknownFields = null;
- uint tag;
- string field_name;
- while (input.ReadTag(out tag, out field_name)) {
- if(tag == 0 && field_name != null) {
- int field_ordinal = global::System.Array.BinarySearch(_divReplyFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _divReplyFieldTags[field_ordinal];
- else {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- continue;
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while (input.ReadTag(out tag)) {
+ switch(tag) {
+ case 0:
+ throw pb::InvalidProtocolBufferException.InvalidTag();
+ default:
+ if (pb::WireFormat.IsEndGroupTag(tag)) {
+ return;
}
+ break;
+ case 8: {
+ Quotient = input.ReadInt64();
+ break;
}
- switch (tag) {
- case 0: {
- throw pb::InvalidProtocolBufferException.InvalidTag();
- }
- default: {
- if (pb::WireFormat.IsEndGroupTag(tag)) {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- break;
- }
- case 8: {
- result.hasQuotient = input.ReadInt64(ref result.quotient_);
- break;
- }
- case 16: {
- result.hasRemainder = input.ReadInt64(ref result.remainder_);
- break;
- }
+ case 16: {
+ Remainder = input.ReadInt64();
+ break;
}
}
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
}
-
-
- public bool HasQuotient {
- get { return result.hasQuotient; }
- }
- public long Quotient {
- get { return result.Quotient; }
- set { SetQuotient(value); }
- }
- public Builder SetQuotient(long value) {
- PrepareBuilder();
- result.hasQuotient = true;
- result.quotient_ = value;
- return this;
- }
- public Builder ClearQuotient() {
- PrepareBuilder();
- result.hasQuotient = false;
- result.quotient_ = 0L;
- return this;
- }
-
- public bool HasRemainder {
- get { return result.hasRemainder; }
- }
- public long Remainder {
- get { return result.Remainder; }
- set { SetRemainder(value); }
- }
- public Builder SetRemainder(long value) {
- PrepareBuilder();
- result.hasRemainder = true;
- result.remainder_ = value;
- return this;
- }
- public Builder ClearRemainder() {
- PrepareBuilder();
- result.hasRemainder = false;
- result.remainder_ = 0L;
- return this;
- }
- }
- static DivReply() {
- object.ReferenceEquals(global::math.Proto.Math.Descriptor, null);
}
+
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class FibArgs : pb::GeneratedMessage<FibArgs, FibArgs.Builder> {
- private FibArgs() { }
- private static readonly FibArgs defaultInstance = new FibArgs().MakeReadOnly();
- private static readonly string[] _fibArgsFieldNames = new string[] { "limit" };
- private static readonly uint[] _fibArgsFieldTags = new uint[] { 8 };
- public static FibArgs DefaultInstance {
- get { return defaultInstance; }
+ public sealed partial class FibArgs : pb::IMessage<FibArgs> {
+ private static readonly pb::MessageParser<FibArgs> _parser = new pb::MessageParser<FibArgs>(() => new FibArgs());
+ public static pb::MessageParser<FibArgs> Parser { get { return _parser; } }
+
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Math.Proto.Math.Descriptor.MessageTypes[2]; }
}
- public override FibArgs DefaultInstanceForType {
- get { return DefaultInstance; }
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
}
- protected override FibArgs ThisMessage {
- get { return this; }
+ public FibArgs() {
+ OnConstruction();
}
- public static pbd::MessageDescriptor Descriptor {
- get { return global::math.Proto.Math.internal__static_math_FibArgs__Descriptor; }
+ partial void OnConstruction();
+
+ public FibArgs(FibArgs other) : this() {
+ limit_ = other.limit_;
}
- protected override pb::FieldAccess.FieldAccessorTable<FibArgs, FibArgs.Builder> InternalFieldAccessors {
- get { return global::math.Proto.Math.internal__static_math_FibArgs__FieldAccessorTable; }
+ public FibArgs Clone() {
+ return new FibArgs(this);
}
public const int LimitFieldNumber = 1;
- private bool hasLimit;
private long limit_;
- public bool HasLimit {
- get { return hasLimit; }
- }
public long Limit {
get { return limit_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
+ set {
+ limit_ = value;
}
}
- public override void WriteTo(pb::ICodedOutputStream output) {
- int size = SerializedSize;
- string[] field_names = _fibArgsFieldNames;
- if (hasLimit) {
- output.WriteInt64(1, field_names[0], Limit);
- }
- UnknownFields.WriteTo(output);
+ public override bool Equals(object other) {
+ return Equals(other as FibArgs);
}
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasLimit) {
- size += pb::CodedOutputStream.ComputeInt64Size(1, Limit);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
+ public bool Equals(FibArgs other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
}
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Limit != other.Limit) return false;
+ return true;
}
- public static FibArgs ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static FibArgs ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static FibArgs ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static FibArgs ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static FibArgs ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static FibArgs ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static FibArgs ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static FibArgs ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static FibArgs ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static FibArgs ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private FibArgs MakeReadOnly() {
- return this;
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Limit != 0L) hash ^= Limit.GetHashCode();
+ return hash;
}
- public static Builder CreateBuilder() { return new Builder(); }
- public override Builder ToBuilder() { return CreateBuilder(this); }
- public override Builder CreateBuilderForType() { return new Builder(); }
- public static Builder CreateBuilder(FibArgs prototype) {
- return new Builder(prototype);
+ public override string ToString() {
+ return pb::JsonFormatter.Default.Format(this);
}
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<FibArgs, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(FibArgs cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private FibArgs result;
-
- private FibArgs PrepareBuilder() {
- if (resultIsReadOnly) {
- FibArgs original = result;
- result = new FibArgs();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override FibArgs MessageBeingBuilt {
- get { return PrepareBuilder(); }
- }
-
- public override Builder Clear() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- return this;
- }
-
- public override Builder Clone() {
- if (resultIsReadOnly) {
- return new Builder(result);
- } else {
- return new Builder().MergeFrom(result);
- }
- }
-
- public override pbd::MessageDescriptor DescriptorForType {
- get { return global::math.FibArgs.Descriptor; }
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (Limit != 0L) {
+ output.WriteRawTag(8);
+ output.WriteInt64(Limit);
}
+ }
- public override FibArgs DefaultInstanceForType {
- get { return global::math.FibArgs.DefaultInstance; }
- }
-
- public override FibArgs BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
+ public int CalculateSize() {
+ int size = 0;
+ if (Limit != 0L) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(Limit);
}
+ return size;
+ }
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is FibArgs) {
- return MergeFrom((FibArgs) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
+ public void MergeFrom(FibArgs other) {
+ if (other == null) {
+ return;
}
-
- public override Builder MergeFrom(FibArgs other) {
- if (other == global::math.FibArgs.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasLimit) {
- Limit = other.Limit;
- }
- this.MergeUnknownFields(other.UnknownFields);
- return this;
- }
-
- public override Builder MergeFrom(pb::ICodedInputStream input) {
- return MergeFrom(input, pb::ExtensionRegistry.Empty);
+ if (other.Limit != 0L) {
+ Limit = other.Limit;
}
+ }
- public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- PrepareBuilder();
- pb::UnknownFieldSet.Builder unknownFields = null;
- uint tag;
- string field_name;
- while (input.ReadTag(out tag, out field_name)) {
- if(tag == 0 && field_name != null) {
- int field_ordinal = global::System.Array.BinarySearch(_fibArgsFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _fibArgsFieldTags[field_ordinal];
- else {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- continue;
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while (input.ReadTag(out tag)) {
+ switch(tag) {
+ case 0:
+ throw pb::InvalidProtocolBufferException.InvalidTag();
+ default:
+ if (pb::WireFormat.IsEndGroupTag(tag)) {
+ return;
}
+ break;
+ case 8: {
+ Limit = input.ReadInt64();
+ break;
}
- switch (tag) {
- case 0: {
- throw pb::InvalidProtocolBufferException.InvalidTag();
- }
- default: {
- if (pb::WireFormat.IsEndGroupTag(tag)) {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- break;
- }
- case 8: {
- result.hasLimit = input.ReadInt64(ref result.limit_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
}
- return this;
}
-
-
- public bool HasLimit {
- get { return result.hasLimit; }
- }
- public long Limit {
- get { return result.Limit; }
- set { SetLimit(value); }
- }
- public Builder SetLimit(long value) {
- PrepareBuilder();
- result.hasLimit = true;
- result.limit_ = value;
- return this;
- }
- public Builder ClearLimit() {
- PrepareBuilder();
- result.hasLimit = false;
- result.limit_ = 0L;
- return this;
- }
- }
- static FibArgs() {
- object.ReferenceEquals(global::math.Proto.Math.Descriptor, null);
}
+
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Num : pb::GeneratedMessage<Num, Num.Builder> {
- private Num() { }
- private static readonly Num defaultInstance = new Num().MakeReadOnly();
- private static readonly string[] _numFieldNames = new string[] { "num" };
- private static readonly uint[] _numFieldTags = new uint[] { 8 };
- public static Num DefaultInstance {
- get { return defaultInstance; }
+ public sealed partial class Num : pb::IMessage<Num> {
+ private static readonly pb::MessageParser<Num> _parser = new pb::MessageParser<Num>(() => new Num());
+ public static pb::MessageParser<Num> Parser { get { return _parser; } }
+
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Math.Proto.Math.Descriptor.MessageTypes[3]; }
}
- public override Num DefaultInstanceForType {
- get { return DefaultInstance; }
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
}
- protected override Num ThisMessage {
- get { return this; }
+ public Num() {
+ OnConstruction();
}
- public static pbd::MessageDescriptor Descriptor {
- get { return global::math.Proto.Math.internal__static_math_Num__Descriptor; }
+ partial void OnConstruction();
+
+ public Num(Num other) : this() {
+ num_ = other.num_;
}
- protected override pb::FieldAccess.FieldAccessorTable<Num, Num.Builder> InternalFieldAccessors {
- get { return global::math.Proto.Math.internal__static_math_Num__FieldAccessorTable; }
+ public Num Clone() {
+ return new Num(this);
}
public const int Num_FieldNumber = 1;
- private bool hasNum_;
private long num_;
- public bool HasNum_ {
- get { return hasNum_; }
- }
public long Num_ {
get { return num_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
+ set {
+ num_ = value;
}
}
- public override void WriteTo(pb::ICodedOutputStream output) {
- int size = SerializedSize;
- string[] field_names = _numFieldNames;
- if (hasNum_) {
- output.WriteInt64(1, field_names[0], Num_);
- }
- UnknownFields.WriteTo(output);
+ public override bool Equals(object other) {
+ return Equals(other as Num);
}
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasNum_) {
- size += pb::CodedOutputStream.ComputeInt64Size(1, Num_);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
+ public bool Equals(Num other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
}
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Num_ != other.Num_) return false;
+ return true;
}
- public static Num ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static Num ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static Num ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static Num ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static Num ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static Num ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static Num ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static Num ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static Num ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static Num ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private Num MakeReadOnly() {
- return this;
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Num_ != 0L) hash ^= Num_.GetHashCode();
+ return hash;
}
- public static Builder CreateBuilder() { return new Builder(); }
- public override Builder ToBuilder() { return CreateBuilder(this); }
- public override Builder CreateBuilderForType() { return new Builder(); }
- public static Builder CreateBuilder(Num prototype) {
- return new Builder(prototype);
+ public override string ToString() {
+ return pb::JsonFormatter.Default.Format(this);
}
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<Num, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(Num cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private Num result;
-
- private Num PrepareBuilder() {
- if (resultIsReadOnly) {
- Num original = result;
- result = new Num();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override Num MessageBeingBuilt {
- get { return PrepareBuilder(); }
- }
-
- public override Builder Clear() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- return this;
- }
-
- public override Builder Clone() {
- if (resultIsReadOnly) {
- return new Builder(result);
- } else {
- return new Builder().MergeFrom(result);
- }
- }
-
- public override pbd::MessageDescriptor DescriptorForType {
- get { return global::math.Num.Descriptor; }
- }
-
- public override Num DefaultInstanceForType {
- get { return global::math.Num.DefaultInstance; }
- }
-
- public override Num BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (Num_ != 0L) {
+ output.WriteRawTag(8);
+ output.WriteInt64(Num_);
}
+ }
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is Num) {
- return MergeFrom((Num) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
+ public int CalculateSize() {
+ int size = 0;
+ if (Num_ != 0L) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(Num_);
}
+ return size;
+ }
- public override Builder MergeFrom(Num other) {
- if (other == global::math.Num.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasNum_) {
- Num_ = other.Num_;
- }
- this.MergeUnknownFields(other.UnknownFields);
- return this;
+ public void MergeFrom(Num other) {
+ if (other == null) {
+ return;
}
-
- public override Builder MergeFrom(pb::ICodedInputStream input) {
- return MergeFrom(input, pb::ExtensionRegistry.Empty);
+ if (other.Num_ != 0L) {
+ Num_ = other.Num_;
}
+ }
- public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- PrepareBuilder();
- pb::UnknownFieldSet.Builder unknownFields = null;
- uint tag;
- string field_name;
- while (input.ReadTag(out tag, out field_name)) {
- if(tag == 0 && field_name != null) {
- int field_ordinal = global::System.Array.BinarySearch(_numFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _numFieldTags[field_ordinal];
- else {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- continue;
- }
- }
- switch (tag) {
- case 0: {
- throw pb::InvalidProtocolBufferException.InvalidTag();
- }
- default: {
- if (pb::WireFormat.IsEndGroupTag(tag)) {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- break;
- }
- case 8: {
- result.hasNum_ = input.ReadInt64(ref result.num_);
- break;
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while (input.ReadTag(out tag)) {
+ switch(tag) {
+ case 0:
+ throw pb::InvalidProtocolBufferException.InvalidTag();
+ default:
+ if (pb::WireFormat.IsEndGroupTag(tag)) {
+ return;
}
+ break;
+ case 8: {
+ Num_ = input.ReadInt64();
+ break;
}
}
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasNum_ {
- get { return result.hasNum_; }
- }
- public long Num_ {
- get { return result.Num_; }
- set { SetNum_(value); }
- }
- public Builder SetNum_(long value) {
- PrepareBuilder();
- result.hasNum_ = true;
- result.num_ = value;
- return this;
- }
- public Builder ClearNum_() {
- PrepareBuilder();
- result.hasNum_ = false;
- result.num_ = 0L;
- return this;
}
}
- static Num() {
- object.ReferenceEquals(global::math.Proto.Math.Descriptor, null);
- }
+
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class FibReply : pb::GeneratedMessage<FibReply, FibReply.Builder> {
- private FibReply() { }
- private static readonly FibReply defaultInstance = new FibReply().MakeReadOnly();
- private static readonly string[] _fibReplyFieldNames = new string[] { "count" };
- private static readonly uint[] _fibReplyFieldTags = new uint[] { 8 };
- public static FibReply DefaultInstance {
- get { return defaultInstance; }
+ public sealed partial class FibReply : pb::IMessage<FibReply> {
+ private static readonly pb::MessageParser<FibReply> _parser = new pb::MessageParser<FibReply>(() => new FibReply());
+ public static pb::MessageParser<FibReply> Parser { get { return _parser; } }
+
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Math.Proto.Math.Descriptor.MessageTypes[4]; }
}
- public override FibReply DefaultInstanceForType {
- get { return DefaultInstance; }
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
}
- protected override FibReply ThisMessage {
- get { return this; }
+ public FibReply() {
+ OnConstruction();
}
- public static pbd::MessageDescriptor Descriptor {
- get { return global::math.Proto.Math.internal__static_math_FibReply__Descriptor; }
+ partial void OnConstruction();
+
+ public FibReply(FibReply other) : this() {
+ count_ = other.count_;
}
- protected override pb::FieldAccess.FieldAccessorTable<FibReply, FibReply.Builder> InternalFieldAccessors {
- get { return global::math.Proto.Math.internal__static_math_FibReply__FieldAccessorTable; }
+ public FibReply Clone() {
+ return new FibReply(this);
}
public const int CountFieldNumber = 1;
- private bool hasCount;
private long count_;
- public bool HasCount {
- get { return hasCount; }
- }
public long Count {
get { return count_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
+ set {
+ count_ = value;
}
}
- public override void WriteTo(pb::ICodedOutputStream output) {
- int size = SerializedSize;
- string[] field_names = _fibReplyFieldNames;
- if (hasCount) {
- output.WriteInt64(1, field_names[0], Count);
- }
- UnknownFields.WriteTo(output);
+ public override bool Equals(object other) {
+ return Equals(other as FibReply);
}
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasCount) {
- size += pb::CodedOutputStream.ComputeInt64Size(1, Count);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
+ public bool Equals(FibReply other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
}
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Count != other.Count) return false;
+ return true;
}
- public static FibReply ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static FibReply ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static FibReply ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static FibReply ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static FibReply ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static FibReply ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static FibReply ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static FibReply ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static FibReply ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static FibReply ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private FibReply MakeReadOnly() {
- return this;
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Count != 0L) hash ^= Count.GetHashCode();
+ return hash;
}
- public static Builder CreateBuilder() { return new Builder(); }
- public override Builder ToBuilder() { return CreateBuilder(this); }
- public override Builder CreateBuilderForType() { return new Builder(); }
- public static Builder CreateBuilder(FibReply prototype) {
- return new Builder(prototype);
+ public override string ToString() {
+ return pb::JsonFormatter.Default.Format(this);
}
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<FibReply, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(FibReply cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private FibReply result;
-
- private FibReply PrepareBuilder() {
- if (resultIsReadOnly) {
- FibReply original = result;
- result = new FibReply();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override FibReply MessageBeingBuilt {
- get { return PrepareBuilder(); }
- }
-
- public override Builder Clear() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- return this;
- }
-
- public override Builder Clone() {
- if (resultIsReadOnly) {
- return new Builder(result);
- } else {
- return new Builder().MergeFrom(result);
- }
- }
-
- public override pbd::MessageDescriptor DescriptorForType {
- get { return global::math.FibReply.Descriptor; }
- }
-
- public override FibReply DefaultInstanceForType {
- get { return global::math.FibReply.DefaultInstance; }
- }
-
- public override FibReply BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (Count != 0L) {
+ output.WriteRawTag(8);
+ output.WriteInt64(Count);
}
+ }
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is FibReply) {
- return MergeFrom((FibReply) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
+ public int CalculateSize() {
+ int size = 0;
+ if (Count != 0L) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(Count);
}
+ return size;
+ }
- public override Builder MergeFrom(FibReply other) {
- if (other == global::math.FibReply.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasCount) {
- Count = other.Count;
- }
- this.MergeUnknownFields(other.UnknownFields);
- return this;
+ public void MergeFrom(FibReply other) {
+ if (other == null) {
+ return;
}
-
- public override Builder MergeFrom(pb::ICodedInputStream input) {
- return MergeFrom(input, pb::ExtensionRegistry.Empty);
+ if (other.Count != 0L) {
+ Count = other.Count;
}
+ }
- public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- PrepareBuilder();
- pb::UnknownFieldSet.Builder unknownFields = null;
- uint tag;
- string field_name;
- while (input.ReadTag(out tag, out field_name)) {
- if(tag == 0 && field_name != null) {
- int field_ordinal = global::System.Array.BinarySearch(_fibReplyFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _fibReplyFieldTags[field_ordinal];
- else {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- continue;
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while (input.ReadTag(out tag)) {
+ switch(tag) {
+ case 0:
+ throw pb::InvalidProtocolBufferException.InvalidTag();
+ default:
+ if (pb::WireFormat.IsEndGroupTag(tag)) {
+ return;
}
+ break;
+ case 8: {
+ Count = input.ReadInt64();
+ break;
}
- switch (tag) {
- case 0: {
- throw pb::InvalidProtocolBufferException.InvalidTag();
- }
- default: {
- if (pb::WireFormat.IsEndGroupTag(tag)) {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- break;
- }
- case 8: {
- result.hasCount = input.ReadInt64(ref result.count_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
}
- return this;
}
-
-
- public bool HasCount {
- get { return result.hasCount; }
- }
- public long Count {
- get { return result.Count; }
- set { SetCount(value); }
- }
- public Builder SetCount(long value) {
- PrepareBuilder();
- result.hasCount = true;
- result.count_ = value;
- return this;
- }
- public Builder ClearCount() {
- PrepareBuilder();
- result.hasCount = false;
- result.count_ = 0L;
- return this;
- }
- }
- static FibReply() {
- object.ReferenceEquals(global::math.Proto.Math.Descriptor, null);
}
- }
- #endregion
+ }
- #region Services
- /*
- * Service generation is now disabled by default, use the following option to enable:
- * option (google.protobuf.csharp_file_options).service_generator_type = GENERIC;
- */
#endregion
}
diff --git a/src/csharp/Grpc.Examples/MathGrpc.cs b/src/csharp/Grpc.Examples/MathGrpc.cs
index 4941ff35f7..eb6b68849f 100644
--- a/src/csharp/Grpc.Examples/MathGrpc.cs
+++ b/src/csharp/Grpc.Examples/MathGrpc.cs
@@ -7,38 +7,38 @@ using System.Threading;
using System.Threading.Tasks;
using Grpc.Core;
-namespace math {
+namespace Math {
public static class Math
{
static readonly string __ServiceName = "math.Math";
- static readonly Marshaller<global::math.DivArgs> __Marshaller_DivArgs = Marshallers.Create((arg) => arg.ToByteArray(), global::math.DivArgs.ParseFrom);
- static readonly Marshaller<global::math.DivReply> __Marshaller_DivReply = Marshallers.Create((arg) => arg.ToByteArray(), global::math.DivReply.ParseFrom);
- static readonly Marshaller<global::math.FibArgs> __Marshaller_FibArgs = Marshallers.Create((arg) => arg.ToByteArray(), global::math.FibArgs.ParseFrom);
- static readonly Marshaller<global::math.Num> __Marshaller_Num = Marshallers.Create((arg) => arg.ToByteArray(), global::math.Num.ParseFrom);
+ static readonly Marshaller<global::Math.DivArgs> __Marshaller_DivArgs = Marshallers.Create((arg) => arg.ToByteArray(), global::Math.DivArgs.ParseFrom);
+ static readonly Marshaller<global::Math.DivReply> __Marshaller_DivReply = Marshallers.Create((arg) => arg.ToByteArray(), global::Math.DivReply.ParseFrom);
+ static readonly Marshaller<global::Math.FibArgs> __Marshaller_FibArgs = Marshallers.Create((arg) => arg.ToByteArray(), global::Math.FibArgs.ParseFrom);
+ static readonly Marshaller<global::Math.Num> __Marshaller_Num = Marshallers.Create((arg) => arg.ToByteArray(), global::Math.Num.ParseFrom);
- static readonly Method<global::math.DivArgs, global::math.DivReply> __Method_Div = new Method<global::math.DivArgs, global::math.DivReply>(
+ static readonly Method<global::Math.DivArgs, global::Math.DivReply> __Method_Div = new Method<global::Math.DivArgs, global::Math.DivReply>(
MethodType.Unary,
__ServiceName,
"Div",
__Marshaller_DivArgs,
__Marshaller_DivReply);
- static readonly Method<global::math.DivArgs, global::math.DivReply> __Method_DivMany = new Method<global::math.DivArgs, global::math.DivReply>(
+ static readonly Method<global::Math.DivArgs, global::Math.DivReply> __Method_DivMany = new Method<global::Math.DivArgs, global::Math.DivReply>(
MethodType.DuplexStreaming,
__ServiceName,
"DivMany",
__Marshaller_DivArgs,
__Marshaller_DivReply);
- static readonly Method<global::math.FibArgs, global::math.Num> __Method_Fib = new Method<global::math.FibArgs, global::math.Num>(
+ static readonly Method<global::Math.FibArgs, global::Math.Num> __Method_Fib = new Method<global::Math.FibArgs, global::Math.Num>(
MethodType.ServerStreaming,
__ServiceName,
"Fib",
__Marshaller_FibArgs,
__Marshaller_Num);
- static readonly Method<global::math.Num, global::math.Num> __Method_Sum = new Method<global::math.Num, global::math.Num>(
+ static readonly Method<global::Math.Num, global::Math.Num> __Method_Sum = new Method<global::Math.Num, global::Math.Num>(
MethodType.ClientStreaming,
__ServiceName,
"Sum",
@@ -48,6 +48,7 @@ namespace math {
// client interface
public interface IMathClient
{
+<<<<<<< HEAD
global::math.DivReply Div(global::math.DivArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
global::math.DivReply Div(global::math.DivArgs request, CallOptions options);
AsyncUnaryCall<global::math.DivReply> DivAsync(global::math.DivArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
@@ -58,15 +59,22 @@ namespace math {
AsyncServerStreamingCall<global::math.Num> Fib(global::math.FibArgs request, CallOptions options);
AsyncClientStreamingCall<global::math.Num, global::math.Num> Sum(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
AsyncClientStreamingCall<global::math.Num, global::math.Num> Sum(CallOptions options);
+=======
+ global::Math.DivReply Div(global::Math.DivArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
+ AsyncUnaryCall<global::Math.DivReply> DivAsync(global::Math.DivArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
+ AsyncDuplexStreamingCall<global::Math.DivArgs, global::Math.DivReply> DivMany(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
+ AsyncServerStreamingCall<global::Math.Num> Fib(global::Math.FibArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
+ AsyncClientStreamingCall<global::Math.Num, global::Math.Num> Sum(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
+>>>>>>> 708e8de... regenerate protos
}
// server-side interface
public interface IMath
{
- Task<global::math.DivReply> Div(global::math.DivArgs request, ServerCallContext context);
- Task DivMany(IAsyncStreamReader<global::math.DivArgs> requestStream, IServerStreamWriter<global::math.DivReply> responseStream, ServerCallContext context);
- Task Fib(global::math.FibArgs request, IServerStreamWriter<global::math.Num> responseStream, ServerCallContext context);
- Task<global::math.Num> Sum(IAsyncStreamReader<global::math.Num> requestStream, ServerCallContext context);
+ Task<global::Math.DivReply> Div(global::Math.DivArgs request, ServerCallContext context);
+ Task DivMany(IAsyncStreamReader<global::Math.DivArgs> requestStream, IServerStreamWriter<global::Math.DivReply> responseStream, ServerCallContext context);
+ Task Fib(global::Math.FibArgs request, IServerStreamWriter<global::Math.Num> responseStream, ServerCallContext context);
+ Task<global::Math.Num> Sum(IAsyncStreamReader<global::Math.Num> requestStream, ServerCallContext context);
}
// client stub
@@ -75,7 +83,7 @@ namespace math {
public MathClient(Channel channel) : base(channel)
{
}
- public global::math.DivReply Div(global::math.DivArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
+ public global::Math.DivReply Div(global::Math.DivArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
var call = CreateCall(__Method_Div, new CallOptions(headers, deadline, cancellationToken));
return Calls.BlockingUnaryCall(call, request);
@@ -85,7 +93,7 @@ namespace math {
var call = CreateCall(__Method_Div, options);
return Calls.BlockingUnaryCall(call, request);
}
- public AsyncUnaryCall<global::math.DivReply> DivAsync(global::math.DivArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
+ public AsyncUnaryCall<global::Math.DivReply> DivAsync(global::Math.DivArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
var call = CreateCall(__Method_Div, new CallOptions(headers, deadline, cancellationToken));
return Calls.AsyncUnaryCall(call, request);
@@ -95,7 +103,7 @@ namespace math {
var call = CreateCall(__Method_Div, options);
return Calls.AsyncUnaryCall(call, request);
}
- public AsyncDuplexStreamingCall<global::math.DivArgs, global::math.DivReply> DivMany(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
+ public AsyncDuplexStreamingCall<global::Math.DivArgs, global::Math.DivReply> DivMany(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
var call = CreateCall(__Method_DivMany, new CallOptions(headers, deadline, cancellationToken));
return Calls.AsyncDuplexStreamingCall(call);
@@ -105,7 +113,7 @@ namespace math {
var call = CreateCall(__Method_DivMany, options);
return Calls.AsyncDuplexStreamingCall(call);
}
- public AsyncServerStreamingCall<global::math.Num> Fib(global::math.FibArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
+ public AsyncServerStreamingCall<global::Math.Num> Fib(global::Math.FibArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
var call = CreateCall(__Method_Fib, new CallOptions(headers, deadline, cancellationToken));
return Calls.AsyncServerStreamingCall(call, request);
@@ -115,7 +123,7 @@ namespace math {
var call = CreateCall(__Method_Fib, options);
return Calls.AsyncServerStreamingCall(call, request);
}
- public AsyncClientStreamingCall<global::math.Num, global::math.Num> Sum(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
+ public AsyncClientStreamingCall<global::Math.Num, global::Math.Num> Sum(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
var call = CreateCall(__Method_Sum, new CallOptions(headers, deadline, cancellationToken));
return Calls.AsyncClientStreamingCall(call);
diff --git a/src/csharp/Grpc.Examples/MathServiceImpl.cs b/src/csharp/Grpc.Examples/MathServiceImpl.cs
index dd26b1d350..29181bc858 100644
--- a/src/csharp/Grpc.Examples/MathServiceImpl.cs
+++ b/src/csharp/Grpc.Examples/MathServiceImpl.cs
@@ -38,7 +38,7 @@ using System.Threading.Tasks;
using Grpc.Core;
using Grpc.Core.Utils;
-namespace math
+namespace Math
{
/// <summary>
/// Implementation of MathService server
diff --git a/src/csharp/Grpc.HealthCheck/Health.cs b/src/csharp/Grpc.HealthCheck/Health.cs
index 361382d4bd..de65c1a9de 100644
--- a/src/csharp/Grpc.HealthCheck/Health.cs
+++ b/src/csharp/Grpc.HealthCheck/Health.cs
@@ -3,9 +3,9 @@
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
-using pb = global::Google.ProtocolBuffers;
-using pbc = global::Google.ProtocolBuffers.Collections;
-using pbd = global::Google.ProtocolBuffers.Descriptors;
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Grpc.Health.V1Alpha {
@@ -14,21 +14,11 @@ namespace Grpc.Health.V1Alpha {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static partial class Health {
- #region Extension registration
- public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
- }
- #endregion
- #region Static variables
- internal static pbd::MessageDescriptor internal__static_grpc_health_v1alpha_HealthCheckRequest__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Grpc.Health.V1Alpha.HealthCheckRequest, global::Grpc.Health.V1Alpha.HealthCheckRequest.Builder> internal__static_grpc_health_v1alpha_HealthCheckRequest__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_grpc_health_v1alpha_HealthCheckResponse__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Grpc.Health.V1Alpha.HealthCheckResponse, global::Grpc.Health.V1Alpha.HealthCheckResponse.Builder> internal__static_grpc_health_v1alpha_HealthCheckResponse__FieldAccessorTable;
- #endregion
#region Descriptor
- public static pbd::FileDescriptor Descriptor {
+ public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
- private static pbd::FileDescriptor descriptor;
+ private static pbr::FileDescriptor descriptor;
static Health() {
byte[] descriptorData = global::System.Convert.FromBase64String(
@@ -41,24 +31,13 @@ namespace Grpc.Health.V1Alpha {
"EAESDwoLTk9UX1NFUlZJTkcQAjJkCgZIZWFsdGgSWgoFQ2hlY2sSJy5ncnBj",
"LmhlYWx0aC52MWFscGhhLkhlYWx0aENoZWNrUmVxdWVzdBooLmdycGMuaGVh",
"bHRoLnYxYWxwaGEuSGVhbHRoQ2hlY2tSZXNwb25zZUIWqgITR3JwYy5IZWFs",
- "dGguVjFBbHBoYQ=="));
- pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
- descriptor = root;
- internal__static_grpc_health_v1alpha_HealthCheckRequest__Descriptor = Descriptor.MessageTypes[0];
- internal__static_grpc_health_v1alpha_HealthCheckRequest__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Grpc.Health.V1Alpha.HealthCheckRequest, global::Grpc.Health.V1Alpha.HealthCheckRequest.Builder>(internal__static_grpc_health_v1alpha_HealthCheckRequest__Descriptor,
- new string[] { "Host", "Service", });
- internal__static_grpc_health_v1alpha_HealthCheckResponse__Descriptor = Descriptor.MessageTypes[1];
- internal__static_grpc_health_v1alpha_HealthCheckResponse__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Grpc.Health.V1Alpha.HealthCheckResponse, global::Grpc.Health.V1Alpha.HealthCheckResponse.Builder>(internal__static_grpc_health_v1alpha_HealthCheckResponse__Descriptor,
- new string[] { "Status", });
- pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
- RegisterAllExtensions(registry);
- return registry;
- };
- pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
- new pbd::FileDescriptor[] {
- }, assigner);
+ "dGguVjFBbHBoYWIGcHJvdG8z"));
+ descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] {
+ new pbr::GeneratedCodeInfo(typeof(global::Grpc.Health.V1Alpha.HealthCheckRequest), new[]{ "Host", "Service" }, null, null, null),
+ new pbr::GeneratedCodeInfo(typeof(global::Grpc.Health.V1Alpha.HealthCheckResponse), new[]{ "Status" }, null, new[]{ typeof(global::Grpc.Health.V1Alpha.HealthCheckResponse.Types.ServingStatus) }, null)
+ }));
}
#endregion
@@ -66,618 +45,253 @@ namespace Grpc.Health.V1Alpha {
}
#region Messages
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class HealthCheckRequest : pb::GeneratedMessage<HealthCheckRequest, HealthCheckRequest.Builder> {
- private HealthCheckRequest() { }
- private static readonly HealthCheckRequest defaultInstance = new HealthCheckRequest().MakeReadOnly();
- private static readonly string[] _healthCheckRequestFieldNames = new string[] { "host", "service" };
- private static readonly uint[] _healthCheckRequestFieldTags = new uint[] { 10, 18 };
- public static HealthCheckRequest DefaultInstance {
- get { return defaultInstance; }
+ public sealed partial class HealthCheckRequest : pb::IMessage<HealthCheckRequest> {
+ private static readonly pb::MessageParser<HealthCheckRequest> _parser = new pb::MessageParser<HealthCheckRequest>(() => new HealthCheckRequest());
+ public static pb::MessageParser<HealthCheckRequest> Parser { get { return _parser; } }
+
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Grpc.Health.V1Alpha.Proto.Health.Descriptor.MessageTypes[0]; }
}
- public override HealthCheckRequest DefaultInstanceForType {
- get { return DefaultInstance; }
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
}
- protected override HealthCheckRequest ThisMessage {
- get { return this; }
+ public HealthCheckRequest() {
+ OnConstruction();
}
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Grpc.Health.V1Alpha.Proto.Health.internal__static_grpc_health_v1alpha_HealthCheckRequest__Descriptor; }
+ partial void OnConstruction();
+
+ public HealthCheckRequest(HealthCheckRequest other) : this() {
+ host_ = other.host_;
+ service_ = other.service_;
}
- protected override pb::FieldAccess.FieldAccessorTable<HealthCheckRequest, HealthCheckRequest.Builder> InternalFieldAccessors {
- get { return global::Grpc.Health.V1Alpha.Proto.Health.internal__static_grpc_health_v1alpha_HealthCheckRequest__FieldAccessorTable; }
+ public HealthCheckRequest Clone() {
+ return new HealthCheckRequest(this);
}
public const int HostFieldNumber = 1;
- private bool hasHost;
private string host_ = "";
- public bool HasHost {
- get { return hasHost; }
- }
public string Host {
get { return host_; }
+ set {
+ host_ = pb::Preconditions.CheckNotNull(value, "value");
+ }
}
public const int ServiceFieldNumber = 2;
- private bool hasService;
private string service_ = "";
- public bool HasService {
- get { return hasService; }
- }
public string Service {
get { return service_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
+ set {
+ service_ = pb::Preconditions.CheckNotNull(value, "value");
}
}
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _healthCheckRequestFieldNames;
- if (hasHost) {
- output.WriteString(1, field_names[0], Host);
- }
- if (hasService) {
- output.WriteString(2, field_names[1], Service);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
+ public override bool Equals(object other) {
+ return Equals(other as HealthCheckRequest);
}
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasHost) {
- size += pb::CodedOutputStream.ComputeStringSize(1, Host);
+ public bool Equals(HealthCheckRequest other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
}
- if (hasService) {
- size += pb::CodedOutputStream.ComputeStringSize(2, Service);
+ if (ReferenceEquals(other, this)) {
+ return true;
}
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static HealthCheckRequest ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static HealthCheckRequest ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static HealthCheckRequest ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static HealthCheckRequest ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static HealthCheckRequest ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static HealthCheckRequest ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static HealthCheckRequest ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static HealthCheckRequest ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static HealthCheckRequest ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static HealthCheckRequest ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private HealthCheckRequest MakeReadOnly() {
- return this;
+ if (Host != other.Host) return false;
+ if (Service != other.Service) return false;
+ return true;
}
- public static Builder CreateBuilder() { return new Builder(); }
- public override Builder ToBuilder() { return CreateBuilder(this); }
- public override Builder CreateBuilderForType() { return new Builder(); }
- public static Builder CreateBuilder(HealthCheckRequest prototype) {
- return new Builder(prototype);
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Host.Length != 0) hash ^= Host.GetHashCode();
+ if (Service.Length != 0) hash ^= Service.GetHashCode();
+ return hash;
}
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<HealthCheckRequest, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(HealthCheckRequest cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private HealthCheckRequest result;
-
- private HealthCheckRequest PrepareBuilder() {
- if (resultIsReadOnly) {
- HealthCheckRequest original = result;
- result = new HealthCheckRequest();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override HealthCheckRequest MessageBeingBuilt {
- get { return PrepareBuilder(); }
- }
-
- public override Builder Clear() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- return this;
- }
+ public override string ToString() {
+ return pb::JsonFormatter.Default.Format(this);
+ }
- public override Builder Clone() {
- if (resultIsReadOnly) {
- return new Builder(result);
- } else {
- return new Builder().MergeFrom(result);
- }
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (Host.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(Host);
}
-
- public override pbd::MessageDescriptor DescriptorForType {
- get { return global::Grpc.Health.V1Alpha.HealthCheckRequest.Descriptor; }
+ if (Service.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(Service);
}
+ }
- public override HealthCheckRequest DefaultInstanceForType {
- get { return global::Grpc.Health.V1Alpha.HealthCheckRequest.DefaultInstance; }
+ public int CalculateSize() {
+ int size = 0;
+ if (Host.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Host);
}
-
- public override HealthCheckRequest BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
+ if (Service.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Service);
}
+ return size;
+ }
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is HealthCheckRequest) {
- return MergeFrom((HealthCheckRequest) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
+ public void MergeFrom(HealthCheckRequest other) {
+ if (other == null) {
+ return;
}
-
- public override Builder MergeFrom(HealthCheckRequest other) {
- if (other == global::Grpc.Health.V1Alpha.HealthCheckRequest.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasHost) {
- Host = other.Host;
- }
- if (other.HasService) {
- Service = other.Service;
- }
- this.MergeUnknownFields(other.UnknownFields);
- return this;
+ if (other.Host.Length != 0) {
+ Host = other.Host;
}
-
- public override Builder MergeFrom(pb::ICodedInputStream input) {
- return MergeFrom(input, pb::ExtensionRegistry.Empty);
+ if (other.Service.Length != 0) {
+ Service = other.Service;
}
+ }
- public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- PrepareBuilder();
- pb::UnknownFieldSet.Builder unknownFields = null;
- uint tag;
- string field_name;
- while (input.ReadTag(out tag, out field_name)) {
- if(tag == 0 && field_name != null) {
- int field_ordinal = global::System.Array.BinarySearch(_healthCheckRequestFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _healthCheckRequestFieldTags[field_ordinal];
- else {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- continue;
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while (input.ReadTag(out tag)) {
+ switch(tag) {
+ case 0:
+ throw pb::InvalidProtocolBufferException.InvalidTag();
+ default:
+ if (pb::WireFormat.IsEndGroupTag(tag)) {
+ return;
}
+ break;
+ case 10: {
+ Host = input.ReadString();
+ break;
}
- switch (tag) {
- case 0: {
- throw pb::InvalidProtocolBufferException.InvalidTag();
- }
- default: {
- if (pb::WireFormat.IsEndGroupTag(tag)) {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- break;
- }
- case 10: {
- result.hasHost = input.ReadString(ref result.host_);
- break;
- }
- case 18: {
- result.hasService = input.ReadString(ref result.service_);
- break;
- }
+ case 18: {
+ Service = input.ReadString();
+ break;
}
}
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasHost {
- get { return result.hasHost; }
- }
- public string Host {
- get { return result.Host; }
- set { SetHost(value); }
- }
- public Builder SetHost(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasHost = true;
- result.host_ = value;
- return this;
- }
- public Builder ClearHost() {
- PrepareBuilder();
- result.hasHost = false;
- result.host_ = "";
- return this;
- }
-
- public bool HasService {
- get { return result.hasService; }
- }
- public string Service {
- get { return result.Service; }
- set { SetService(value); }
- }
- public Builder SetService(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasService = true;
- result.service_ = value;
- return this;
}
- public Builder ClearService() {
- PrepareBuilder();
- result.hasService = false;
- result.service_ = "";
- return this;
- }
- }
- static HealthCheckRequest() {
- object.ReferenceEquals(global::Grpc.Health.V1Alpha.Proto.Health.Descriptor, null);
}
+
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class HealthCheckResponse : pb::GeneratedMessage<HealthCheckResponse, HealthCheckResponse.Builder> {
- private HealthCheckResponse() { }
- private static readonly HealthCheckResponse defaultInstance = new HealthCheckResponse().MakeReadOnly();
- private static readonly string[] _healthCheckResponseFieldNames = new string[] { "status" };
- private static readonly uint[] _healthCheckResponseFieldTags = new uint[] { 8 };
- public static HealthCheckResponse DefaultInstance {
- get { return defaultInstance; }
- }
+ public sealed partial class HealthCheckResponse : pb::IMessage<HealthCheckResponse> {
+ private static readonly pb::MessageParser<HealthCheckResponse> _parser = new pb::MessageParser<HealthCheckResponse>(() => new HealthCheckResponse());
+ public static pb::MessageParser<HealthCheckResponse> Parser { get { return _parser; } }
- public override HealthCheckResponse DefaultInstanceForType {
- get { return DefaultInstance; }
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Grpc.Health.V1Alpha.Proto.Health.Descriptor.MessageTypes[1]; }
}
- protected override HealthCheckResponse ThisMessage {
- get { return this; }
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
}
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Grpc.Health.V1Alpha.Proto.Health.internal__static_grpc_health_v1alpha_HealthCheckResponse__Descriptor; }
+ public HealthCheckResponse() {
+ OnConstruction();
}
- protected override pb::FieldAccess.FieldAccessorTable<HealthCheckResponse, HealthCheckResponse.Builder> InternalFieldAccessors {
- get { return global::Grpc.Health.V1Alpha.Proto.Health.internal__static_grpc_health_v1alpha_HealthCheckResponse__FieldAccessorTable; }
- }
+ partial void OnConstruction();
- #region Nested types
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public static partial class Types {
- public enum ServingStatus {
- UNKNOWN = 0,
- SERVING = 1,
- NOT_SERVING = 2,
- }
+ public HealthCheckResponse(HealthCheckResponse other) : this() {
+ status_ = other.status_;
+ }
+ public HealthCheckResponse Clone() {
+ return new HealthCheckResponse(this);
}
- #endregion
public const int StatusFieldNumber = 1;
- private bool hasStatus;
private global::Grpc.Health.V1Alpha.HealthCheckResponse.Types.ServingStatus status_ = global::Grpc.Health.V1Alpha.HealthCheckResponse.Types.ServingStatus.UNKNOWN;
- public bool HasStatus {
- get { return hasStatus; }
- }
public global::Grpc.Health.V1Alpha.HealthCheckResponse.Types.ServingStatus Status {
get { return status_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
+ set {
+ status_ = value;
}
}
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _healthCheckResponseFieldNames;
- if (hasStatus) {
- output.WriteEnum(1, field_names[0], (int) Status, Status);
- }
- UnknownFields.WriteTo(output);
+ public override bool Equals(object other) {
+ return Equals(other as HealthCheckResponse);
}
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
+ public bool Equals(HealthCheckResponse other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
}
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasStatus) {
- size += pb::CodedOutputStream.ComputeEnumSize(1, (int) Status);
+ if (ReferenceEquals(other, this)) {
+ return true;
}
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static HealthCheckResponse ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static HealthCheckResponse ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static HealthCheckResponse ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static HealthCheckResponse ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static HealthCheckResponse ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static HealthCheckResponse ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static HealthCheckResponse ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static HealthCheckResponse ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static HealthCheckResponse ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static HealthCheckResponse ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private HealthCheckResponse MakeReadOnly() {
- return this;
+ if (Status != other.Status) return false;
+ return true;
}
- public static Builder CreateBuilder() { return new Builder(); }
- public override Builder ToBuilder() { return CreateBuilder(this); }
- public override Builder CreateBuilderForType() { return new Builder(); }
- public static Builder CreateBuilder(HealthCheckResponse prototype) {
- return new Builder(prototype);
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Status != global::Grpc.Health.V1Alpha.HealthCheckResponse.Types.ServingStatus.UNKNOWN) hash ^= Status.GetHashCode();
+ return hash;
}
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<HealthCheckResponse, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(HealthCheckResponse cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private HealthCheckResponse result;
-
- private HealthCheckResponse PrepareBuilder() {
- if (resultIsReadOnly) {
- HealthCheckResponse original = result;
- result = new HealthCheckResponse();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override HealthCheckResponse MessageBeingBuilt {
- get { return PrepareBuilder(); }
- }
-
- public override Builder Clear() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- return this;
- }
-
- public override Builder Clone() {
- if (resultIsReadOnly) {
- return new Builder(result);
- } else {
- return new Builder().MergeFrom(result);
- }
- }
-
- public override pbd::MessageDescriptor DescriptorForType {
- get { return global::Grpc.Health.V1Alpha.HealthCheckResponse.Descriptor; }
- }
-
- public override HealthCheckResponse DefaultInstanceForType {
- get { return global::Grpc.Health.V1Alpha.HealthCheckResponse.DefaultInstance; }
- }
+ public override string ToString() {
+ return pb::JsonFormatter.Default.Format(this);
+ }
- public override HealthCheckResponse BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (Status != global::Grpc.Health.V1Alpha.HealthCheckResponse.Types.ServingStatus.UNKNOWN) {
+ output.WriteRawTag(8);
+ output.WriteEnum((int) Status);
}
+ }
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is HealthCheckResponse) {
- return MergeFrom((HealthCheckResponse) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
+ public int CalculateSize() {
+ int size = 0;
+ if (Status != global::Grpc.Health.V1Alpha.HealthCheckResponse.Types.ServingStatus.UNKNOWN) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status);
}
+ return size;
+ }
- public override Builder MergeFrom(HealthCheckResponse other) {
- if (other == global::Grpc.Health.V1Alpha.HealthCheckResponse.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasStatus) {
- Status = other.Status;
- }
- this.MergeUnknownFields(other.UnknownFields);
- return this;
+ public void MergeFrom(HealthCheckResponse other) {
+ if (other == null) {
+ return;
}
-
- public override Builder MergeFrom(pb::ICodedInputStream input) {
- return MergeFrom(input, pb::ExtensionRegistry.Empty);
+ if (other.Status != global::Grpc.Health.V1Alpha.HealthCheckResponse.Types.ServingStatus.UNKNOWN) {
+ Status = other.Status;
}
+ }
- public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- PrepareBuilder();
- pb::UnknownFieldSet.Builder unknownFields = null;
- uint tag;
- string field_name;
- while (input.ReadTag(out tag, out field_name)) {
- if(tag == 0 && field_name != null) {
- int field_ordinal = global::System.Array.BinarySearch(_healthCheckResponseFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _healthCheckResponseFieldTags[field_ordinal];
- else {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- continue;
- }
- }
- switch (tag) {
- case 0: {
- throw pb::InvalidProtocolBufferException.InvalidTag();
- }
- default: {
- if (pb::WireFormat.IsEndGroupTag(tag)) {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- break;
- }
- case 8: {
- object unknown;
- if(input.ReadEnum(ref result.status_, out unknown)) {
- result.hasStatus = true;
- } else if(unknown is int) {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- unknownFields.MergeVarintField(1, (ulong)(int)unknown);
- }
- break;
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while (input.ReadTag(out tag)) {
+ switch(tag) {
+ case 0:
+ throw pb::InvalidProtocolBufferException.InvalidTag();
+ default:
+ if (pb::WireFormat.IsEndGroupTag(tag)) {
+ return;
}
+ break;
+ case 8: {
+ status_ = (global::Grpc.Health.V1Alpha.HealthCheckResponse.Types.ServingStatus) input.ReadEnum();
+ break;
}
}
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
}
+ }
-
- public bool HasStatus {
- get { return result.hasStatus; }
- }
- public global::Grpc.Health.V1Alpha.HealthCheckResponse.Types.ServingStatus Status {
- get { return result.Status; }
- set { SetStatus(value); }
- }
- public Builder SetStatus(global::Grpc.Health.V1Alpha.HealthCheckResponse.Types.ServingStatus value) {
- PrepareBuilder();
- result.hasStatus = true;
- result.status_ = value;
- return this;
- }
- public Builder ClearStatus() {
- PrepareBuilder();
- result.hasStatus = false;
- result.status_ = global::Grpc.Health.V1Alpha.HealthCheckResponse.Types.ServingStatus.UNKNOWN;
- return this;
+ #region Nested types
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class Types {
+ public enum ServingStatus {
+ UNKNOWN = 0,
+ SERVING = 1,
+ NOT_SERVING = 2,
}
+
}
- static HealthCheckResponse() {
- object.ReferenceEquals(global::Grpc.Health.V1Alpha.Proto.Health.Descriptor, null);
- }
+ #endregion
+
}
#endregion
diff --git a/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj b/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj
index 06a75a3351..b307a0445c 100644
--- a/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj
+++ b/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj
@@ -41,22 +41,6 @@
<Reference Include="BouncyCastle.Crypto">
<HintPath>..\packages\BouncyCastle.1.7.0\lib\Net40-Client\BouncyCastle.Crypto.dll</HintPath>
</Reference>
- <Reference Include="Google.Apis.Auth, Version=1.9.2.27817, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Google.Apis.Auth.1.9.2\lib\net40\Google.Apis.Auth.dll</HintPath>
- </Reference>
- <Reference Include="Google.Apis.Auth.PlatformServices, Version=1.9.2.27820, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Google.Apis.Auth.1.9.2\lib\net40\Google.Apis.Auth.PlatformServices.dll</HintPath>
- </Reference>
- <Reference Include="Google.Apis.Core, Version=1.9.2.27816, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Google.Apis.Core.1.9.2\lib\portable-net40+sl50+win+wpa81+wp80\Google.Apis.Core.dll</HintPath>
- </Reference>
- <Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
- </Reference>
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
</Reference>
@@ -69,14 +53,6 @@
</Reference>
<Reference Include="System.Net" />
<Reference Include="System.Net.Http" />
- <Reference Include="System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll</HintPath>
- </Reference>
- <Reference Include="System.Net.Http.Primitives, Version=4.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll</HintPath>
- </Reference>
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="Microsoft.Threading.Tasks">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
@@ -87,6 +63,27 @@
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
</Reference>
+ <Reference Include="System.Collections.Immutable">
+ <HintPath>..\packages\System.Collections.Immutable.1.1.36\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
+ </Reference>
+ <Reference Include="Google.Apis.Auth">
+ <HintPath>..\packages\Google.Apis.Auth.1.9.2\lib\net40\Google.Apis.Auth.dll</HintPath>
+ </Reference>
+ <Reference Include="Google.Apis.Auth.PlatformServices">
+ <HintPath>..\packages\Google.Apis.Auth.1.9.2\lib\net40\Google.Apis.Auth.PlatformServices.dll</HintPath>
+ </Reference>
+ <Reference Include="Google.Apis.Core">
+ <HintPath>..\packages\Google.Apis.Core.1.9.2\lib\portable-net40+sl50+win+wpa81+wp80\Google.Apis.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="Newtonsoft.Json">
+ <HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Net.Http.Extensions">
+ <HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Net.Http.Primitives">
+ <HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll</HintPath>
+ </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\Grpc.Core\Version.cs">
@@ -102,6 +99,7 @@
<Compile Include="TestCredentials.cs" />
<Compile Include="TestGrpc.cs" />
<Compile Include="SslCredentialsTest.cs" />
+ <Compile Include="Test.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
diff --git a/src/csharp/Grpc.IntegrationTesting/Test.cs b/src/csharp/Grpc.IntegrationTesting/Test.cs
new file mode 100644
index 0000000000..466ec57d3d
--- /dev/null
+++ b/src/csharp/Grpc.IntegrationTesting/Test.cs
@@ -0,0 +1,48 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: test.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Grpc.Testing {
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class Test {
+
+ #region Descriptor
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static Test() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "Cgp0ZXN0LnByb3RvEgxncnBjLnRlc3RpbmcaC2VtcHR5LnByb3RvGg5tZXNz",
+ "YWdlcy5wcm90bzK7BAoLVGVzdFNlcnZpY2USNQoJRW1wdHlDYWxsEhMuZ3Jw",
+ "Yy50ZXN0aW5nLkVtcHR5GhMuZ3JwYy50ZXN0aW5nLkVtcHR5EkYKCVVuYXJ5",
+ "Q2FsbBIbLmdycGMudGVzdGluZy5TaW1wbGVSZXF1ZXN0GhwuZ3JwYy50ZXN0",
+ "aW5nLlNpbXBsZVJlc3BvbnNlEmwKE1N0cmVhbWluZ091dHB1dENhbGwSKC5n",
+ "cnBjLnRlc3RpbmcuU3RyZWFtaW5nT3V0cHV0Q2FsbFJlcXVlc3QaKS5ncnBj",
+ "LnRlc3RpbmcuU3RyZWFtaW5nT3V0cHV0Q2FsbFJlc3BvbnNlMAESaQoSU3Ry",
+ "ZWFtaW5nSW5wdXRDYWxsEicuZ3JwYy50ZXN0aW5nLlN0cmVhbWluZ0lucHV0",
+ "Q2FsbFJlcXVlc3QaKC5ncnBjLnRlc3RpbmcuU3RyZWFtaW5nSW5wdXRDYWxs",
+ "UmVzcG9uc2UoARJpCg5GdWxsRHVwbGV4Q2FsbBIoLmdycGMudGVzdGluZy5T",
+ "dHJlYW1pbmdPdXRwdXRDYWxsUmVxdWVzdBopLmdycGMudGVzdGluZy5TdHJl",
+ "YW1pbmdPdXRwdXRDYWxsUmVzcG9uc2UoATABEmkKDkhhbGZEdXBsZXhDYWxs",
+ "EiguZ3JwYy50ZXN0aW5nLlN0cmVhbWluZ091dHB1dENhbGxSZXF1ZXN0Giku",
+ "Z3JwYy50ZXN0aW5nLlN0cmVhbWluZ091dHB1dENhbGxSZXNwb25zZSgBMAFi",
+ "BnByb3RvMw=="));
+ descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
+ new pbr::FileDescriptor[] { global::Grpc.Testing.Proto.Empty.Descriptor, global::Grpc.Testing.Messages.Descriptor, },
+ new pbr::GeneratedCodeInfo(null, null));
+ }
+ #endregion
+
+ }
+}
+
+#endregion Designer generated code
diff --git a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs
index 697acb53d8..522372582b 100644
--- a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs
+++ b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs
@@ -7,55 +7,55 @@ using System.Threading;
using System.Threading.Tasks;
using Grpc.Core;
-namespace grpc.testing {
+namespace Grpc.Testing {
public static class TestService
{
static readonly string __ServiceName = "grpc.testing.TestService";
- static readonly Marshaller<global::grpc.testing.Empty> __Marshaller_Empty = Marshallers.Create((arg) => arg.ToByteArray(), global::grpc.testing.Empty.ParseFrom);
- static readonly Marshaller<global::grpc.testing.SimpleRequest> __Marshaller_SimpleRequest = Marshallers.Create((arg) => arg.ToByteArray(), global::grpc.testing.SimpleRequest.ParseFrom);
- static readonly Marshaller<global::grpc.testing.SimpleResponse> __Marshaller_SimpleResponse = Marshallers.Create((arg) => arg.ToByteArray(), global::grpc.testing.SimpleResponse.ParseFrom);
- static readonly Marshaller<global::grpc.testing.StreamingOutputCallRequest> __Marshaller_StreamingOutputCallRequest = Marshallers.Create((arg) => arg.ToByteArray(), global::grpc.testing.StreamingOutputCallRequest.ParseFrom);
- static readonly Marshaller<global::grpc.testing.StreamingOutputCallResponse> __Marshaller_StreamingOutputCallResponse = Marshallers.Create((arg) => arg.ToByteArray(), global::grpc.testing.StreamingOutputCallResponse.ParseFrom);
- static readonly Marshaller<global::grpc.testing.StreamingInputCallRequest> __Marshaller_StreamingInputCallRequest = Marshallers.Create((arg) => arg.ToByteArray(), global::grpc.testing.StreamingInputCallRequest.ParseFrom);
- static readonly Marshaller<global::grpc.testing.StreamingInputCallResponse> __Marshaller_StreamingInputCallResponse = Marshallers.Create((arg) => arg.ToByteArray(), global::grpc.testing.StreamingInputCallResponse.ParseFrom);
+ static readonly Marshaller<global::Grpc.Testing.Empty> __Marshaller_Empty = Marshallers.Create((arg) => arg.ToByteArray(), global::Grpc.Testing.Empty.ParseFrom);
+ static readonly Marshaller<global::Grpc.Testing.SimpleRequest> __Marshaller_SimpleRequest = Marshallers.Create((arg) => arg.ToByteArray(), global::Grpc.Testing.SimpleRequest.ParseFrom);
+ static readonly Marshaller<global::Grpc.Testing.SimpleResponse> __Marshaller_SimpleResponse = Marshallers.Create((arg) => arg.ToByteArray(), global::Grpc.Testing.SimpleResponse.ParseFrom);
+ static readonly Marshaller<global::Grpc.Testing.StreamingOutputCallRequest> __Marshaller_StreamingOutputCallRequest = Marshallers.Create((arg) => arg.ToByteArray(), global::Grpc.Testing.StreamingOutputCallRequest.ParseFrom);
+ static readonly Marshaller<global::Grpc.Testing.StreamingOutputCallResponse> __Marshaller_StreamingOutputCallResponse = Marshallers.Create((arg) => arg.ToByteArray(), global::Grpc.Testing.StreamingOutputCallResponse.ParseFrom);
+ static readonly Marshaller<global::Grpc.Testing.StreamingInputCallRequest> __Marshaller_StreamingInputCallRequest = Marshallers.Create((arg) => arg.ToByteArray(), global::Grpc.Testing.StreamingInputCallRequest.ParseFrom);
+ static readonly Marshaller<global::Grpc.Testing.StreamingInputCallResponse> __Marshaller_StreamingInputCallResponse = Marshallers.Create((arg) => arg.ToByteArray(), global::Grpc.Testing.StreamingInputCallResponse.ParseFrom);
- static readonly Method<global::grpc.testing.Empty, global::grpc.testing.Empty> __Method_EmptyCall = new Method<global::grpc.testing.Empty, global::grpc.testing.Empty>(
+ static readonly Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty> __Method_EmptyCall = new Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(
MethodType.Unary,
__ServiceName,
"EmptyCall",
__Marshaller_Empty,
__Marshaller_Empty);
- static readonly Method<global::grpc.testing.SimpleRequest, global::grpc.testing.SimpleResponse> __Method_UnaryCall = new Method<global::grpc.testing.SimpleRequest, global::grpc.testing.SimpleResponse>(
+ static readonly Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_UnaryCall = new Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>(
MethodType.Unary,
__ServiceName,
"UnaryCall",
__Marshaller_SimpleRequest,
__Marshaller_SimpleResponse);
- static readonly Method<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse> __Method_StreamingOutputCall = new Method<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse>(
+ static readonly Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> __Method_StreamingOutputCall = new Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>(
MethodType.ServerStreaming,
__ServiceName,
"StreamingOutputCall",
__Marshaller_StreamingOutputCallRequest,
__Marshaller_StreamingOutputCallResponse);
- static readonly Method<global::grpc.testing.StreamingInputCallRequest, global::grpc.testing.StreamingInputCallResponse> __Method_StreamingInputCall = new Method<global::grpc.testing.StreamingInputCallRequest, global::grpc.testing.StreamingInputCallResponse>(
+ static readonly Method<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> __Method_StreamingInputCall = new Method<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse>(
MethodType.ClientStreaming,
__ServiceName,
"StreamingInputCall",
__Marshaller_StreamingInputCallRequest,
__Marshaller_StreamingInputCallResponse);
- static readonly Method<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse> __Method_FullDuplexCall = new Method<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse>(
+ static readonly Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> __Method_FullDuplexCall = new Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>(
MethodType.DuplexStreaming,
__ServiceName,
"FullDuplexCall",
__Marshaller_StreamingOutputCallRequest,
__Marshaller_StreamingOutputCallResponse);
- static readonly Method<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse> __Method_HalfDuplexCall = new Method<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse>(
+ static readonly Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> __Method_HalfDuplexCall = new Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>(
MethodType.DuplexStreaming,
__ServiceName,
"HalfDuplexCall",
@@ -65,6 +65,7 @@ namespace grpc.testing {
// client interface
public interface ITestServiceClient
{
+<<<<<<< HEAD
global::grpc.testing.Empty EmptyCall(global::grpc.testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
global::grpc.testing.Empty EmptyCall(global::grpc.testing.Empty request, CallOptions options);
AsyncUnaryCall<global::grpc.testing.Empty> EmptyCallAsync(global::grpc.testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
@@ -81,17 +82,27 @@ namespace grpc.testing {
AsyncDuplexStreamingCall<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse> FullDuplexCall(CallOptions options);
AsyncDuplexStreamingCall<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse> HalfDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
AsyncDuplexStreamingCall<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse> HalfDuplexCall(CallOptions options);
+=======
+ global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
+ AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
+ global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
+ AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
+ AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
+ AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
+ AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
+ AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
+>>>>>>> 708e8de... regenerate protos
}
// server-side interface
public interface ITestService
{
- Task<global::grpc.testing.Empty> EmptyCall(global::grpc.testing.Empty request, ServerCallContext context);
- Task<global::grpc.testing.SimpleResponse> UnaryCall(global::grpc.testing.SimpleRequest request, ServerCallContext context);
- Task StreamingOutputCall(global::grpc.testing.StreamingOutputCallRequest request, IServerStreamWriter<global::grpc.testing.StreamingOutputCallResponse> responseStream, ServerCallContext context);
- Task<global::grpc.testing.StreamingInputCallResponse> StreamingInputCall(IAsyncStreamReader<global::grpc.testing.StreamingInputCallRequest> requestStream, ServerCallContext context);
- Task FullDuplexCall(IAsyncStreamReader<global::grpc.testing.StreamingOutputCallRequest> requestStream, IServerStreamWriter<global::grpc.testing.StreamingOutputCallResponse> responseStream, ServerCallContext context);
- Task HalfDuplexCall(IAsyncStreamReader<global::grpc.testing.StreamingOutputCallRequest> requestStream, IServerStreamWriter<global::grpc.testing.StreamingOutputCallResponse> responseStream, ServerCallContext context);
+ Task<global::Grpc.Testing.Empty> EmptyCall(global::Grpc.Testing.Empty request, ServerCallContext context);
+ Task<global::Grpc.Testing.SimpleResponse> UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context);
+ Task StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context);
+ Task<global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(IAsyncStreamReader<global::Grpc.Testing.StreamingInputCallRequest> requestStream, ServerCallContext context);
+ Task FullDuplexCall(IAsyncStreamReader<global::Grpc.Testing.StreamingOutputCallRequest> requestStream, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context);
+ Task HalfDuplexCall(IAsyncStreamReader<global::Grpc.Testing.StreamingOutputCallRequest> requestStream, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context);
}
// client stub
@@ -100,7 +111,7 @@ namespace grpc.testing {
public TestServiceClient(Channel channel) : base(channel)
{
}
- public global::grpc.testing.Empty EmptyCall(global::grpc.testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
+ public global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
var call = CreateCall(__Method_EmptyCall, new CallOptions(headers, deadline, cancellationToken));
return Calls.BlockingUnaryCall(call, request);
@@ -110,7 +121,7 @@ namespace grpc.testing {
var call = CreateCall(__Method_EmptyCall, options);
return Calls.BlockingUnaryCall(call, request);
}
- public AsyncUnaryCall<global::grpc.testing.Empty> EmptyCallAsync(global::grpc.testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
+ public AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
var call = CreateCall(__Method_EmptyCall, new CallOptions(headers, deadline, cancellationToken));
return Calls.AsyncUnaryCall(call, request);
@@ -120,7 +131,7 @@ namespace grpc.testing {
var call = CreateCall(__Method_EmptyCall, options);
return Calls.AsyncUnaryCall(call, request);
}
- public global::grpc.testing.SimpleResponse UnaryCall(global::grpc.testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
+ public global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
var call = CreateCall(__Method_UnaryCall, new CallOptions(headers, deadline, cancellationToken));
return Calls.BlockingUnaryCall(call, request);
@@ -130,7 +141,7 @@ namespace grpc.testing {
var call = CreateCall(__Method_UnaryCall, options);
return Calls.BlockingUnaryCall(call, request);
}
- public AsyncUnaryCall<global::grpc.testing.SimpleResponse> UnaryCallAsync(global::grpc.testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
+ public AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
var call = CreateCall(__Method_UnaryCall, new CallOptions(headers, deadline, cancellationToken));
return Calls.AsyncUnaryCall(call, request);
@@ -140,7 +151,7 @@ namespace grpc.testing {
var call = CreateCall(__Method_UnaryCall, options);
return Calls.AsyncUnaryCall(call, request);
}
- public AsyncServerStreamingCall<global::grpc.testing.StreamingOutputCallResponse> StreamingOutputCall(global::grpc.testing.StreamingOutputCallRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
+ public AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
var call = CreateCall(__Method_StreamingOutputCall, new CallOptions(headers, deadline, cancellationToken));
return Calls.AsyncServerStreamingCall(call, request);
@@ -150,7 +161,7 @@ namespace grpc.testing {
var call = CreateCall(__Method_StreamingOutputCall, options);
return Calls.AsyncServerStreamingCall(call, request);
}
- public AsyncClientStreamingCall<global::grpc.testing.StreamingInputCallRequest, global::grpc.testing.StreamingInputCallResponse> StreamingInputCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
+ public AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
var call = CreateCall(__Method_StreamingInputCall, new CallOptions(headers, deadline, cancellationToken));
return Calls.AsyncClientStreamingCall(call);
@@ -160,7 +171,7 @@ namespace grpc.testing {
var call = CreateCall(__Method_StreamingInputCall, options);
return Calls.AsyncClientStreamingCall(call);
}
- public AsyncDuplexStreamingCall<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse> FullDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
+ public AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
var call = CreateCall(__Method_FullDuplexCall, new CallOptions(headers, deadline, cancellationToken));
return Calls.AsyncDuplexStreamingCall(call);
@@ -170,7 +181,7 @@ namespace grpc.testing {
var call = CreateCall(__Method_FullDuplexCall, options);
return Calls.AsyncDuplexStreamingCall(call);
}
- public AsyncDuplexStreamingCall<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse> HalfDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
+ public AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
var call = CreateCall(__Method_HalfDuplexCall, new CallOptions(headers, deadline, cancellationToken));
return Calls.AsyncDuplexStreamingCall(call);