Merge pull request #13739 from jtattermusch/csharp_gen_header

C# plugin should add auto-generated header for generated files.
pull/13753/head
Jan Tattermusch 7 years ago committed by GitHub
commit 414e955c39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/compiler/csharp_generator.cc
  2. 6
      src/csharp/Grpc.Examples/MathGrpc.cs
  3. 6
      src/csharp/Grpc.HealthCheck/HealthGrpc.cs
  4. 30
      src/csharp/Grpc.IntegrationTesting/Control.cs
  5. 623
      src/csharp/Grpc.IntegrationTesting/CoreStats/Stats.cs
  6. 48
      src/csharp/Grpc.IntegrationTesting/EchoMessages.cs
  7. 6
      src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs
  8. 15
      src/csharp/Grpc.IntegrationTesting/Payloads.cs
  9. 41
      src/csharp/Grpc.IntegrationTesting/Services.cs
  10. 6
      src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs
  11. 110
      src/csharp/Grpc.IntegrationTesting/Stats.cs
  12. 6
      src/csharp/Grpc.IntegrationTesting/TestGrpc.cs
  13. 25
      src/csharp/Grpc.Reflection/Reflection.cs
  14. 6
      src/csharp/Grpc.Reflection/ReflectionGrpc.cs

@ -659,8 +659,11 @@ grpc::string GetServices(const FileDescriptor* file, bool generate_client,
}
// Write out a file header.
out.Print("// Generated by the protocol buffer compiler. DO NOT EDIT!\n");
out.Print("// source: $filename$\n", "filename", file->name());
out.Print("// <auto-generated>\n");
out.Print(
"// Generated by the protocol buffer compiler. DO NOT EDIT!\n");
out.Print("// source: $filename$\n", "filename", file->name());
out.Print("// </auto-generated>\n");
// use C++ style as there are no file-level XML comments in .NET
grpc::string leading_comments = GetCsharpComments(file, true);

@ -1,5 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: math/math.proto
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: math/math.proto
// </auto-generated>
// Original file comments:
// Copyright 2015 gRPC authors.
//

@ -1,5 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/health/v1/health.proto
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/health/v1/health.proto
// </auto-generated>
// Original file comments:
// Copyright 2015 gRPC authors.
//

@ -522,10 +522,16 @@ namespace Grpc.Testing {
}
switch (other.LoadCase) {
case LoadOneofCase.ClosedLoop:
ClosedLoop = other.ClosedLoop;
if (ClosedLoop == null) {
ClosedLoop = new global::Grpc.Testing.ClosedLoopParams();
}
ClosedLoop.MergeFrom(other.ClosedLoop);
break;
case LoadOneofCase.Poisson:
Poisson = other.Poisson;
if (Poisson == null) {
Poisson = new global::Grpc.Testing.PoissonParams();
}
Poisson.MergeFrom(other.Poisson);
break;
}
@ -1901,10 +1907,16 @@ namespace Grpc.Testing {
}
switch (other.ArgtypeCase) {
case ArgtypeOneofCase.Setup:
Setup = other.Setup;
if (Setup == null) {
Setup = new global::Grpc.Testing.ClientConfig();
}
Setup.MergeFrom(other.Setup);
break;
case ArgtypeOneofCase.Mark:
Mark = other.Mark;
if (Mark == null) {
Mark = new global::Grpc.Testing.Mark();
}
Mark.MergeFrom(other.Mark);
break;
}
@ -2508,10 +2520,16 @@ namespace Grpc.Testing {
}
switch (other.ArgtypeCase) {
case ArgtypeOneofCase.Setup:
Setup = other.Setup;
if (Setup == null) {
Setup = new global::Grpc.Testing.ServerConfig();
}
Setup.MergeFrom(other.Setup);
break;
case ArgtypeOneofCase.Mark:
Mark = other.Mark;
if (Mark == null) {
Mark = new global::Grpc.Testing.Mark();
}
Mark.MergeFrom(other.Mark);
break;
}

