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 UnitTestCSharpOptionsProtoFile {
|
| 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_OptionsMessage__Descriptor;
|
| 20 | internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OptionsMessage, global::Google.ProtocolBuffers.TestProtos.OptionsMessage.Builder> internal__static_protobuf_unittest_OptionsMessage__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 UnitTestCSharpOptionsProtoFile() {
|
| 29 | byte[] descriptorData = global::System.Convert.FromBase64String(
|
| 30 | "Ci1nb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfY3NoYXJwX29wdGlvbnMucHJv" +
|
| 31 | "dG8SEXByb3RvYnVmX3VuaXR0ZXN0GiRnb29nbGUvcHJvdG9idWYvY3NoYXJw" +
|
| 32 | "X29wdGlvbnMucHJvdG8iXgoOT3B0aW9uc01lc3NhZ2USDgoGbm9ybWFsGAEg" +
|
| 33 | "ASgJEhcKD29wdGlvbnNfbWVzc2FnZRgCIAEoCRIjCgpjdXN0b21pemVkGAMg" +
|
| 34 | "ASgJQg/CPgwKCkN1c3RvbU5hbWVCRsI+QwohR29vZ2xlLlByb3RvY29sQnVm" +
|
| 35 | "ZmVycy5UZXN0UHJvdG9zEh5Vbml0VGVzdENTaGFycE9wdGlvbnNQcm90b0Zp" +
|
| 36 | "bGU=");
|
| 37 | pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
|
| 38 | descriptor = root;
|
| 39 | internal__static_protobuf_unittest_OptionsMessage__Descriptor = Descriptor.MessageTypes[0];
|
| 40 | internal__static_protobuf_unittest_OptionsMessage__FieldAccessorTable =
|
| 41 | new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OptionsMessage, global::Google.ProtocolBuffers.TestProtos.OptionsMessage.Builder>(internal__static_protobuf_unittest_OptionsMessage__Descriptor,
|
| 42 | new string[] { "Normal", "OptionsMessage_", "CustomName", });
|
| 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 Messages
|
csharptest | 445bdce | 2011-05-20 15:50:54 -0500 | [diff] [blame] | 57 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
| 58 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
| 59 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
|
Jon Skeet | 82bb0f1 | 2011-04-03 20:17:12 +0100 | [diff] [blame] | 60 | public sealed partial class OptionsMessage : pb::GeneratedMessage<OptionsMessage, OptionsMessage.Builder> {
|
| 61 | private static readonly OptionsMessage defaultInstance = new Builder().BuildPartial();
|
| 62 | public static OptionsMessage DefaultInstance {
|
| 63 | get { return defaultInstance; }
|
| 64 | }
|
| 65 |
|
| 66 | public override OptionsMessage DefaultInstanceForType {
|
| 67 | get { return defaultInstance; }
|
| 68 | }
|
| 69 |
|
| 70 | protected override OptionsMessage ThisMessage {
|
| 71 | get { return this; }
|
| 72 | }
|
| 73 |
|
| 74 | public static pbd::MessageDescriptor Descriptor {
|
| 75 | get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCSharpOptionsProtoFile.internal__static_protobuf_unittest_OptionsMessage__Descriptor; }
|
| 76 | }
|
| 77 |
|
| 78 | protected override pb::FieldAccess.FieldAccessorTable<OptionsMessage, OptionsMessage.Builder> InternalFieldAccessors {
|
| 79 | get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCSharpOptionsProtoFile.internal__static_protobuf_unittest_OptionsMessage__FieldAccessorTable; }
|
| 80 | }
|
| 81 |
|
| 82 | public const int NormalFieldNumber = 1;
|
| 83 | private bool hasNormal;
|
| 84 | private string normal_ = "";
|
| 85 | public bool HasNormal {
|
| 86 | get { return hasNormal; }
|
| 87 | }
|
| 88 | public string Normal {
|
| 89 | get { return normal_; }
|
| 90 | }
|
| 91 |
|
| 92 | public const int OptionsMessage_FieldNumber = 2;
|
| 93 | private bool hasOptionsMessage_;
|
| 94 | private string optionsMessage_ = "";
|
| 95 | public bool HasOptionsMessage_ {
|
| 96 | get { return hasOptionsMessage_; }
|
| 97 | }
|
| 98 | public string OptionsMessage_ {
|
| 99 | get { return optionsMessage_; }
|
| 100 | }
|
| 101 |
|
| 102 | public const int CustomNameFieldNumber = 3;
|
| 103 | private bool hasCustomName;
|
| 104 | private string customized_ = "";
|
| 105 | public bool HasCustomName {
|
| 106 | get { return hasCustomName; }
|
| 107 | }
|
| 108 | public string CustomName {
|
| 109 | get { return customized_; }
|
| 110 | }
|
| 111 |
|
| 112 | public override bool IsInitialized {
|
| 113 | get {
|
| 114 | return true;
|
| 115 | }
|
| 116 | }
|
| 117 |
|
| 118 | public override void WriteTo(pb::CodedOutputStream output) {
|
| 119 | int size = SerializedSize;
|
| 120 | if (HasNormal) {
|
csharptest | 90922db | 2011-06-03 11:57:47 -0500 | [diff] [blame^] | 121 | output.WriteString(1, "normal", Normal);
|
Jon Skeet | 82bb0f1 | 2011-04-03 20:17:12 +0100 | [diff] [blame] | 122 | }
|
| 123 | if (HasOptionsMessage_) {
|
csharptest | 90922db | 2011-06-03 11:57:47 -0500 | [diff] [blame^] | 124 | output.WriteString(2, "options_message", OptionsMessage_);
|
Jon Skeet | 82bb0f1 | 2011-04-03 20:17:12 +0100 | [diff] [blame] | 125 | }
|
| 126 | if (HasCustomName) {
|
csharptest | 90922db | 2011-06-03 11:57:47 -0500 | [diff] [blame^] | 127 | output.WriteString(3, "customized", CustomName);
|
Jon Skeet | 82bb0f1 | 2011-04-03 20:17:12 +0100 | [diff] [blame] | 128 | }
|
| 129 | UnknownFields.WriteTo(output);
|
| 130 | }
|
| 131 |
|
| 132 | private int memoizedSerializedSize = -1;
|
| 133 | public override int SerializedSize {
|
| 134 | get {
|
| 135 | int size = memoizedSerializedSize;
|
| 136 | if (size != -1) return size;
|
| 137 |
|
| 138 | size = 0;
|
| 139 | if (HasNormal) {
|
| 140 | size += pb::CodedOutputStream.ComputeStringSize(1, Normal);
|
| 141 | }
|
| 142 | if (HasOptionsMessage_) {
|
| 143 | size += pb::CodedOutputStream.ComputeStringSize(2, OptionsMessage_);
|
| 144 | }
|
| 145 | if (HasCustomName) {
|
| 146 | size += pb::CodedOutputStream.ComputeStringSize(3, CustomName);
|
| 147 | }
|
| 148 | size += UnknownFields.SerializedSize;
|
| 149 | memoizedSerializedSize = size;
|
| 150 | return size;
|
| 151 | }
|
| 152 | }
|
| 153 |
|
| 154 | public static OptionsMessage ParseFrom(pb::ByteString data) {
|
| 155 | return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
|
| 156 | }
|
| 157 | public static OptionsMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
|
| 158 | return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
|
| 159 | }
|
| 160 | public static OptionsMessage ParseFrom(byte[] data) {
|
| 161 | return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
|
| 162 | }
|
| 163 | public static OptionsMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
|
| 164 | return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
|
| 165 | }
|
| 166 | public static OptionsMessage ParseFrom(global::System.IO.Stream input) {
|
| 167 | return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
|
| 168 | }
|
| 169 | public static OptionsMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
|
| 170 | return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
|
| 171 | }
|
| 172 | public static OptionsMessage ParseDelimitedFrom(global::System.IO.Stream input) {
|
| 173 | return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
|
| 174 | }
|
| 175 | public static OptionsMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
|
| 176 | return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
|
| 177 | }
|
| 178 | public static OptionsMessage ParseFrom(pb::CodedInputStream input) {
|
| 179 | return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
|
| 180 | }
|
| 181 | public static OptionsMessage ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
| 182 | return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
|
| 183 | }
|
| 184 | public static Builder CreateBuilder() { return new Builder(); }
|
| 185 | public override Builder ToBuilder() { return CreateBuilder(this); }
|
| 186 | public override Builder CreateBuilderForType() { return new Builder(); }
|
| 187 | public static Builder CreateBuilder(OptionsMessage prototype) {
|
| 188 | return (Builder) new Builder().MergeFrom(prototype);
|
| 189 | }
|
| 190 |
|
csharptest | 445bdce | 2011-05-20 15:50:54 -0500 | [diff] [blame] | 191 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
| 192 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
| 193 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
|
Jon Skeet | 82bb0f1 | 2011-04-03 20:17:12 +0100 | [diff] [blame] | 194 | public sealed partial class Builder : pb::GeneratedBuilder<OptionsMessage, Builder> {
|
| 195 | protected override Builder ThisBuilder {
|
| 196 | get { return this; }
|
| 197 | }
|
| 198 | public Builder() {}
|
| 199 |
|
| 200 | OptionsMessage result = new OptionsMessage();
|
| 201 |
|
| 202 | protected override OptionsMessage MessageBeingBuilt {
|
| 203 | get { return result; }
|
| 204 | }
|
| 205 |
|
| 206 | public override Builder Clear() {
|
| 207 | result = new OptionsMessage();
|
| 208 | return this;
|
| 209 | }
|
| 210 |
|
| 211 | public override Builder Clone() {
|
| 212 | return new Builder().MergeFrom(result);
|
| 213 | }
|
| 214 |
|
| 215 | public override pbd::MessageDescriptor DescriptorForType {
|
| 216 | get { return global::Google.ProtocolBuffers.TestProtos.OptionsMessage.Descriptor; }
|
| 217 | }
|
| 218 |
|
| 219 | public override OptionsMessage DefaultInstanceForType {
|
| 220 | get { return global::Google.ProtocolBuffers.TestProtos.OptionsMessage.DefaultInstance; }
|
| 221 | }
|
| 222 |
|
| 223 | public override OptionsMessage BuildPartial() {
|
| 224 | if (result == null) {
|
| 225 | throw new global::System.InvalidOperationException("build() has already been called on this Builder");
|
| 226 | }
|
| 227 | OptionsMessage returnMe = result;
|
| 228 | result = null;
|
| 229 | return returnMe;
|
| 230 | }
|
| 231 |
|
| 232 | public override Builder MergeFrom(pb::IMessage other) {
|
| 233 | if (other is OptionsMessage) {
|
| 234 | return MergeFrom((OptionsMessage) other);
|
| 235 | } else {
|
| 236 | base.MergeFrom(other);
|
| 237 | return this;
|
| 238 | }
|
| 239 | }
|
| 240 |
|
| 241 | public override Builder MergeFrom(OptionsMessage other) {
|
| 242 | if (other == global::Google.ProtocolBuffers.TestProtos.OptionsMessage.DefaultInstance) return this;
|
| 243 | if (other.HasNormal) {
|
| 244 | Normal = other.Normal;
|
| 245 | }
|
| 246 | if (other.HasOptionsMessage_) {
|
| 247 | OptionsMessage_ = other.OptionsMessage_;
|
| 248 | }
|
| 249 | if (other.HasCustomName) {
|
| 250 | CustomName = other.CustomName;
|
| 251 | }
|
| 252 | this.MergeUnknownFields(other.UnknownFields);
|
| 253 | return this;
|
| 254 | }
|
| 255 |
|
| 256 | public override Builder MergeFrom(pb::CodedInputStream input) {
|
| 257 | return MergeFrom(input, pb::ExtensionRegistry.Empty);
|
| 258 | }
|
| 259 |
|
| 260 | public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
| 261 | pb::UnknownFieldSet.Builder unknownFields = null;
|
| 262 | while (true) {
|
| 263 | uint tag = input.ReadTag();
|
| 264 | switch (tag) {
|
| 265 | case 0: {
|
| 266 | if (unknownFields != null) {
|
| 267 | this.UnknownFields = unknownFields.Build();
|
| 268 | }
|
| 269 | return this;
|
| 270 | }
|
| 271 | default: {
|
| 272 | if (pb::WireFormat.IsEndGroupTag(tag)) {
|
| 273 | if (unknownFields != null) {
|
| 274 | this.UnknownFields = unknownFields.Build();
|
| 275 | }
|
| 276 | return this;
|
| 277 | }
|
| 278 | if (unknownFields == null) {
|
| 279 | unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
| 280 | }
|
| 281 | ParseUnknownField(input, unknownFields, extensionRegistry, tag);
|
| 282 | break;
|
| 283 | }
|
| 284 | case 10: {
|
| 285 | Normal = input.ReadString();
|
| 286 | break;
|
| 287 | }
|
| 288 | case 18: {
|
| 289 | OptionsMessage_ = input.ReadString();
|
| 290 | break;
|
| 291 | }
|
| 292 | case 26: {
|
| 293 | CustomName = input.ReadString();
|
| 294 | break;
|
| 295 | }
|
| 296 | }
|
| 297 | }
|
| 298 | }
|
| 299 |
|
| 300 |
|
| 301 | public bool HasNormal {
|
| 302 | get { return result.HasNormal; }
|
| 303 | }
|
| 304 | public string Normal {
|
| 305 | get { return result.Normal; }
|
| 306 | set { SetNormal(value); }
|
| 307 | }
|
| 308 | public Builder SetNormal(string value) {
|
| 309 | pb::ThrowHelper.ThrowIfNull(value, "value");
|
| 310 | result.hasNormal = true;
|
| 311 | result.normal_ = value;
|
| 312 | return this;
|
| 313 | }
|
| 314 | public Builder ClearNormal() {
|
| 315 | result.hasNormal = false;
|
| 316 | result.normal_ = "";
|
| 317 | return this;
|
| 318 | }
|
| 319 |
|
| 320 | public bool HasOptionsMessage_ {
|
| 321 | get { return result.HasOptionsMessage_; }
|
| 322 | }
|
| 323 | public string OptionsMessage_ {
|
| 324 | get { return result.OptionsMessage_; }
|
| 325 | set { SetOptionsMessage_(value); }
|
| 326 | }
|
| 327 | public Builder SetOptionsMessage_(string value) {
|
| 328 | pb::ThrowHelper.ThrowIfNull(value, "value");
|
| 329 | result.hasOptionsMessage_ = true;
|
| 330 | result.optionsMessage_ = value;
|
| 331 | return this;
|
| 332 | }
|
| 333 | public Builder ClearOptionsMessage_() {
|
| 334 | result.hasOptionsMessage_ = false;
|
| 335 | result.optionsMessage_ = "";
|
| 336 | return this;
|
| 337 | }
|
| 338 |
|
| 339 | public bool HasCustomName {
|
| 340 | get { return result.HasCustomName; }
|
| 341 | }
|
| 342 | public string CustomName {
|
| 343 | get { return result.CustomName; }
|
| 344 | set { SetCustomName(value); }
|
| 345 | }
|
| 346 | public Builder SetCustomName(string value) {
|
| 347 | pb::ThrowHelper.ThrowIfNull(value, "value");
|
| 348 | result.hasCustomName = true;
|
| 349 | result.customized_ = value;
|
| 350 | return this;
|
| 351 | }
|
| 352 | public Builder ClearCustomName() {
|
| 353 | result.hasCustomName = false;
|
| 354 | result.customized_ = "";
|
| 355 | return this;
|
| 356 | }
|
| 357 | }
|
| 358 | static OptionsMessage() {
|
| 359 | object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestCSharpOptionsProtoFile.Descriptor, null);
|
| 360 | }
|
| 361 | }
|
| 362 |
|
| 363 | #endregion
|
| 364 |
|
| 365 | }
|