Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: third_party/grpc/examples/csharp/helloworld/Greeter/Helloworld.cs

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: helloworld.proto
3 #pragma warning disable 1591, 0612, 3021
4 #region Designer generated code
5
6 using pb = global::Google.Protobuf;
7 using pbc = global::Google.Protobuf.Collections;
8 using pbr = global::Google.Protobuf.Reflection;
9 using scg = global::System.Collections.Generic;
10 namespace Helloworld {
11
12 /// <summary>Holder for reflection information generated from helloworld.proto </summary>
13 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
14 public static partial class HelloworldReflection {
15
16 #region Descriptor
17 /// <summary>File descriptor for helloworld.proto</summary>
18 public static pbr::FileDescriptor Descriptor {
19 get { return descriptor; }
20 }
21 private static pbr::FileDescriptor descriptor;
22
23 static HelloworldReflection() {
24 byte[] descriptorData = global::System.Convert.FromBase64String(
25 string.Concat(
26 "ChBoZWxsb3dvcmxkLnByb3RvEgpoZWxsb3dvcmxkIhwKDEhlbGxvUmVxdWVz",
27 "dBIMCgRuYW1lGAEgASgJIh0KCkhlbGxvUmVwbHkSDwoHbWVzc2FnZRgBIAEo",
28 "CTJJCgdHcmVldGVyEj4KCFNheUhlbGxvEhguaGVsbG93b3JsZC5IZWxsb1Jl",
29 "cXVlc3QaFi5oZWxsb3dvcmxkLkhlbGxvUmVwbHkiAEIYChBpby5ncnBjLmV4",
30 "YW1wbGVzogIDSExXYgZwcm90bzM="));
31 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
32 new pbr::FileDescriptor[] { },
33 new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] {
34 new pbr::GeneratedCodeInfo(typeof(global::Helloworld.HelloRequest), global::Helloworld.HelloRequest.Parser, new[]{ "Name" }, null, null, null),
35 new pbr::GeneratedCodeInfo(typeof(global::Helloworld.HelloReply), gl obal::Helloworld.HelloReply.Parser, new[]{ "Message" }, null, null, null)
36 }));
37 }
38 #endregion
39
40 }
41 #region Messages
42 /// <summary>
43 /// The request message containing the user's name.
44 /// </summary>
45 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
46 public sealed partial class HelloRequest : pb::IMessage<HelloRequest> {
47 private static readonly pb::MessageParser<HelloRequest> _parser = new pb::Me ssageParser<HelloRequest>(() => new HelloRequest());
48 public static pb::MessageParser<HelloRequest> Parser { get { return _parser; } }
49
50 public static pbr::MessageDescriptor Descriptor {
51 get { return global::Helloworld.HelloworldReflection.Descriptor.MessageTyp es[0]; }
52 }
53
54 pbr::MessageDescriptor pb::IMessage.Descriptor {
55 get { return Descriptor; }
56 }
57
58 public HelloRequest() {
59 OnConstruction();
60 }
61
62 partial void OnConstruction();
63
64 public HelloRequest(HelloRequest other) : this() {
65 name_ = other.name_;
66 }
67
68 public HelloRequest Clone() {
69 return new HelloRequest(this);
70 }
71
72 /// <summary>Field number for the "name" field.</summary>
73 public const int NameFieldNumber = 1;
74 private string name_ = "";
75 public string Name {
76 get { return name_; }
77 set {
78 name_ = pb::Preconditions.CheckNotNull(value, "value");
79 }
80 }
81
82 public override bool Equals(object other) {
83 return Equals(other as HelloRequest);
84 }
85
86 public bool Equals(HelloRequest other) {
87 if (ReferenceEquals(other, null)) {
88 return false;
89 }
90 if (ReferenceEquals(other, this)) {
91 return true;
92 }
93 if (Name != other.Name) return false;
94 return true;
95 }
96
97 public override int GetHashCode() {
98 int hash = 1;
99 if (Name.Length != 0) hash ^= Name.GetHashCode();
100 return hash;
101 }
102
103 public override string ToString() {
104 return pb::JsonFormatter.ToDiagnosticString(this);
105 }
106
107 public void WriteTo(pb::CodedOutputStream output) {
108 if (Name.Length != 0) {
109 output.WriteRawTag(10);
110 output.WriteString(Name);
111 }
112 }
113
114 public int CalculateSize() {
115 int size = 0;
116 if (Name.Length != 0) {
117 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
118 }
119 return size;
120 }
121
122 public void MergeFrom(HelloRequest other) {
123 if (other == null) {
124 return;
125 }
126 if (other.Name.Length != 0) {
127 Name = other.Name;
128 }
129 }
130
131 public void MergeFrom(pb::CodedInputStream input) {
132 uint tag;
133 while ((tag = input.ReadTag()) != 0) {
134 switch(tag) {
135 default:
136 input.SkipLastField();
137 break;
138 case 10: {
139 Name = input.ReadString();
140 break;
141 }
142 }
143 }
144 }
145
146 }
147
148 /// <summary>
149 /// The response message containing the greetings
150 /// </summary>
151 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
152 public sealed partial class HelloReply : pb::IMessage<HelloReply> {
153 private static readonly pb::MessageParser<HelloReply> _parser = new pb::Mess ageParser<HelloReply>(() => new HelloReply());
154 public static pb::MessageParser<HelloReply> Parser { get { return _parser; } }
155
156 public static pbr::MessageDescriptor Descriptor {
157 get { return global::Helloworld.HelloworldReflection.Descriptor.MessageTyp es[1]; }
158 }
159
160 pbr::MessageDescriptor pb::IMessage.Descriptor {
161 get { return Descriptor; }
162 }
163
164 public HelloReply() {
165 OnConstruction();
166 }
167
168 partial void OnConstruction();
169
170 public HelloReply(HelloReply other) : this() {
171 message_ = other.message_;
172 }
173
174 public HelloReply Clone() {
175 return new HelloReply(this);
176 }
177
178 /// <summary>Field number for the "message" field.</summary>
179 public const int MessageFieldNumber = 1;
180 private string message_ = "";
181 public string Message {
182 get { return message_; }
183 set {
184 message_ = pb::Preconditions.CheckNotNull(value, "value");
185 }
186 }
187
188 public override bool Equals(object other) {
189 return Equals(other as HelloReply);
190 }
191
192 public bool Equals(HelloReply other) {
193 if (ReferenceEquals(other, null)) {
194 return false;
195 }
196 if (ReferenceEquals(other, this)) {
197 return true;
198 }
199 if (Message != other.Message) return false;
200 return true;
201 }
202
203 public override int GetHashCode() {
204 int hash = 1;
205 if (Message.Length != 0) hash ^= Message.GetHashCode();
206 return hash;
207 }
208
209 public override string ToString() {
210 return pb::JsonFormatter.ToDiagnosticString(this);
211 }
212
213 public void WriteTo(pb::CodedOutputStream output) {
214 if (Message.Length != 0) {
215 output.WriteRawTag(10);
216 output.WriteString(Message);
217 }
218 }
219
220 public int CalculateSize() {
221 int size = 0;
222 if (Message.Length != 0) {
223 size += 1 + pb::CodedOutputStream.ComputeStringSize(Message);
224 }
225 return size;
226 }
227
228 public void MergeFrom(HelloReply other) {
229 if (other == null) {
230 return;
231 }
232 if (other.Message.Length != 0) {
233 Message = other.Message;
234 }
235 }
236
237 public void MergeFrom(pb::CodedInputStream input) {
238 uint tag;
239 while ((tag = input.ReadTag()) != 0) {
240 switch(tag) {
241 default:
242 input.SkipLastField();
243 break;
244 case 10: {
245 Message = input.ReadString();
246 break;
247 }
248 }
249 }
250 }
251
252 }
253
254 #endregion
255
256 }
257
258 #endregion Designer generated code
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698