|
@@ -24,36 +24,39 @@ namespace UnitTest.Issues.TestProtos {
|
|
static UnittestIssuesReflection() {
|
|
static UnittestIssuesReflection() {
|
|
byte[] descriptorData = global::System.Convert.FromBase64String(
|
|
byte[] descriptorData = global::System.Convert.FromBase64String(
|
|
string.Concat(
|
|
string.Concat(
|
|
- "ChV1bml0dGVzdF9pc3N1ZXMucHJvdG8SD3VuaXR0ZXN0X2lzc3VlcyInCghJ",
|
|
|
|
- "c3N1ZTMwNxobCgpOZXN0ZWRPbmNlGg0KC05lc3RlZFR3aWNlIrABChNOZWdh",
|
|
|
|
- "dGl2ZUVudW1NZXNzYWdlEiwKBXZhbHVlGAEgASgOMh0udW5pdHRlc3RfaXNz",
|
|
|
|
- "dWVzLk5lZ2F0aXZlRW51bRIxCgZ2YWx1ZXMYAiADKA4yHS51bml0dGVzdF9p",
|
|
|
|
- "c3N1ZXMuTmVnYXRpdmVFbnVtQgIQABI4Cg1wYWNrZWRfdmFsdWVzGAMgAygO",
|
|
|
|
- "Mh0udW5pdHRlc3RfaXNzdWVzLk5lZ2F0aXZlRW51bUICEAEiEQoPRGVwcmVj",
|
|
|
|
- "YXRlZENoaWxkIrkCChdEZXByZWNhdGVkRmllbGRzTWVzc2FnZRIaCg5Qcmlt",
|
|
|
|
- "aXRpdmVWYWx1ZRgBIAEoBUICGAESGgoOUHJpbWl0aXZlQXJyYXkYAiADKAVC",
|
|
|
|
- "AhgBEjoKDE1lc3NhZ2VWYWx1ZRgDIAEoCzIgLnVuaXR0ZXN0X2lzc3Vlcy5E",
|
|
|
|
- "ZXByZWNhdGVkQ2hpbGRCAhgBEjoKDE1lc3NhZ2VBcnJheRgEIAMoCzIgLnVu",
|
|
|
|
- "aXR0ZXN0X2lzc3Vlcy5EZXByZWNhdGVkQ2hpbGRCAhgBEjYKCUVudW1WYWx1",
|
|
|
|
- "ZRgFIAEoDjIfLnVuaXR0ZXN0X2lzc3Vlcy5EZXByZWNhdGVkRW51bUICGAES",
|
|
|
|
- "Ngo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i4KDkRlcHJlY2F0ZWRFbnVt",
|
|
|
|
+ "EhMKD0RFUFJFQ0FURURfWkVSTxAAEgcKA29uZRABQh2qAhpVbml0VGVzdC5J",
|
|
|
|
+ "c3N1ZXMuVGVzdFByb3Rvc2IGcHJvdG8z"));
|
|
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
|
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
|
- new pbr::FileDescriptor[] { },
|
|
|
|
|
|
+ new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor, },
|
|
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::UnitTest.Issues.TestProtos.NegativeEnum), typeof(global::UnitTest.Issues.TestProtos.DeprecatedEnum), }, null, new pbr::GeneratedClrTypeInfo[] {
|
|
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::UnitTest.Issues.TestProtos.NegativeEnum), typeof(global::UnitTest.Issues.TestProtos.DeprecatedEnum), }, null, new pbr::GeneratedClrTypeInfo[] {
|
|
new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Issue307), global::UnitTest.Issues.TestProtos.Issue307.Parser, null, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce), global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Parser, null, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Types.NestedTwice), global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Types.NestedTwice.Parser, null, null, null, null, null)})}),
|
|
new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Issue307), global::UnitTest.Issues.TestProtos.Issue307.Parser, null, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce), global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Parser, null, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Types.NestedTwice), global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Types.NestedTwice.Parser, null, null, null, null, null)})}),
|
|
new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.NegativeEnumMessage), global::UnitTest.Issues.TestProtos.NegativeEnumMessage.Parser, new[]{ "Value", "Values", "PackedValues" }, null, null, null, null),
|
|
new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.NegativeEnumMessage), global::UnitTest.Issues.TestProtos.NegativeEnumMessage.Parser, new[]{ "Value", "Values", "PackedValues" }, null, null, null, null),
|
|
@@ -63,7 +66,8 @@ namespace UnitTest.Issues.TestProtos {
|
|
new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.ReservedNames), global::UnitTest.Issues.TestProtos.ReservedNames.Parser, new[]{ "Types_", "Descriptor_" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.ReservedNames.Types.SomeNestedType), global::UnitTest.Issues.TestProtos.ReservedNames.Types.SomeNestedType.Parser, null, null, null, null, null)}),
|
|
new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.ReservedNames), global::UnitTest.Issues.TestProtos.ReservedNames.Parser, new[]{ "Types_", "Descriptor_" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.ReservedNames.Types.SomeNestedType), global::UnitTest.Issues.TestProtos.ReservedNames.Types.SomeNestedType.Parser, null, null, null, null, null)}),
|
|
new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.TestJsonFieldOrdering), global::UnitTest.Issues.TestProtos.TestJsonFieldOrdering.Parser, new[]{ "PlainInt32", "O1String", "O1Int32", "PlainString", "O2Int32", "O2String" }, new[]{ "O1", "O2" }, null, null, null),
|
|
new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.TestJsonFieldOrdering), global::UnitTest.Issues.TestProtos.TestJsonFieldOrdering.Parser, new[]{ "PlainInt32", "O1String", "O1Int32", "PlainString", "O2Int32", "O2String" }, new[]{ "O1", "O2" }, null, null, null),
|
|
new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.TestJsonName), global::UnitTest.Issues.TestProtos.TestJsonName.Parser, new[]{ "Name", "Description", "Guid" }, null, null, null, null),
|
|
new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.TestJsonName), global::UnitTest.Issues.TestProtos.TestJsonName.Parser, new[]{ "Name", "Description", "Guid" }, null, null, null, null),
|
|
- new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.OneofMerging), global::UnitTest.Issues.TestProtos.OneofMerging.Parser, new[]{ "Text", "Nested" }, new[]{ "Value" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested), global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested.Parser, new[]{ "X", "Y" }, null, null, null, null)})
|
|
|
|
|
|
+ new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.OneofMerging), global::UnitTest.Issues.TestProtos.OneofMerging.Parser, new[]{ "Text", "Nested" }, new[]{ "Value" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested), global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested.Parser, new[]{ "X", "Y" }, null, null, null, null)}),
|
|
|
|
+ new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.NullValueOutsideStruct), global::UnitTest.Issues.TestProtos.NullValueOutsideStruct.Parser, new[]{ "StringValue", "NullValue" }, new[]{ "Value" }, null, null, null)
|
|
}));
|
|
}));
|
|
}
|
|
}
|
|
#endregion
|
|
#endregion
|
|
@@ -2884,6 +2888,226 @@ namespace UnitTest.Issues.TestProtos {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public sealed partial class NullValueOutsideStruct : pb::IMessage<NullValueOutsideStruct>
|
|
|
|
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
|
|
|
+ , pb::IBufferMessage
|
|
|
|
+ #endif
|
|
|
|
+ {
|
|
|
|
+ private static readonly pb::MessageParser<NullValueOutsideStruct> _parser = new pb::MessageParser<NullValueOutsideStruct>(() => new NullValueOutsideStruct());
|
|
|
|
+ private pb::UnknownFieldSet _unknownFields;
|
|
|
|
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
|
|
|
+ public static pb::MessageParser<NullValueOutsideStruct> Parser { get { return _parser; } }
|
|
|
|
+
|
|
|
|
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
|
|
|
+ public static pbr::MessageDescriptor Descriptor {
|
|
|
|
+ get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[9]; }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
|
|
|
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
|
|
|
|
+ get { return Descriptor; }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
|
|
|
+ public NullValueOutsideStruct() {
|
|
|
|
+ OnConstruction();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ partial void OnConstruction();
|
|
|
|
+
|
|
|
|
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
|
|
|
+ public NullValueOutsideStruct(NullValueOutsideStruct other) : this() {
|
|
|
|
+ switch (other.ValueCase) {
|
|
|
|
+ case ValueOneofCase.StringValue:
|
|
|
|
+ StringValue = other.StringValue;
|
|
|
|
+ break;
|
|
|
|
+ case ValueOneofCase.NullValue:
|
|
|
|
+ NullValue = other.NullValue;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
|
|
|
+ public NullValueOutsideStruct Clone() {
|
|
|
|
+ return new NullValueOutsideStruct(this);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// <summary>Field number for the "string_value" field.</summary>
|
|
|
|
+ public const int StringValueFieldNumber = 1;
|
|
|
|
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
|
|
|
+ public string StringValue {
|
|
|
|
+ get { return valueCase_ == ValueOneofCase.StringValue ? (string) value_ : ""; }
|
|
|
|
+ set {
|
|
|
|
+ value_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
|
|
|
|
+ valueCase_ = ValueOneofCase.StringValue;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// <summary>Field number for the "null_value" field.</summary>
|
|
|
|
+ public const int NullValueFieldNumber = 2;
|
|
|
|
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
|
|
|
+ public global::Google.Protobuf.WellKnownTypes.NullValue NullValue {
|
|
|
|
+ get { return valueCase_ == ValueOneofCase.NullValue ? (global::Google.Protobuf.WellKnownTypes.NullValue) value_ : global::Google.Protobuf.WellKnownTypes.NullValue.NullValue; }
|
|
|
|
+ set {
|
|
|
|
+ value_ = value;
|
|
|
|
+ valueCase_ = ValueOneofCase.NullValue;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private object value_;
|
|
|
|
+ /// <summary>Enum of possible cases for the "value" oneof.</summary>
|
|
|
|
+ public enum ValueOneofCase {
|
|
|
|
+ None = 0,
|
|
|
|
+ StringValue = 1,
|
|
|
|
+ NullValue = 2,
|
|
|
|
+ }
|
|
|
|
+ private ValueOneofCase valueCase_ = ValueOneofCase.None;
|
|
|
|
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
|
|
|
+ public ValueOneofCase ValueCase {
|
|
|
|
+ get { return valueCase_; }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
|
|
|
+ public void ClearValue() {
|
|
|
|
+ valueCase_ = ValueOneofCase.None;
|
|
|
|
+ value_ = null;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
|
|
|
+ public override bool Equals(object other) {
|
|
|
|
+ return Equals(other as NullValueOutsideStruct);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
|
|
|
+ public bool Equals(NullValueOutsideStruct other) {
|
|
|
|
+ if (ReferenceEquals(other, null)) {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ if (ReferenceEquals(other, this)) {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ if (StringValue != other.StringValue) return false;
|
|
|
|
+ if (NullValue != other.NullValue) return false;
|
|
|
|
+ if (ValueCase != other.ValueCase) return false;
|
|
|
|
+ return Equals(_unknownFields, other._unknownFields);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
|
|
|
+ public override int GetHashCode() {
|
|
|
|
+ int hash = 1;
|
|
|
|
+ if (valueCase_ == ValueOneofCase.StringValue) hash ^= StringValue.GetHashCode();
|
|
|
|
+ if (valueCase_ == ValueOneofCase.NullValue) hash ^= NullValue.GetHashCode();
|
|
|
|
+ hash ^= (int) valueCase_;
|
|
|
|
+ if (_unknownFields != null) {
|
|
|
|
+ hash ^= _unknownFields.GetHashCode();
|
|
|
|
+ }
|
|
|
|
+ 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 (valueCase_ == ValueOneofCase.StringValue) {
|
|
|
|
+ output.WriteRawTag(10);
|
|
|
|
+ output.WriteString(StringValue);
|
|
|
|
+ }
|
|
|
|
+ if (valueCase_ == ValueOneofCase.NullValue) {
|
|
|
|
+ output.WriteRawTag(16);
|
|
|
|
+ output.WriteEnum((int) NullValue);
|
|
|
|
+ }
|
|
|
|
+ if (_unknownFields != null) {
|
|
|
|
+ _unknownFields.WriteTo(output);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
|
|
|
+ public int CalculateSize() {
|
|
|
|
+ int size = 0;
|
|
|
|
+ if (valueCase_ == ValueOneofCase.StringValue) {
|
|
|
|
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(StringValue);
|
|
|
|
+ }
|
|
|
|
+ if (valueCase_ == ValueOneofCase.NullValue) {
|
|
|
|
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) NullValue);
|
|
|
|
+ }
|
|
|
|
+ if (_unknownFields != null) {
|
|
|
|
+ size += _unknownFields.CalculateSize();
|
|
|
|
+ }
|
|
|
|
+ return size;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
|
|
|
+ public void MergeFrom(NullValueOutsideStruct other) {
|
|
|
|
+ if (other == null) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ switch (other.ValueCase) {
|
|
|
|
+ case ValueOneofCase.StringValue:
|
|
|
|
+ StringValue = other.StringValue;
|
|
|
|
+ break;
|
|
|
|
+ case ValueOneofCase.NullValue:
|
|
|
|
+ NullValue = other.NullValue;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
|
|
|
+ public void MergeFrom(pb::CodedInputStream input) {
|
|
|
|
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
|
|
|
+ input.ReadRawMessage(this);
|
|
|
|
+ #else
|
|
|
|
+ uint tag;
|
|
|
|
+ while ((tag = input.ReadTag()) != 0) {
|
|
|
|
+ switch(tag) {
|
|
|
|
+ default:
|
|
|
|
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
|
|
|
+ break;
|
|
|
|
+ case 10: {
|
|
|
|
+ StringValue = input.ReadString();
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ case 16: {
|
|
|
|
+ value_ = input.ReadEnum();
|
|
|
|
+ valueCase_ = ValueOneofCase.NullValue;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ #endif
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
|
|
|
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
|
|
|
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
|
|
|
+ uint tag;
|
|
|
|
+ while ((tag = input.ReadTag()) != 0) {
|
|
|
|
+ switch(tag) {
|
|
|
|
+ default:
|
|
|
|
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
|
|
|
+ break;
|
|
|
|
+ case 10: {
|
|
|
|
+ StringValue = input.ReadString();
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ case 16: {
|
|
|
|
+ value_ = input.ReadEnum();
|
|
|
|
+ valueCase_ = ValueOneofCase.NullValue;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ #endif
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
}
|
|
}
|