diff options
Diffstat (limited to 'csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs')
-rw-r--r-- | csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs index 6c1a594f..addec057 100644 --- a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs +++ b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs @@ -76,6 +76,10 @@ namespace UnitTest.Issues.TestProtos { #endregion #region Messages + /// <summary> + /// Issue 307: when generating doubly-nested types, any references + /// should be of the form A.Types.B.Types.C. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Issue307 : pb::IMessage<Issue307> { private static readonly pb::MessageParser<Issue307> _parser = new pb::MessageParser<Issue307>(() => new Issue307()); @@ -347,6 +351,7 @@ namespace UnitTest.Issues.TestProtos { return new NegativeEnumMessage(this); } + /// <summary>Field number for the "value" field.</summary> public const int ValueFieldNumber = 1; private global::UnitTest.Issues.TestProtos.NegativeEnum value_ = global::UnitTest.Issues.TestProtos.NegativeEnum.NEGATIVE_ENUM_ZERO; public global::UnitTest.Issues.TestProtos.NegativeEnum Value { @@ -356,6 +361,7 @@ namespace UnitTest.Issues.TestProtos { } } + /// <summary>Field number for the "values" field.</summary> public const int ValuesFieldNumber = 2; private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.NegativeEnum> _repeated_values_codec = pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::UnitTest.Issues.TestProtos.NegativeEnum) x); @@ -364,6 +370,7 @@ namespace UnitTest.Issues.TestProtos { get { return values_; } } + /// <summary>Field number for the "packed_values" field.</summary> public const int PackedValuesFieldNumber = 3; private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.NegativeEnum> _repeated_packedValues_codec = pb::FieldCodec.ForEnum(26, x => (int) x, x => (global::UnitTest.Issues.TestProtos.NegativeEnum) x); @@ -566,6 +573,7 @@ namespace UnitTest.Issues.TestProtos { return new DeprecatedFieldsMessage(this); } + /// <summary>Field number for the "PrimitiveValue" field.</summary> public const int PrimitiveValueFieldNumber = 1; private int primitiveValue_; [global::System.ObsoleteAttribute()] @@ -576,6 +584,7 @@ namespace UnitTest.Issues.TestProtos { } } + /// <summary>Field number for the "PrimitiveArray" field.</summary> public const int PrimitiveArrayFieldNumber = 2; private static readonly pb::FieldCodec<int> _repeated_primitiveArray_codec = pb::FieldCodec.ForInt32(18); @@ -585,6 +594,7 @@ namespace UnitTest.Issues.TestProtos { get { return primitiveArray_; } } + /// <summary>Field number for the "MessageValue" field.</summary> public const int MessageValueFieldNumber = 3; private global::UnitTest.Issues.TestProtos.DeprecatedChild messageValue_; [global::System.ObsoleteAttribute()] @@ -595,6 +605,7 @@ namespace UnitTest.Issues.TestProtos { } } + /// <summary>Field number for the "MessageArray" field.</summary> public const int MessageArrayFieldNumber = 4; private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.DeprecatedChild> _repeated_messageArray_codec = pb::FieldCodec.ForMessage(34, global::UnitTest.Issues.TestProtos.DeprecatedChild.Parser); @@ -604,6 +615,7 @@ namespace UnitTest.Issues.TestProtos { get { return messageArray_; } } + /// <summary>Field number for the "EnumValue" field.</summary> public const int EnumValueFieldNumber = 5; private global::UnitTest.Issues.TestProtos.DeprecatedEnum enumValue_ = global::UnitTest.Issues.TestProtos.DeprecatedEnum.DEPRECATED_ZERO; [global::System.ObsoleteAttribute()] @@ -614,6 +626,7 @@ namespace UnitTest.Issues.TestProtos { } } + /// <summary>Field number for the "EnumArray" field.</summary> public const int EnumArrayFieldNumber = 6; private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.DeprecatedEnum> _repeated_enumArray_codec = pb::FieldCodec.ForEnum(50, x => (int) x, x => (global::UnitTest.Issues.TestProtos.DeprecatedEnum) x); @@ -756,6 +769,9 @@ namespace UnitTest.Issues.TestProtos { } + /// <summary> + /// Issue 45: http://code.google.com/p/protobuf-csharp-port/issues/detail?id=45 + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class ItemField : pb::IMessage<ItemField> { private static readonly pb::MessageParser<ItemField> _parser = new pb::MessageParser<ItemField>(() => new ItemField()); @@ -783,6 +799,7 @@ namespace UnitTest.Issues.TestProtos { return new ItemField(this); } + /// <summary>Field number for the "item" field.</summary> public const int ItemFieldNumber = 1; private int item_; public int Item { @@ -886,6 +903,7 @@ namespace UnitTest.Issues.TestProtos { return new ReservedNames(this); } + /// <summary>Field number for the "types" field.</summary> public const int Types_FieldNumber = 1; private int types_; public int Types_ { @@ -895,6 +913,7 @@ namespace UnitTest.Issues.TestProtos { } } + /// <summary>Field number for the "descriptor" field.</summary> public const int Descriptor_FieldNumber = 2; private int descriptor_; public int Descriptor_ { @@ -988,6 +1007,9 @@ namespace UnitTest.Issues.TestProtos { /// <summary>Container for nested types declared in the ReservedNames message type.</summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public static partial class Types { + /// <summary> + /// Force a nested type called Types + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class SomeNestedType : pb::IMessage<SomeNestedType> { private static readonly pb::MessageParser<SomeNestedType> _parser = new pb::MessageParser<SomeNestedType>(() => new SomeNestedType()); @@ -1069,6 +1091,18 @@ namespace UnitTest.Issues.TestProtos { } + /// <summary> + /// These fields are deliberately not declared in numeric + /// order, and the oneof fields aren't contiguous either. + /// This allows for reasonably robust tests of JSON output + /// ordering. + /// TestFieldOrderings in unittest_proto3.proto is similar, + /// but doesn't include oneofs. + /// TODO: Consider adding oneofs to TestFieldOrderings, although + /// that will require fixing other tests in multiple platforms. + /// Alternatively, consider just adding this to + /// unittest_proto3.proto if multiple platforms want it. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class TestJsonFieldOrdering : pb::IMessage<TestJsonFieldOrdering> { private static readonly pb::MessageParser<TestJsonFieldOrdering> _parser = new pb::MessageParser<TestJsonFieldOrdering>(() => new TestJsonFieldOrdering()); @@ -1115,6 +1149,7 @@ namespace UnitTest.Issues.TestProtos { return new TestJsonFieldOrdering(this); } + /// <summary>Field number for the "plain_int32" field.</summary> public const int PlainInt32FieldNumber = 4; private int plainInt32_; public int PlainInt32 { @@ -1124,6 +1159,7 @@ namespace UnitTest.Issues.TestProtos { } } + /// <summary>Field number for the "o1_string" field.</summary> public const int O1StringFieldNumber = 2; public string O1String { get { return o1Case_ == O1OneofCase.O1String ? (string) o1_ : ""; } @@ -1133,6 +1169,7 @@ namespace UnitTest.Issues.TestProtos { } } + /// <summary>Field number for the "o1_int32" field.</summary> public const int O1Int32FieldNumber = 5; public int O1Int32 { get { return o1Case_ == O1OneofCase.O1Int32 ? (int) o1_ : 0; } @@ -1142,6 +1179,7 @@ namespace UnitTest.Issues.TestProtos { } } + /// <summary>Field number for the "plain_string" field.</summary> public const int PlainStringFieldNumber = 1; private string plainString_ = ""; public string PlainString { @@ -1151,6 +1189,7 @@ namespace UnitTest.Issues.TestProtos { } } + /// <summary>Field number for the "o2_int32" field.</summary> public const int O2Int32FieldNumber = 6; public int O2Int32 { get { return o2Case_ == O2OneofCase.O2Int32 ? (int) o2_ : 0; } @@ -1160,6 +1199,7 @@ namespace UnitTest.Issues.TestProtos { } } + /// <summary>Field number for the "o2_string" field.</summary> public const int O2StringFieldNumber = 3; public string O2String { get { return o2Case_ == O2OneofCase.O2String ? (string) o2_ : ""; } |