@ -0,0 +1,623 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/core/stats.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.Core {
/// <summary>Holder for reflection information generated from grpc/core/stats.proto</summary>
public static partial class StatsReflection {
#region Descriptor
/// <summary>File descriptor for grpc/core/stats.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static StatsReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChVncnBjL2NvcmUvc3RhdHMucHJvdG8SCWdycGMuY29yZSImCgZCdWNrZXQS",
"DQoFc3RhcnQYASABKAESDQoFY291bnQYAiABKAQiLwoJSGlzdG9ncmFtEiIK",
"B2J1Y2tldHMYASADKAsyES5ncnBjLmNvcmUuQnVja2V0IlsKBk1ldHJpYxIM",
"CgRuYW1lGAEgASgJEg8KBWNvdW50GAogASgESAASKQoJaGlzdG9ncmFtGAsg",
"ASgLMhQuZ3JwYy5jb3JlLkhpc3RvZ3JhbUgAQgcKBXZhbHVlIisKBVN0YXRz",
"EiIKB21ldHJpY3MYASADKAsyES5ncnBjLmNvcmUuTWV0cmljYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Core.Bucket), global::Grpc.Core.Bucket.Parser, new[]{ "Start", "Count" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Core.Histogram), global::Grpc.Core.Histogram.Parser, new[]{ "Buckets" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Core.Metric), global::Grpc.Core.Metric.Parser, new[]{ "Name", "Count", "Histogram" }, new[]{ "Value" }, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Core.Stats), global::Grpc.Core.Stats.Parser, new[]{ "Metrics" }, null, null, null)
}));
}
#endregion
}
#region Messages
public sealed partial class Bucket : pb::IMessage<Bucket> {
private static readonly pb::MessageParser<Bucket> _parser = new pb::MessageParser<Bucket>(() => new Bucket());
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<Bucket> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Grpc.Core.StatsReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Bucket() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Bucket(Bucket other) : this() {
start_ = other.start_;
count_ = other.count_;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Bucket Clone() {
return new Bucket(this);
}
/// <summary>Field number for the "start" field.</summary>
public const int StartFieldNumber = 1;
private double start_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public double Start {
get { return start_; }
set {
start_ = value;
}
}
/// <summary>Field number for the "count" field.</summary>
public const int CountFieldNumber = 2;
private ulong count_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ulong Count {
get { return count_; }
set {
count_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as Bucket);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(Bucket other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Start != other.Start) return false;
if (Count != other.Count) return false;
return true;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (Start != 0D) hash ^= Start.GetHashCode();
if (Count != 0UL) hash ^= Count.GetHashCode();
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (Start != 0D) {
output.WriteRawTag(9);
output.WriteDouble(Start);
}
if (Count != 0UL) {
output.WriteRawTag(16);
output.WriteUInt64(Count);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (Start != 0D) {
size += 1 + 8;
}
if (Count != 0UL) {
size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Count);
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(Bucket other) {
if (other == null) {
return;
}
if (other.Start != 0D) {
Start = other.Start;
}
if (other.Count != 0UL) {
Count = other.Count;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 9: {
Start = input.ReadDouble();
break;
}
case 16: {
Count = input.ReadUInt64();
break;
}
}
}
}
}
public sealed partial class Histogram : pb::IMessage<Histogram> {
private static readonly pb::MessageParser<Histogram> _parser = new pb::MessageParser<Histogram>(() => new Histogram());
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<Histogram> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Grpc.Core.StatsReflection.Descriptor.MessageTypes[1]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Histogram() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Histogram(Histogram other) : this() {
buckets_ = other.buckets_.Clone();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Histogram Clone() {
return new Histogram(this);
}
/// <summary>Field number for the "buckets" field.</summary>
public const int BucketsFieldNumber = 1;
private static readonly pb::FieldCodec<global::Grpc.Core.Bucket> _repeated_buckets_codec
= pb::FieldCodec.ForMessage(10, global::Grpc.Core.Bucket.Parser);
private readonly pbc::RepeatedField<global::Grpc.Core.Bucket> buckets_ = new pbc::RepeatedField<global::Grpc.Core.Bucket>();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Grpc.Core.Bucket> Buckets {
get { return buckets_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as Histogram);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(Histogram other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if(!buckets_.Equals(other.buckets_)) return false;
return true;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
hash ^= buckets_.GetHashCode();
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
buckets_.WriteTo(output, _repeated_buckets_codec);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
size += buckets_.CalculateSize(_repeated_buckets_codec);
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(Histogram other) {
if (other == null) {
return;
}
buckets_.Add(other.buckets_);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 10: {
buckets_.AddEntriesFrom(input, _repeated_buckets_codec);
break;
}
}
}
}
}
public sealed partial class Metric : pb::IMessage<Metric> {
private static readonly pb::MessageParser<Metric> _parser = new pb::MessageParser<Metric>(() => new Metric());
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<Metric> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Grpc.Core.StatsReflection.Descriptor.MessageTypes[2]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Metric() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Metric(Metric other) : this() {
name_ = other.name_;
switch (other.ValueCase) {
case ValueOneofCase.Count:
Count = other.Count;
break;
case ValueOneofCase.Histogram:
Histogram = other.Histogram.Clone();
break;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Metric Clone() {
return new Metric(this);
}
/// <summary>Field number for the "name" field.</summary>
public const int NameFieldNumber = 1;
private string name_ = "";
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Name {
get { return name_; }
set {
name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "count" field.</summary>
public const int CountFieldNumber = 10;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ulong Count {
get { return valueCase_ == ValueOneofCase.Count ? (ulong) value_ : 0UL; }
set {
value_ = value;
valueCase_ = ValueOneofCase.Count;
}
}
/// <summary>Field number for the "histogram" field.</summary>
public const int HistogramFieldNumber = 11;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Grpc.Core.Histogram Histogram {
get { return valueCase_ == ValueOneofCase.Histogram ? (global::Grpc.Core.Histogram) value_ : null; }
set {
value_ = value;
valueCase_ = value == null ? ValueOneofCase.None : ValueOneofCase.Histogram;
}
}
private object value_;
/// <summary>Enum of possible cases for the "value" oneof.</summary>
public enum ValueOneofCase {
None = 0,
Count = 10,
Histogram = 11,
}
private ValueOneofCase valueCase_ = ValueOneofCase.None;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ValueOneofCase ValueCase {
get { return valueCase_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void ClearValue() {
valueCase_ = ValueOneofCase.None;
value_ = null;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as Metric);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(Metric other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Name != other.Name) return false;
if (Count != other.Count) return false;
if (!object.Equals(Histogram, other.Histogram)) return false;
if (ValueCase != other.ValueCase) return false;
return true;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (Name.Length != 0) hash ^= Name.GetHashCode();
if (valueCase_ == ValueOneofCase.Count) hash ^= Count.GetHashCode();
if (valueCase_ == ValueOneofCase.Histogram) hash ^= Histogram.GetHashCode();
hash ^= (int) valueCase_;
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (Name.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Name);
}
if (valueCase_ == ValueOneofCase.Count) {
output.WriteRawTag(80);
output.WriteUInt64(Count);
}
if (valueCase_ == ValueOneofCase.Histogram) {
output.WriteRawTag(90);
output.WriteMessage(Histogram);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (Name.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
}
if (valueCase_ == ValueOneofCase.Count) {
size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Count);
}
if (valueCase_ == ValueOneofCase.Histogram) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Histogram);
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(Metric other) {
if (other == null) {
return;
}
if (other.Name.Length != 0) {
Name = other.Name;
}
switch (other.ValueCase) {
case ValueOneofCase.Count:
Count = other.Count;
break;
case ValueOneofCase.Histogram:
if (Histogram == null) {
Histogram = new global::Grpc.Core.Histogram();
}
Histogram.MergeFrom(other.Histogram);
break;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 10: {
Name = input.ReadString();
break;
}
case 80: {
Count = input.ReadUInt64();
break;
}
case 90: {
global::Grpc.Core.Histogram subBuilder = new global::Grpc.Core.Histogram();
if (valueCase_ == ValueOneofCase.Histogram) {
subBuilder.MergeFrom(Histogram);
}
input.ReadMessage(subBuilder);
Histogram = subBuilder;
break;
}
}
}
}
}
public sealed partial class Stats : pb::IMessage<Stats> {
private static readonly pb::MessageParser<Stats> _parser = new pb::MessageParser<Stats>(() => new Stats());
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<Stats> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Grpc.Core.StatsReflection.Descriptor.MessageTypes[3]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Stats() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Stats(Stats other) : this() {
metrics_ = other.metrics_.Clone();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Stats Clone() {
return new Stats(this);
}
/// <summary>Field number for the "metrics" field.</summary>
public const int MetricsFieldNumber = 1;
private static readonly pb::FieldCodec<global::Grpc.Core.Metric> _repeated_metrics_codec
= pb::FieldCodec.ForMessage(10, global::Grpc.Core.Metric.Parser);
private readonly pbc::RepeatedField<global::Grpc.Core.Metric> metrics_ = new pbc::RepeatedField<global::Grpc.Core.Metric>();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Grpc.Core.Metric> Metrics {
get { return metrics_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as Stats);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(Stats other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if(!metrics_.Equals(other.metrics_)) return false;
return true;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
hash ^= metrics_.GetHashCode();
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
metrics_.WriteTo(output, _repeated_metrics_codec);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
size += metrics_.CalculateSize(_repeated_metrics_codec);
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(Stats other) {
if (other == null) {
return;
}
metrics_.Add(other.metrics_);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 10: {
metrics_.AddEntriesFrom(input, _repeated_metrics_codec);
break;
}
}
}
}
}
#endregion
}
#endregion Designer generated code

@ -26,7 +26,7 @@ namespace Grpc.Testing {
"DGdycGMudGVzdGluZyIyCglEZWJ1Z0luZm8SFQoNc3RhY2tfZW50cmllcxgB",
"IAMoCRIOCgZkZXRhaWwYAiABKAkiUAoLRXJyb3JTdGF0dXMSDAoEY29kZRgB",
"IAEoBRIVCg1lcnJvcl9tZXNzYWdlGAIgASgJEhwKFGJpbmF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GMudGVzdGluZy5SZXF1ZXN0UGFyYW1zIkYKDlJlc3BvbnNl",
"UGFyYW1zEhgKEHJlcXVlc3RfZGVhZGxpbmUYASABKAMSDAoEaG9zdBgCIAEo",
"CRIMCgRwZWVyGAMgASgJIkwKDEVjaG9SZXNwb25zZRIPCgdtZXNzYWdlGAEg",
"ASgJEisKBXBhcmFtGAIgASgLMhwuZ3JwYy50ZXN0aW5nLlJlc3BvbnNlUGFy",
"YW1zYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.DebugInfo), global::Grpc.Testing.DebugInfo.Parser, new[]{ "StackEntries", "Detail" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ErrorStatus), global::Grpc.Testing.ErrorStatus.Parser, new[]{ "Code", "ErrorMessage", "BinaryErrorDetails" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.RequestParams), global::Grpc.Testing.RequestParams.Parser, new[]{ "EchoDeadline", "ClientCancelAfterUs", "ServerCancelAfterUs", "EchoMetadata", "CheckAuthContext", "ResponseMessageLength", "EchoPeer", "ExpectedClientIdentity", "SkipCancelledCheck", "ExpectedTransportSecurityType", "DebugInfo", "ServerDie", "BinaryErrorDetails", "ExpectedError" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.RequestParams), global::Grpc.Testing.RequestParams.Parser, new[]{ "EchoDeadline", "ClientCancelAfterUs", "ServerCancelAfterUs", "EchoMetadata", "CheckAuthContext", "ResponseMessageLength", "EchoPeer", "ExpectedClientIdentity", "SkipCancelledCheck", "ExpectedTransportSecurityType", "DebugInfo", "ServerDie", "BinaryErrorDetails", "ExpectedError", "ServerSleepUs" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.EchoRequest), global::Grpc.Testing.EchoRequest.Parser, new[]{ "Message", "Param" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ResponseParams), global::Grpc.Testing.ResponseParams.Parser, new[]{ "RequestDeadline", "Host", "Peer" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.EchoResponse), global::Grpc.Testing.EchoResponse.Parser, new[]{ "Message", "Param" }, null, null, null)
@ -411,6 +412,7 @@ namespace Grpc.Testing {
serverDie_ = other.serverDie_;
binaryErrorDetails_ = other.binaryErrorDetails_;
ExpectedError = other.expectedError_ != null ? other.ExpectedError.Clone() : null;
serverSleepUs_ = other.serverSleepUs_;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -578,6 +580,20 @@ namespace Grpc.Testing {
}
}
/// <summary>Field number for the "server_sleep_us" field.</summary>
public const int ServerSleepUsFieldNumber = 15;
private int serverSleepUs_;
/// <summary>
/// Amount to sleep when invoking server
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int ServerSleepUs {
get { return serverSleepUs_; }
set {
serverSleepUs_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as RequestParams);
@ -605,6 +621,7 @@ namespace Grpc.Testing {
if (ServerDie != other.ServerDie) return false;
if (BinaryErrorDetails != other.BinaryErrorDetails) return false;
if (!object.Equals(ExpectedError, other.ExpectedError)) return false;
if (ServerSleepUs != other.ServerSleepUs) return false;
return true;
}
@ -625,6 +642,7 @@ namespace Grpc.Testing {
if (ServerDie != false) hash ^= ServerDie.GetHashCode();
if (BinaryErrorDetails.Length != 0) hash ^= BinaryErrorDetails.GetHashCode();
if (expectedError_ != null) hash ^= ExpectedError.GetHashCode();
if (ServerSleepUs != 0) hash ^= ServerSleepUs.GetHashCode();
return hash;
}
@ -691,6 +709,10 @@ namespace Grpc.Testing {
output.WriteRawTag(114);
output.WriteMessage(ExpectedError);
}
if (ServerSleepUs != 0) {
output.WriteRawTag(120);
output.WriteInt32(ServerSleepUs);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -738,6 +760,9 @@ namespace Grpc.Testing {
if (expectedError_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(ExpectedError);
}
if (ServerSleepUs != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(ServerSleepUs);
}
return size;
}
@ -794,6 +819,9 @@ namespace Grpc.Testing {
}
ExpectedError.MergeFrom(other.ExpectedError);
}
if (other.ServerSleepUs != 0) {
ServerSleepUs = other.ServerSleepUs;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -866,6 +894,10 @@ namespace Grpc.Testing {
input.ReadMessage(expectedError_);
break;
}
case 120: {
ServerSleepUs = input.ReadInt32();
break;
}
}
}
}

@ -1,5 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: src/proto/grpc/testing/metrics.proto
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: src/proto/grpc/testing/metrics.proto
// </auto-generated>
// Original file comments:
// Copyright 2015-2016 gRPC authors.
//

@ -596,13 +596,22 @@ namespace Grpc.Testing {
}
switch (other.PayloadCase) {
case PayloadOneofCase.BytebufParams:
BytebufParams = other.BytebufParams;
if (BytebufParams == null) {
BytebufParams = new global::Grpc.Testing.ByteBufferParams();
}
BytebufParams.MergeFrom(other.BytebufParams);
break;
case PayloadOneofCase.SimpleParams:
SimpleParams = other.SimpleParams;
if (SimpleParams == null) {
SimpleParams = new global::Grpc.Testing.SimpleProtoParams();
}
SimpleParams.MergeFrom(other.SimpleParams);
break;
case PayloadOneofCase.ComplexParams:
ComplexParams = other.ComplexParams;
if (ComplexParams == null) {
ComplexParams = new global::Grpc.Testing.ComplexProtoParams();
}
ComplexParams.MergeFrom(other.ComplexParams);
break;
}

@ -24,28 +24,27 @@ namespace Grpc.Testing {
string.Concat(
"CiVzcmMvcHJvdG8vZ3JwY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R1cygBMAESRQoJUnVuQ2xpZW50EhguZ3JwYy50ZXN0aW5nLkNs",
"aWVudEFyZ3MaGi5ncnBjLnRlc3RpbmcuQ2xpZW50U3RhdHVzKAEwARJCCglD",
"b3JlQ291bnQSGS5ncnBjLnRlc3RpbmcuQ29yZVJlcXVlc3QaGi5ncnBjLnRl",
"c3RpbmcuQ29yZVJlc3BvbnNlEjQKClF1aXRXb3JrZXISEi5ncnBjLnRlc3Rp",
"bmcuVm9pZBoSLmdycGMudGVzdGluZy5Wb2lkMl4KGFJlcG9ydFFwc1NjZW5h",
"cmlvU2VydmljZRJCCg5SZXBvcnRTY2VuYXJpbxIcLmdycGMudGVzdGluZy5T",
"Y2VuYXJpb1Jlc3VsdBoSLmdycGMudGVzdGluZy5Wb2lkYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Grpc.Testing.MessagesReflection.Descriptor, global::Grpc.Testing.ControlReflection.Descriptor, global::Grpc.Testing.StatsReflection.Descriptor, },
new pbr::FileDescriptor[] { global::Grpc.Testing.MessagesReflection.Descriptor, global::Grpc.Testing.ControlReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, null));
}
#endregion

@ -1,5 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: src/proto/grpc/testing/services.proto
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: src/proto/grpc/testing/services.proto
// </auto-generated>
// Original file comments:
// Copyright 2015 gRPC authors.
//

@ -23,28 +23,30 @@ namespace Grpc.Testing {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CiJzcmMvcHJvdG8vZ3JwYy90ZXN0aW5nL3N0YXRzLnByb3RvEgxncnBjLnRl",
"c3RpbmcikQEKC1NlcnZlclN0YXRzEhQKDHRpbWVfZWxhcHNlZBgBIAEoARIR",
"Cgl0aW1lX3VzZXIYAiABKAESEwoLdGltZV9zeXN0ZW0YAyABKAESFgoO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IKCnJlc29sdXRpb24YASABKAESFAoMbWF4",
"X3Bvc3NpYmxlGAIgASgBIncKDUhpc3RvZ3JhbURhdGESDgoGYnVja2V0GAEg",
"AygNEhAKCG1pbl9zZWVuGAIgASgBEhAKCG1heF9zZWVuGAMgASgBEgsKA3N1",
"bRgEIAEoARIWCg5zdW1fb2Zfc3F1YXJlcxgFIAEoARINCgVjb3VudBgGIAEo",
"ASI4ChJSZXF1ZXN0UmVzdWx0Q291bnQSEwoLc3RhdHVzX2NvZGUYASABKAUS",
"DQoFY291bnQYAiABKAMi8wEKC0NsaWVudFN0YXRzEi4KCWxhdGVuY2llcxgB",
"IAEoCzIbLmdycGMudGVzdGluZy5IaXN0b2dyYW1EYXRhEhQKDHRpbWVfZWxh",
"cHNlZBgCIAEoARIRCgl0aW1lX3VzZXIYAyABKAESEwoLdGltZV9zeXN0ZW0Y",
"BCABKAESOQoPcmVxdWVzdF9yZXN1bHRzGAUgAygLMiAuZ3JwYy50ZXN0aW5n",
"LlJlcXVlc3RSZXN1bHRDb3VudBIVCg1jcV9wb2xsX2NvdW50GAYgASgEEiQK",
"CmNvcmVfc3RhdHMYByABKAsyEC5ncnBjLmNvcmUuU3RhdHNiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::FileDescriptor[] { global::Grpc.Core.StatsReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ServerStats), global::Grpc.Testing.ServerStats.Parser, new[]{ "TimeElapsed", "TimeUser", "TimeSystem", "TotalCpuTime", "IdleCpuTime", "CqPollCount" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ServerStats), global::Grpc.Testing.ServerStats.Parser, new[]{ "TimeElapsed", "TimeUser", "TimeSystem", "TotalCpuTime", "IdleCpuTime", "CqPollCount", "CoreStats" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.HistogramParams), global::Grpc.Testing.HistogramParams.Parser, new[]{ "Resolution", "MaxPossible" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.HistogramData), global::Grpc.Testing.HistogramData.Parser, new[]{ "Bucket", "MinSeen", "MaxSeen", "Sum", "SumOfSquares", "Count" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.RequestResultCount), global::Grpc.Testing.RequestResultCount.Parser, new[]{ "StatusCode", "Count" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ClientStats), global::Grpc.Testing.ClientStats.Parser, new[]{ "Latencies", "TimeElapsed", "TimeUser", "TimeSystem", "RequestResults", "CqPollCount" }, null, null, null)
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ClientStats), global::Grpc.Testing.ClientStats.Parser, new[]{ "Latencies", "TimeElapsed", "TimeUser", "TimeSystem", "RequestResults", "CqPollCount", "CoreStats" }, null, null, null)
}));
}
#endregion
@ -81,6 +83,7 @@ namespace Grpc.Testing {
totalCpuTime_ = other.totalCpuTime_;
idleCpuTime_ = other.idleCpuTime_;
cqPollCount_ = other.cqPollCount_;
CoreStats = other.coreStats_ != null ? other.CoreStats.Clone() : null;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -173,6 +176,20 @@ namespace Grpc.Testing {
}
}
/// <summary>Field number for the "core_stats" field.</summary>
public const int CoreStatsFieldNumber = 7;
private global::Grpc.Core.Stats coreStats_;
/// <summary>
/// Core library stats
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Grpc.Core.Stats CoreStats {
get { return coreStats_; }
set {
coreStats_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as ServerStats);
@ -192,6 +209,7 @@ namespace Grpc.Testing {
if (TotalCpuTime != other.TotalCpuTime) return false;
if (IdleCpuTime != other.IdleCpuTime) return false;
if (CqPollCount != other.CqPollCount) return false;
if (!object.Equals(CoreStats, other.CoreStats)) return false;
return true;
}
@ -204,6 +222,7 @@ namespace Grpc.Testing {
if (TotalCpuTime != 0UL) hash ^= TotalCpuTime.GetHashCode();
if (IdleCpuTime != 0UL) hash ^= IdleCpuTime.GetHashCode();
if (CqPollCount != 0UL) hash ^= CqPollCount.GetHashCode();
if (coreStats_ != null) hash ^= CoreStats.GetHashCode();
return hash;
}
@ -238,6 +257,10 @@ namespace Grpc.Testing {
output.WriteRawTag(48);
output.WriteUInt64(CqPollCount);
}
if (coreStats_ != null) {
output.WriteRawTag(58);
output.WriteMessage(CoreStats);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -261,6 +284,9 @@ namespace Grpc.Testing {
if (CqPollCount != 0UL) {
size += 1 + pb::CodedOutputStream.ComputeUInt64Size(CqPollCount);
}
if (coreStats_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(CoreStats);
}
return size;
}
@ -287,6 +313,12 @@ namespace Grpc.Testing {
if (other.CqPollCount != 0UL) {
CqPollCount = other.CqPollCount;
}
if (other.coreStats_ != null) {
if (coreStats_ == null) {
coreStats_ = new global::Grpc.Core.Stats();
}
CoreStats.MergeFrom(other.CoreStats);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -321,6 +353,13 @@ namespace Grpc.Testing {
CqPollCount = input.ReadUInt64();
break;
}
case 58: {
if (coreStats_ == null) {
coreStats_ = new global::Grpc.Core.Stats();
}
input.ReadMessage(coreStats_);
break;
}
}
}
}
@ -909,6 +948,7 @@ namespace Grpc.Testing {
timeSystem_ = other.timeSystem_;
requestResults_ = other.requestResults_.Clone();
cqPollCount_ = other.cqPollCount_;
CoreStats = other.coreStats_ != null ? other.CoreStats.Clone() : null;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -993,6 +1033,20 @@ namespace Grpc.Testing {
}
}
/// <summary>Field number for the "core_stats" field.</summary>
public const int CoreStatsFieldNumber = 7;
private global::Grpc.Core.Stats coreStats_;
/// <summary>
/// Core library stats
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Grpc.Core.Stats CoreStats {
get { return coreStats_; }
set {
coreStats_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as ClientStats);
@ -1012,6 +1066,7 @@ namespace Grpc.Testing {
if (TimeSystem != other.TimeSystem) return false;
if(!requestResults_.Equals(other.requestResults_)) return false;
if (CqPollCount != other.CqPollCount) return false;
if (!object.Equals(CoreStats, other.CoreStats)) return false;
return true;
}
@ -1024,6 +1079,7 @@ namespace Grpc.Testing {
if (TimeSystem != 0D) hash ^= TimeSystem.GetHashCode();
hash ^= requestResults_.GetHashCode();
if (CqPollCount != 0UL) hash ^= CqPollCount.GetHashCode();
if (coreStats_ != null) hash ^= CoreStats.GetHashCode();
return hash;
}
@ -1055,6 +1111,10 @@ namespace Grpc.Testing {
output.WriteRawTag(48);
output.WriteUInt64(CqPollCount);
}
if (coreStats_ != null) {
output.WriteRawTag(58);
output.WriteMessage(CoreStats);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -1076,6 +1136,9 @@ namespace Grpc.Testing {
if (CqPollCount != 0UL) {
size += 1 + pb::CodedOutputStream.ComputeUInt64Size(CqPollCount);
}
if (coreStats_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(CoreStats);
}
return size;
}
@ -1103,6 +1166,12 @@ namespace Grpc.Testing {
if (other.CqPollCount != 0UL) {
CqPollCount = other.CqPollCount;
}
if (other.coreStats_ != null) {
if (coreStats_ == null) {
coreStats_ = new global::Grpc.Core.Stats();
}
CoreStats.MergeFrom(other.CoreStats);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -1140,6 +1209,13 @@ namespace Grpc.Testing {
CqPollCount = input.ReadUInt64();
break;
}
case 58: {
if (coreStats_ == null) {
coreStats_ = new global::Grpc.Core.Stats();
}
input.ReadMessage(coreStats_);
break;
}
}
}
}

@ -1,5 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: src/proto/grpc/testing/test.proto
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: src/proto/grpc/testing/test.proto
// </auto-generated>
// Original file comments:
// Copyright 2015-2016 gRPC authors.
//

@ -345,7 +345,10 @@ namespace Grpc.Reflection.V1Alpha {
FileContainingSymbol = other.FileContainingSymbol;
break;
case MessageRequestOneofCase.FileContainingExtension:
FileContainingExtension = other.FileContainingExtension;
if (FileContainingExtension == null) {
FileContainingExtension = new global::Grpc.Reflection.V1Alpha.ExtensionRequest();
}
FileContainingExtension.MergeFrom(other.FileContainingExtension);
break;
case MessageRequestOneofCase.AllExtensionNumbersOfType:
AllExtensionNumbersOfType = other.AllExtensionNumbersOfType;
@ -816,16 +819,28 @@ namespace Grpc.Reflection.V1Alpha {
}
switch (other.MessageResponseCase) {
case MessageResponseOneofCase.FileDescriptorResponse:
FileDescriptorResponse = other.FileDescriptorResponse;
if (FileDescriptorResponse == null) {
FileDescriptorResponse = new global::Grpc.Reflection.V1Alpha.FileDescriptorResponse();
}
FileDescriptorResponse.MergeFrom(other.FileDescriptorResponse);
break;
case MessageResponseOneofCase.AllExtensionNumbersResponse:
AllExtensionNumbersResponse = other.AllExtensionNumbersResponse;
if (AllExtensionNumbersResponse == null) {
AllExtensionNumbersResponse = new global::Grpc.Reflection.V1Alpha.ExtensionNumberResponse();
}
AllExtensionNumbersResponse.MergeFrom(other.AllExtensionNumbersResponse);
break;
case MessageResponseOneofCase.ListServicesResponse:
ListServicesResponse = other.ListServicesResponse;
if (ListServicesResponse == null) {
ListServicesResponse = new global::Grpc.Reflection.V1Alpha.ListServiceResponse();
}
ListServicesResponse.MergeFrom(other.ListServicesResponse);
break;
case MessageResponseOneofCase.ErrorResponse:
ErrorResponse = other.ErrorResponse;
if (ErrorResponse == null) {
ErrorResponse = new global::Grpc.Reflection.V1Alpha.ErrorResponse();
}
ErrorResponse.MergeFrom(other.ErrorResponse);
break;
}

@ -1,5 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/reflection/v1alpha/reflection.proto
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/reflection/v1alpha/reflection.proto
// </auto-generated>
// Original file comments:
// Copyright 2016 gRPC authors.
//

Loading…
Cancel
Save