From c53484539c691a717ad531081e6fbed7fd4ea192 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Fri, 1 Jul 2016 13:19:19 +0100 Subject: Changes to generated code from previous commit --- csharp/src/Google.Protobuf/WellKnownTypes/Type.cs | 104 ++++++++++++++++++++-- 1 file changed, 97 insertions(+), 7 deletions(-) (limited to 'csharp/src/Google.Protobuf/WellKnownTypes/Type.cs') diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs index 657c2464..2bad3432 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs @@ -10,7 +10,6 @@ using scg = global::System.Collections.Generic; namespace Google.Protobuf.WellKnownTypes { /// Holder for reflection information generated from google/protobuf/type.proto - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public static partial class TypeReflection { #region Descriptor @@ -92,25 +91,29 @@ namespace Google.Protobuf.WellKnownTypes { /// /// A protocol buffer message type. /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Type : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Type()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descriptor.MessageTypes[0]; } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Type() { OnConstruction(); } partial void OnConstruction(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Type(Type other) : this() { name_ = other.name_; fields_ = other.fields_.Clone(); @@ -120,6 +123,7 @@ namespace Google.Protobuf.WellKnownTypes { syntax_ = other.syntax_; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Type Clone() { return new Type(this); } @@ -130,6 +134,7 @@ namespace Google.Protobuf.WellKnownTypes { /// /// The fully qualified message name. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string Name { get { return name_; } set { @@ -145,6 +150,7 @@ namespace Google.Protobuf.WellKnownTypes { /// /// The list of fields. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public pbc::RepeatedField Fields { get { return fields_; } } @@ -157,6 +163,7 @@ namespace Google.Protobuf.WellKnownTypes { /// /// The list of types appearing in `oneof` definitions in this type. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public pbc::RepeatedField Oneofs { get { return oneofs_; } } @@ -169,6 +176,7 @@ namespace Google.Protobuf.WellKnownTypes { /// /// The protocol buffer options. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public pbc::RepeatedField Options { get { return options_; } } @@ -179,6 +187,7 @@ namespace Google.Protobuf.WellKnownTypes { /// /// The source context. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { get { return sourceContext_; } set { @@ -192,6 +201,7 @@ namespace Google.Protobuf.WellKnownTypes { /// /// The source syntax. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { get { return syntax_; } set { @@ -199,10 +209,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as Type); } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool Equals(Type other) { if (ReferenceEquals(other, null)) { return false; @@ -219,6 +231,7 @@ namespace Google.Protobuf.WellKnownTypes { return true; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (Name.Length != 0) hash ^= Name.GetHashCode(); @@ -230,10 +243,12 @@ namespace Google.Protobuf.WellKnownTypes { 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); @@ -252,6 +267,7 @@ namespace Google.Protobuf.WellKnownTypes { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; if (Name.Length != 0) { @@ -269,6 +285,7 @@ namespace Google.Protobuf.WellKnownTypes { return size; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(Type other) { if (other == null) { return; @@ -290,6 +307,7 @@ namespace Google.Protobuf.WellKnownTypes { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { @@ -333,25 +351,29 @@ namespace Google.Protobuf.WellKnownTypes { /// /// A single field of a message type. /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Field : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Field()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descriptor.MessageTypes[1]; } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Field() { OnConstruction(); } partial void OnConstruction(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Field(Field other) : this() { kind_ = other.kind_; cardinality_ = other.cardinality_; @@ -365,6 +387,7 @@ namespace Google.Protobuf.WellKnownTypes { defaultValue_ = other.defaultValue_; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Field Clone() { return new Field(this); } @@ -375,6 +398,7 @@ namespace Google.Protobuf.WellKnownTypes { /// /// The field type. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Google.Protobuf.WellKnownTypes.Field.Types.Kind Kind { get { return kind_; } set { @@ -388,6 +412,7 @@ namespace Google.Protobuf.WellKnownTypes { /// /// The field cardinality. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality Cardinality { get { return cardinality_; } set { @@ -401,6 +426,7 @@ namespace Google.Protobuf.WellKnownTypes { /// /// The field number. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int Number { get { return number_; } set { @@ -414,6 +440,7 @@ namespace Google.Protobuf.WellKnownTypes { /// /// The field name. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string Name { get { return name_; } set { @@ -428,6 +455,7 @@ namespace Google.Protobuf.WellKnownTypes { /// The field type URL, without the scheme, for message or enumeration /// types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string TypeUrl { get { return typeUrl_; } set { @@ -442,6 +470,7 @@ namespace Google.Protobuf.WellKnownTypes { /// The index of the field type in `Type.oneofs`, for message or enumeration /// types. The first type has index 1; zero means the type is not in the list. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int OneofIndex { get { return oneofIndex_; } set { @@ -455,6 +484,7 @@ namespace Google.Protobuf.WellKnownTypes { /// /// Whether to use alternative packed wire representation. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool Packed { get { return packed_; } set { @@ -470,6 +500,7 @@ namespace Google.Protobuf.WellKnownTypes { /// /// The protocol buffer options. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public pbc::RepeatedField Options { get { return options_; } } @@ -480,6 +511,7 @@ namespace Google.Protobuf.WellKnownTypes { /// /// The field JSON name. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string JsonName { get { return jsonName_; } set { @@ -493,6 +525,7 @@ namespace Google.Protobuf.WellKnownTypes { /// /// The string value of the default value of this field. Proto2 syntax only. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string DefaultValue { get { return defaultValue_; } set { @@ -500,10 +533,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as Field); } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool Equals(Field other) { if (ReferenceEquals(other, null)) { return false; @@ -524,6 +559,7 @@ namespace Google.Protobuf.WellKnownTypes { return true; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (Kind != 0) hash ^= Kind.GetHashCode(); @@ -539,10 +575,12 @@ namespace Google.Protobuf.WellKnownTypes { 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 (Kind != 0) { output.WriteRawTag(8); @@ -583,6 +621,7 @@ namespace Google.Protobuf.WellKnownTypes { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; if (Kind != 0) { @@ -616,6 +655,7 @@ namespace Google.Protobuf.WellKnownTypes { return size; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(Field other) { if (other == null) { return; @@ -650,6 +690,7 @@ namespace Google.Protobuf.WellKnownTypes { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { @@ -703,7 +744,7 @@ namespace Google.Protobuf.WellKnownTypes { #region Nested types /// Container for nested types declared in the Field message type. - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static partial class Types { /// /// Basic field types. @@ -817,25 +858,29 @@ namespace Google.Protobuf.WellKnownTypes { /// /// Enum type definition. /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Enum : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Enum()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descriptor.MessageTypes[2]; } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Enum() { OnConstruction(); } partial void OnConstruction(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Enum(Enum other) : this() { name_ = other.name_; enumvalue_ = other.enumvalue_.Clone(); @@ -844,6 +889,7 @@ namespace Google.Protobuf.WellKnownTypes { syntax_ = other.syntax_; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Enum Clone() { return new Enum(this); } @@ -854,6 +900,7 @@ namespace Google.Protobuf.WellKnownTypes { /// /// Enum type name. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string Name { get { return name_; } set { @@ -869,6 +916,7 @@ namespace Google.Protobuf.WellKnownTypes { /// /// Enum value definitions. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public pbc::RepeatedField Enumvalue { get { return enumvalue_; } } @@ -881,6 +929,7 @@ namespace Google.Protobuf.WellKnownTypes { /// /// Protocol buffer options. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public pbc::RepeatedField Options { get { return options_; } } @@ -891,6 +940,7 @@ namespace Google.Protobuf.WellKnownTypes { /// /// The source context. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { get { return sourceContext_; } set { @@ -904,6 +954,7 @@ namespace Google.Protobuf.WellKnownTypes { /// /// The source syntax. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { get { return syntax_; } set { @@ -911,10 +962,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as Enum); } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool Equals(Enum other) { if (ReferenceEquals(other, null)) { return false; @@ -930,6 +983,7 @@ namespace Google.Protobuf.WellKnownTypes { return true; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (Name.Length != 0) hash ^= Name.GetHashCode(); @@ -940,10 +994,12 @@ namespace Google.Protobuf.WellKnownTypes { 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); @@ -961,6 +1017,7 @@ namespace Google.Protobuf.WellKnownTypes { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; if (Name.Length != 0) { @@ -977,6 +1034,7 @@ namespace Google.Protobuf.WellKnownTypes { return size; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(Enum other) { if (other == null) { return; @@ -997,6 +1055,7 @@ namespace Google.Protobuf.WellKnownTypes { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { @@ -1036,31 +1095,36 @@ namespace Google.Protobuf.WellKnownTypes { /// /// Enum value definition. /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class EnumValue : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnumValue()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descriptor.MessageTypes[3]; } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public EnumValue() { OnConstruction(); } partial void OnConstruction(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public EnumValue(EnumValue other) : this() { name_ = other.name_; number_ = other.number_; options_ = other.options_.Clone(); } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public EnumValue Clone() { return new EnumValue(this); } @@ -1071,6 +1135,7 @@ namespace Google.Protobuf.WellKnownTypes { /// /// Enum value name. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string Name { get { return name_; } set { @@ -1084,6 +1149,7 @@ namespace Google.Protobuf.WellKnownTypes { /// /// Enum value number. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int Number { get { return number_; } set { @@ -1099,14 +1165,17 @@ namespace Google.Protobuf.WellKnownTypes { /// /// Protocol buffer options. /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public pbc::RepeatedField Options { get { return options_; } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as EnumValue); } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool Equals(EnumValue other) { if (ReferenceEquals(other, null)) { return false; @@ -1120,6 +1189,7 @@ namespace Google.Protobuf.WellKnownTypes { return true; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (Name.Length != 0) hash ^= Name.GetHashCode(); @@ -1128,10 +1198,12 @@ namespace Google.Protobuf.WellKnownTypes { 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); @@ -1144,6 +1216,7 @@ namespace Google.Protobuf.WellKnownTypes { options_.WriteTo(output, _repeated_options_codec); } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; if (Name.Length != 0) { @@ -1156,6 +1229,7 @@ namespace Google.Protobuf.WellKnownTypes { return size; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(EnumValue other) { if (other == null) { return; @@ -1169,6 +1243,7 @@ namespace Google.Protobuf.WellKnownTypes { options_.Add(other.options_); } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { @@ -1198,30 +1273,35 @@ namespace Google.Protobuf.WellKnownTypes { /// A protocol buffer option, which can be attached to a message, field, /// enumeration, etc. /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Option : pb::IMessage