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