1 | // Generated by the protocol buffer compiler. DO NOT EDIT!
|
---|
2 |
|
---|
3 | using pb = global::Google.ProtocolBuffers;
|
---|
4 | using pbd = global::Google.ProtocolBuffers.Descriptors;
|
---|
5 | namespace Google.ProtocolBuffers.TestProtos {
|
---|
6 |
|
---|
7 | public static partial class UnitTestImportProtoFile {
|
---|
8 |
|
---|
9 | #region Extension registration
|
---|
10 | public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
|
---|
11 | }
|
---|
12 | #endregion
|
---|
13 | #region Static variables
|
---|
14 | internal static pbd::MessageDescriptor internal__static_protobuf_unittest_import_ImportMessage__Descriptor;
|
---|
15 | internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder> internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable;
|
---|
16 | #endregion
|
---|
17 | #region Descriptor
|
---|
18 | public static pbd::FileDescriptor Descriptor {
|
---|
19 | get { return descriptor; }
|
---|
20 | }
|
---|
21 | private static pbd::FileDescriptor descriptor;
|
---|
22 |
|
---|
23 | static UnitTestImportProtoFile() {
|
---|
24 | byte[] descriptorData = global::System.Convert.FromBase64String(
|
---|
25 | "CiVnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfaW1wb3J0LnByb3RvEhhwcm90" +
|
---|
26 | "b2J1Zl91bml0dGVzdF9pbXBvcnQaJGdvb2dsZS9wcm90b2J1Zi9jc2hhcnBf" +
|
---|
27 | "b3B0aW9ucy5wcm90byIaCg1JbXBvcnRNZXNzYWdlEgkKAWQYASABKAUqPAoK" +
|
---|
28 | "SW1wb3J0RW51bRIOCgpJTVBPUlRfRk9PEAcSDgoKSU1QT1JUX0JBUhAIEg4K" +
|
---|
29 | "CklNUE9SVF9CQVoQCUJbChhjb20uZ29vZ2xlLnByb3RvYnVmLnRlc3RIAcI+" +
|
---|
30 | "PAohR29vZ2xlLlByb3RvY29sQnVmZmVycy5UZXN0UHJvdG9zEhdVbml0VGVz" +
|
---|
31 | "dEltcG9ydFByb3RvRmlsZQ==");
|
---|
32 | pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
|
---|
33 | descriptor = root;
|
---|
34 | internal__static_protobuf_unittest_import_ImportMessage__Descriptor = Descriptor.MessageTypes[0];
|
---|
35 | internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable =
|
---|
36 | new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder>(internal__static_protobuf_unittest_import_ImportMessage__Descriptor,
|
---|
37 | new string[] { "D", });
|
---|
38 | pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
|
---|
39 | RegisterAllExtensions(registry);
|
---|
40 | global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry);
|
---|
41 | return registry;
|
---|
42 | };
|
---|
43 | pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
|
---|
44 | new pbd::FileDescriptor[] {
|
---|
45 | global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor,
|
---|
46 | }, assigner);
|
---|
47 | }
|
---|
48 | #endregion
|
---|
49 |
|
---|
50 | }
|
---|
51 | #region Enums
|
---|
52 | public enum ImportEnum {
|
---|
53 | IMPORT_FOO = 7,
|
---|
54 | IMPORT_BAR = 8,
|
---|
55 | IMPORT_BAZ = 9,
|
---|
56 | }
|
---|
57 |
|
---|
58 | #endregion
|
---|
59 |
|
---|
60 | #region Messages
|
---|
61 | public sealed partial class ImportMessage : pb::GeneratedMessage<ImportMessage, ImportMessage.Builder> {
|
---|
62 | private static readonly ImportMessage defaultInstance = new Builder().BuildPartial();
|
---|
63 | public static ImportMessage DefaultInstance {
|
---|
64 | get { return defaultInstance; }
|
---|
65 | }
|
---|
66 |
|
---|
67 | public override ImportMessage DefaultInstanceForType {
|
---|
68 | get { return defaultInstance; }
|
---|
69 | }
|
---|
70 |
|
---|
71 | protected override ImportMessage ThisMessage {
|
---|
72 | get { return this; }
|
---|
73 | }
|
---|
74 |
|
---|
75 | public static pbd::MessageDescriptor Descriptor {
|
---|
76 | get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__Descriptor; }
|
---|
77 | }
|
---|
78 |
|
---|
79 | protected override pb::FieldAccess.FieldAccessorTable<ImportMessage, ImportMessage.Builder> InternalFieldAccessors {
|
---|
80 | get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable; }
|
---|
81 | }
|
---|
82 |
|
---|
83 | public const int DFieldNumber = 1;
|
---|
84 | private bool hasD;
|
---|
85 | private int d_ = 0;
|
---|
86 | public bool HasD {
|
---|
87 | get { return hasD; }
|
---|
88 | }
|
---|
89 | public int D {
|
---|
90 | get { return d_; }
|
---|
91 | }
|
---|
92 |
|
---|
93 | public override bool IsInitialized {
|
---|
94 | get {
|
---|
95 | return true;
|
---|
96 | }
|
---|
97 | }
|
---|
98 |
|
---|
99 | public override void WriteTo(pb::CodedOutputStream output) {
|
---|
100 | int size = SerializedSize;
|
---|
101 | if (HasD) {
|
---|
102 | output.WriteInt32(1, D);
|
---|
103 | }
|
---|
104 | UnknownFields.WriteTo(output);
|
---|
105 | }
|
---|
106 |
|
---|
107 | private int memoizedSerializedSize = -1;
|
---|
108 | public override int SerializedSize {
|
---|
109 | get {
|
---|
110 | int size = memoizedSerializedSize;
|
---|
111 | if (size != -1) return size;
|
---|
112 |
|
---|
113 | size = 0;
|
---|
114 | if (HasD) {
|
---|
115 | size += pb::CodedOutputStream.ComputeInt32Size(1, D);
|
---|
116 | }
|
---|
117 | size += UnknownFields.SerializedSize;
|
---|
118 | memoizedSerializedSize = size;
|
---|
119 | return size;
|
---|
120 | }
|
---|
121 | }
|
---|
122 |
|
---|
123 | public static ImportMessage ParseFrom(pb::ByteString data) {
|
---|
124 | return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
|
---|
125 | }
|
---|
126 | public static ImportMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
|
---|
127 | return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
|
---|
128 | }
|
---|
129 | public static ImportMessage ParseFrom(byte[] data) {
|
---|
130 | return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
|
---|
131 | }
|
---|
132 | public static ImportMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
|
---|
133 | return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
|
---|
134 | }
|
---|
135 | public static ImportMessage ParseFrom(global::System.IO.Stream input) {
|
---|
136 | return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
|
---|
137 | }
|
---|
138 | public static ImportMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
|
---|
139 | return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
|
---|
140 | }
|
---|
141 | public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input) {
|
---|
142 | return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
|
---|
143 | }
|
---|
144 | public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
|
---|
145 | return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
|
---|
146 | }
|
---|
147 | public static ImportMessage ParseFrom(pb::CodedInputStream input) {
|
---|
148 | return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
|
---|
149 | }
|
---|
150 | public static ImportMessage ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
---|
151 | return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
|
---|
152 | }
|
---|
153 | public static Builder CreateBuilder() { return new Builder(); }
|
---|
154 | public override Builder ToBuilder() { return CreateBuilder(this); }
|
---|
155 | public override Builder CreateBuilderForType() { return new Builder(); }
|
---|
156 | public static Builder CreateBuilder(ImportMessage prototype) {
|
---|
157 | return (Builder)new Builder().MergeFrom(prototype);
|
---|
158 | }
|
---|
159 |
|
---|
160 | public sealed partial class Builder : pb::GeneratedBuilder<ImportMessage, Builder> {
|
---|
161 | protected override Builder ThisBuilder {
|
---|
162 | get { return this; }
|
---|
163 | }
|
---|
164 | public Builder() { }
|
---|
165 |
|
---|
166 | ImportMessage result = new ImportMessage();
|
---|
167 |
|
---|
168 | protected override ImportMessage MessageBeingBuilt {
|
---|
169 | get { return result; }
|
---|
170 | }
|
---|
171 |
|
---|
172 | public override Builder Clear() {
|
---|
173 | result = new ImportMessage();
|
---|
174 | return this;
|
---|
175 | }
|
---|
176 |
|
---|
177 | public override Builder Clone() {
|
---|
178 | return new Builder().MergeFrom(result);
|
---|
179 | }
|
---|
180 |
|
---|
181 | public override pbd::MessageDescriptor DescriptorForType {
|
---|
182 | get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.Descriptor; }
|
---|
183 | }
|
---|
184 |
|
---|
185 | public override ImportMessage DefaultInstanceForType {
|
---|
186 | get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance; }
|
---|
187 | }
|
---|
188 |
|
---|
189 | public override ImportMessage BuildPartial() {
|
---|
190 | if (result == null) {
|
---|
191 | throw new global::System.InvalidOperationException("build() has already been called on this Builder");
|
---|
192 | }
|
---|
193 | ImportMessage returnMe = result;
|
---|
194 | result = null;
|
---|
195 | return returnMe;
|
---|
196 | }
|
---|
197 |
|
---|
198 | public override Builder MergeFrom(pb::IMessage other) {
|
---|
199 | if (other is ImportMessage) {
|
---|
200 | return MergeFrom((ImportMessage)other);
|
---|
201 | } else {
|
---|
202 | base.MergeFrom(other);
|
---|
203 | return this;
|
---|
204 | }
|
---|
205 | }
|
---|
206 |
|
---|
207 | public override Builder MergeFrom(ImportMessage other) {
|
---|
208 | if (other == global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance) return this;
|
---|
209 | if (other.HasD) {
|
---|
210 | D = other.D;
|
---|
211 | }
|
---|
212 | this.MergeUnknownFields(other.UnknownFields);
|
---|
213 | return this;
|
---|
214 | }
|
---|
215 |
|
---|
216 | public override Builder MergeFrom(pb::CodedInputStream input) {
|
---|
217 | return MergeFrom(input, pb::ExtensionRegistry.Empty);
|
---|
218 | }
|
---|
219 |
|
---|
220 | public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
---|
221 | pb::UnknownFieldSet.Builder unknownFields = null;
|
---|
222 | while (true) {
|
---|
223 | uint tag = input.ReadTag();
|
---|
224 | switch (tag) {
|
---|
225 | case 0: {
|
---|
226 | if (unknownFields != null) {
|
---|
227 | this.UnknownFields = unknownFields.Build();
|
---|
228 | }
|
---|
229 | return this;
|
---|
230 | }
|
---|
231 | default: {
|
---|
232 | if (pb::WireFormat.IsEndGroupTag(tag)) {
|
---|
233 | if (unknownFields != null) {
|
---|
234 | this.UnknownFields = unknownFields.Build();
|
---|
235 | }
|
---|
236 | return this;
|
---|
237 | }
|
---|
238 | if (unknownFields == null) {
|
---|
239 | unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
---|
240 | }
|
---|
241 | ParseUnknownField(input, unknownFields, extensionRegistry, tag);
|
---|
242 | break;
|
---|
243 | }
|
---|
244 | case 8: {
|
---|
245 | D = input.ReadInt32();
|
---|
246 | break;
|
---|
247 | }
|
---|
248 | }
|
---|
249 | }
|
---|
250 | }
|
---|
251 |
|
---|
252 |
|
---|
253 | public bool HasD {
|
---|
254 | get { return result.HasD; }
|
---|
255 | }
|
---|
256 | public int D {
|
---|
257 | get { return result.D; }
|
---|
258 | set { SetD(value); }
|
---|
259 | }
|
---|
260 | public Builder SetD(int value) {
|
---|
261 | result.hasD = true;
|
---|
262 | result.d_ = value;
|
---|
263 | return this;
|
---|
264 | }
|
---|
265 | public Builder ClearD() {
|
---|
266 | result.hasD = false;
|
---|
267 | result.d_ = 0;
|
---|
268 | return this;
|
---|
269 | }
|
---|
270 | }
|
---|
271 | static ImportMessage() {
|
---|
272 | object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.Descriptor, null);
|
---|
273 | }
|
---|
274 | }
|
---|
275 |
|
---|
276 | #endregion
|
---|
277 |
|
---|
278 | }
|
---|