@ -25,49 +25,54 @@ namespace ProtobufUnittest {
byte [ ] descriptorData = global :: System . Convert . FromBase64String (
string . Concat (
"Ci5nb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfcHJvdG8zX29wdGlvbmFsLnBy" ,
"b3RvEhFwcm90b2J1Zl91bml0dGVzdCKxCgoSVGVzdFByb3RvM09wdGlvbmFs" ,
"EhsKDm9wdGlvbmFsX2ludDMyGAEgASgFSACIAQESGwoOb3B0aW9uYWxfaW50" ,
"NjQYAiABKANIAYgBARIcCg9vcHRpb25hbF91aW50MzIYAyABKA1IAogBARIc" ,
"Cg9vcHRpb25hbF91aW50NjQYBCABKARIA4gBARIcCg9vcHRpb25hbF9zaW50" ,
"MzIYBSABKBFIBIgBARIcCg9vcHRpb25hbF9zaW50NjQYBiABKBJIBYgBARId" ,
"ChBvcHRpb25hbF9maXhlZDMyGAcgASgHSAaIAQESHQoQb3B0aW9uYWxfZml4" ,
"ZWQ2NBgIIAEoBkgHiAEBEh4KEW9wdGlvbmFsX3NmaXhlZDMyGAkgASgPSAiI" ,
"AQESHgoRb3B0aW9uYWxfc2ZpeGVkNjQYCiABKBBICYgBARIbCg5vcHRpb25h" ,
"bF9mbG9hdBgLIAEoAkgKiAEBEhwKD29wdGlvbmFsX2RvdWJsZRgMIAEoAUgL" ,
"iAEBEhoKDW9wdGlvbmFsX2Jvb2wYDSABKAhIDIgBARIcCg9vcHRpb25hbF9z" ,
"dHJpbmcYDiABKAlIDYgBARIbCg5vcHRpb25hbF9ieXRlcxgPIAEoDEgOiAEB" ,
"Eh4KDW9wdGlvbmFsX2NvcmQYECABKAlCAggBSA+IAQESWQoXb3B0aW9uYWxf" ,
"bmVzdGVkX21lc3NhZ2UYEiABKAsyMy5wcm90b2J1Zl91bml0dGVzdC5UZXN0" ,
"UHJvdG8zT3B0aW9uYWwuTmVzdGVkTWVzc2FnZUgQiAEBElkKE2xhenlfbmVz" ,
"dGVkX21lc3NhZ2UYEyABKAsyMy5wcm90b2J1Zl91b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h" ,
"dEISChBfb3B0aW9uYWxfZG91YmxlQhAKDl9vcHRpb25hbF9ib29sQhIKEF9v" ,
"cHRpb25hbF9zdHJpbmdCEQoPX29wdGlvbmFsX2J5dGVzQhAKDl9vcHRpb25h" ,
"bF9jb3JkQhoKGF9vcHRpb25hbF9uZXN0ZWRfbWVzc2FnZUIWChRfbGF6eV9u" ,
"ZXN0ZWRfbWVzc2FnZUIXChVfb3B0aW9uYWxfbmVzdGVkX2VudW0iiQIKGVRl" ,
"c3RQcm90bzNPcHRpb25hbE1lc3NhZ2USUgoObmVzdGVkX21lc3NhZ2UYASAB" ,
"KAsyOi5wcm90b2J1Zl91bml0dGVzdC5UZXN0UHJvdG8zT3B0aW9uYWxNZXNz" ,
"YWdlLk5lc3RlZE1lc3NhZ2USYAoXb3B0aW9uYWxfbmVzdGVkX21lc3NhZ2UY" ,
"AiABKAsyOi5wcm90b2J1Zl91bml0dGVzdC5UZXN0UHJvdG8zT3B0aW9uYWxN" ,
"ZXNzYWdlLk5lc3RlZE1lc3NhZ2VIAIgBARoaCg1OZXN0ZWRNZXNzYWdlEgkK" ,
"AXMYASABKAlCGgoYX29wdGlvbmFsX25lc3RlZF9tZXNzYWdlIqkBChhQcm90" ,
"bzNPcHRpb25hbEV4dGVuc2lvbnMyPAoPZXh0X25vX29wdGlvbmFsEh8uZ29v" ,
"Z2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGIjN2akBIAEoBTJBChFleHRf" ,
"d2l0aF9vcHRpb25hbBIfLmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9u" ,
"cxiJzdmpASABKAWIAQE6DMDozM0KCMjozM0KEEIlCiFjb20uZ29vZ2xlLnBy" ,
"b3RvYnVmLnRlc3RpbmcucHJvdG9QAWIGcHJvdG8z" ) ) ;
descriptor = pbr : : FileDescriptor . FromGeneratedCode ( descriptorData ,
new pbr : : FileDescriptor [ ] { } ,
new pbr : : FileDescriptor [ ] { global :: Google . Protobuf . Reflection . DescriptorReflection . Descriptor , } ,
new pbr : : GeneratedClrTypeInfo ( null , null , new pbr : : GeneratedClrTypeInfo [ ] {
new pbr : : GeneratedClrTypeInfo ( typeof ( global :: ProtobufUnittest . TestProto3Optional ) , global :: ProtobufUnittest . TestProto3Optional . Parser , new [ ] { "OptionalInt32" , "OptionalInt64" , "OptionalUint32" , "OptionalUint64" , "OptionalSint32" , "OptionalSint64" , "OptionalFixed32" , "OptionalFixed64" , "OptionalSfixed32" , "OptionalSfixed64" , "OptionalFloat" , "OptionalDouble" , "OptionalBool" , "OptionalString" , "OptionalBytes" , "OptionalCord" , "OptionalNestedMessage" , "LazyNestedMessage" , "OptionalNestedEnum" , "SingularInt32" , "SingularInt64" } , new [ ] { "OptionalInt32" , "OptionalInt64" , "OptionalUint32" , "OptionalUint64" , "OptionalSint32" , "OptionalSint64" , "OptionalFixed32" , "OptionalFixed64" , "OptionalSfixed32" , "OptionalSfixed64" , "OptionalFloat" , "OptionalDouble" , "OptionalBool" , "OptionalString" , "OptionalBytes" , "OptionalCord" , "OptionalNestedMessage" , "LazyNestedMessage" , "OptionalNestedEnum" } , new [ ] { typeof ( global :: ProtobufUnittest . TestProto3Optional . Types . NestedEnum ) } , null , new pbr : : GeneratedClrTypeInfo [ ] { new pbr : : GeneratedClrTypeInfo ( typeof ( global :: ProtobufUnittest . TestProto3Optional . Types . NestedMessage ) , global :: ProtobufUnittest . TestProto3Optional . Types . NestedMessage . Parser , new [ ] { "Bb" } , new [ ] { "Bb" } , null , null , null ) } ) ,
new pbr : : GeneratedClrTypeInfo ( typeof ( global :: ProtobufUnittest . TestProto3OptionalMessage ) , global :: ProtobufUnittest . TestProto3OptionalMessage . Parser , new [ ] { "NestedMessage" , "OptionalNestedMessage" } , new [ ] { "OptionalNestedMessage" } , null , null , new pbr : : GeneratedClrTypeInfo [ ] { new pbr : : GeneratedClrTypeInfo ( typeof ( global :: ProtobufUnittest . TestProto3OptionalMessage . Types . NestedMessage ) , global :: ProtobufUnittest . TestProto3OptionalMessage . Types . NestedMessage . Parser , new [ ] { "S" } , null , null , null , null ) } )
new pbr : : GeneratedClrTypeInfo ( typeof ( global :: ProtobufUnittest . TestProto3OptionalMessage ) , global :: ProtobufUnittest . TestProto3OptionalMessage . Parser , new [ ] { "NestedMessage" , "OptionalNestedMessage" } , new [ ] { "OptionalNestedMessage" } , null , null , new pbr : : GeneratedClrTypeInfo [ ] { new pbr : : GeneratedClrTypeInfo ( typeof ( global :: ProtobufUnittest . TestProto3OptionalMessage . Types . NestedMessage ) , global :: ProtobufUnittest . TestProto3OptionalMessage . Types . NestedMessage . Parser , new [ ] { "S" } , null , null , null , null ) } ) ,
new pbr : : GeneratedClrTypeInfo ( typeof ( global :: ProtobufUnittest . Proto3OptionalExtensions ) , global :: ProtobufUnittest . Proto3OptionalExtensions . Parser , null , null , null , new pb : : Extension [ ] { global :: ProtobufUnittest . Proto3OptionalExtensions . Extensions . ExtNoOptional , global :: ProtobufUnittest . Proto3OptionalExtensions . Extensions . ExtWithOptional } , null )
} ) ) ;
}
# endregion
@ -1789,6 +1794,153 @@ namespace ProtobufUnittest {
}
public sealed partial class Proto3OptionalExtensions : pb : : IMessage < Proto3OptionalExtensions >
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb : : IBufferMessage
# endif
{
private static readonly pb : : MessageParser < Proto3OptionalExtensions > _ parser = new pb : : MessageParser < Proto3OptionalExtensions > ( ( ) = > new Proto3OptionalExtensions ( ) ) ;
private pb : : UnknownFieldSet _ unknownFields ;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb : : MessageParser < Proto3OptionalExtensions > Parser { get { return _ parser ; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr : : MessageDescriptor Descriptor {
get { return global :: ProtobufUnittest . UnittestProto3OptionalReflection . Descriptor . MessageTypes [ 2 ] ; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr : : MessageDescriptor pb : : IMessage . Descriptor {
get { return Descriptor ; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Proto3OptionalExtensions ( ) {
OnConstruction ( ) ;
}
partial void OnConstruction ( ) ;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Proto3OptionalExtensions ( Proto3OptionalExtensions other ) : this ( ) {
_ unknownFields = pb : : UnknownFieldSet . Clone ( other . _ unknownFields ) ;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Proto3OptionalExtensions Clone ( ) {
return new Proto3OptionalExtensions ( this ) ;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals ( object other ) {
return Equals ( other as Proto3OptionalExtensions ) ;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals ( Proto3OptionalExtensions other ) {
if ( ReferenceEquals ( other , null ) ) {
return false ;
}
if ( ReferenceEquals ( other , this ) ) {
return true ;
}
return Equals ( _ unknownFields , other . _ unknownFields ) ;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode ( ) {
int hash = 1 ;
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 !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output . WriteRawMessage ( this ) ;
# else
if ( _ unknownFields ! = null ) {
_ unknownFields . WriteTo ( output ) ;
}
# endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb : : IBufferMessage . InternalWriteTo ( ref pb : : WriteContext output ) {
if ( _ unknownFields ! = null ) {
_ unknownFields . WriteTo ( ref output ) ;
}
}
# endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize ( ) {
int size = 0 ;
if ( _ unknownFields ! = null ) {
size + = _ unknownFields . CalculateSize ( ) ;
}
return size ;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom ( Proto3OptionalExtensions other ) {
if ( other = = null ) {
return ;
}
_ 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 ;
}
}
# 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 ;
}
}
}
# endif
#region Extensions
/// <summary>Container for extensions for other messages declared in the Proto3OptionalExtensions message type.</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static partial class Extensions {
public static readonly pb : : Extension < global :: Google . Protobuf . Reflection . MessageOptions , int > ExtNoOptional =
new pb : : Extension < global :: Google . Protobuf . Reflection . MessageOptions , int > ( 3 5 5 8 8 6 7 2 8 , pb : : FieldCodec . ForInt32 ( 2 8 4 7 0 9 3 8 2 4 , 0 ) ) ;
public static readonly pb : : Extension < global :: Google . Protobuf . Reflection . MessageOptions , int > ExtWithOptional =
new pb : : Extension < global :: Google . Protobuf . Reflection . MessageOptions , int > ( 3 5 5 8 8 6 7 2 9 , pb : : FieldCodec . ForInt32 ( 2 8 4 7 0 9 3 8 3 2 , 0 ) ) ;
}
# endregion
}
# endregion
}