Files
2026-06-04 11:42:34 +02:00

688 lines
16 KiB
C#

using System;
using System.Diagnostics;
namespace Google.Protobuf.Reflection
{
// Token: 0x02000044 RID: 68
internal sealed class FieldDescriptorProto : IMessage<FieldDescriptorProto>, IMessage, IEquatable<FieldDescriptorProto>, IDeepCloneable<FieldDescriptorProto>
{
// Token: 0x170000E6 RID: 230
// (get) Token: 0x060003D9 RID: 985 RVA: 0x0000F1DE File Offset: 0x0000D3DE
[DebuggerNonUserCode]
public static MessageParser<FieldDescriptorProto> Parser
{
get
{
return FieldDescriptorProto._parser;
}
}
// Token: 0x170000E7 RID: 231
// (get) Token: 0x060003DA RID: 986 RVA: 0x0000F1E5 File Offset: 0x0000D3E5
[DebuggerNonUserCode]
public static MessageDescriptor Descriptor
{
get
{
return DescriptorReflection.Descriptor.MessageTypes[3];
}
}
// Token: 0x170000E8 RID: 232
// (get) Token: 0x060003DB RID: 987 RVA: 0x0000F1F7 File Offset: 0x0000D3F7
[DebuggerNonUserCode]
MessageDescriptor IMessage.Descriptor
{
get
{
return FieldDescriptorProto.Descriptor;
}
}
// Token: 0x060003DC RID: 988 RVA: 0x0000F200 File Offset: 0x0000D400
[DebuggerNonUserCode]
public FieldDescriptorProto()
{
this.OnConstruction();
}
// Token: 0x060003DD RID: 989 RVA: 0x0000F250 File Offset: 0x0000D450
private void OnConstruction()
{
this.OneofIndex = -1;
}
// Token: 0x060003DE RID: 990 RVA: 0x0000F25C File Offset: 0x0000D45C
[DebuggerNonUserCode]
public FieldDescriptorProto(FieldDescriptorProto other)
: this()
{
this.name_ = other.name_;
this.number_ = other.number_;
this.label_ = other.label_;
this.type_ = other.type_;
this.typeName_ = other.typeName_;
this.extendee_ = other.extendee_;
this.defaultValue_ = other.defaultValue_;
this.oneofIndex_ = other.oneofIndex_;
this.jsonName_ = other.jsonName_;
this.Options = ((other.options_ != null) ? other.Options.Clone() : null);
}
// Token: 0x060003DF RID: 991 RVA: 0x0000F2F7 File Offset: 0x0000D4F7
[DebuggerNonUserCode]
public FieldDescriptorProto Clone()
{
return new FieldDescriptorProto(this);
}
// Token: 0x170000E9 RID: 233
// (get) Token: 0x060003E0 RID: 992 RVA: 0x0000F2FF File Offset: 0x0000D4FF
// (set) Token: 0x060003E1 RID: 993 RVA: 0x0000F307 File Offset: 0x0000D507
[DebuggerNonUserCode]
public string Name
{
get
{
return this.name_;
}
set
{
this.name_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
}
}
// Token: 0x170000EA RID: 234
// (get) Token: 0x060003E2 RID: 994 RVA: 0x0000F31A File Offset: 0x0000D51A
// (set) Token: 0x060003E3 RID: 995 RVA: 0x0000F322 File Offset: 0x0000D522
[DebuggerNonUserCode]
public int Number
{
get
{
return this.number_;
}
set
{
this.number_ = value;
}
}
// Token: 0x170000EB RID: 235
// (get) Token: 0x060003E4 RID: 996 RVA: 0x0000F32B File Offset: 0x0000D52B
// (set) Token: 0x060003E5 RID: 997 RVA: 0x0000F333 File Offset: 0x0000D533
[DebuggerNonUserCode]
public FieldDescriptorProto.Types.Label Label
{
get
{
return this.label_;
}
set
{
this.label_ = value;
}
}
// Token: 0x170000EC RID: 236
// (get) Token: 0x060003E6 RID: 998 RVA: 0x0000F33C File Offset: 0x0000D53C
// (set) Token: 0x060003E7 RID: 999 RVA: 0x0000F344 File Offset: 0x0000D544
[DebuggerNonUserCode]
public FieldDescriptorProto.Types.Type Type
{
get
{
return this.type_;
}
set
{
this.type_ = value;
}
}
// Token: 0x170000ED RID: 237
// (get) Token: 0x060003E8 RID: 1000 RVA: 0x0000F34D File Offset: 0x0000D54D
// (set) Token: 0x060003E9 RID: 1001 RVA: 0x0000F355 File Offset: 0x0000D555
[DebuggerNonUserCode]
public string TypeName
{
get
{
return this.typeName_;
}
set
{
this.typeName_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
}
}
// Token: 0x170000EE RID: 238
// (get) Token: 0x060003EA RID: 1002 RVA: 0x0000F368 File Offset: 0x0000D568
// (set) Token: 0x060003EB RID: 1003 RVA: 0x0000F370 File Offset: 0x0000D570
[DebuggerNonUserCode]
public string Extendee
{
get
{
return this.extendee_;
}
set
{
this.extendee_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
}
}
// Token: 0x170000EF RID: 239
// (get) Token: 0x060003EC RID: 1004 RVA: 0x0000F383 File Offset: 0x0000D583
// (set) Token: 0x060003ED RID: 1005 RVA: 0x0000F38B File Offset: 0x0000D58B
[DebuggerNonUserCode]
public string DefaultValue
{
get
{
return this.defaultValue_;
}
set
{
this.defaultValue_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
}
}
// Token: 0x170000F0 RID: 240
// (get) Token: 0x060003EE RID: 1006 RVA: 0x0000F39E File Offset: 0x0000D59E
// (set) Token: 0x060003EF RID: 1007 RVA: 0x0000F3A6 File Offset: 0x0000D5A6
[DebuggerNonUserCode]
public int OneofIndex
{
get
{
return this.oneofIndex_;
}
set
{
this.oneofIndex_ = value;
}
}
// Token: 0x170000F1 RID: 241
// (get) Token: 0x060003F0 RID: 1008 RVA: 0x0000F3AF File Offset: 0x0000D5AF
// (set) Token: 0x060003F1 RID: 1009 RVA: 0x0000F3B7 File Offset: 0x0000D5B7
[DebuggerNonUserCode]
public string JsonName
{
get
{
return this.jsonName_;
}
set
{
this.jsonName_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
}
}
// Token: 0x170000F2 RID: 242
// (get) Token: 0x060003F2 RID: 1010 RVA: 0x0000F3CA File Offset: 0x0000D5CA
// (set) Token: 0x060003F3 RID: 1011 RVA: 0x0000F3D2 File Offset: 0x0000D5D2
[DebuggerNonUserCode]
public FieldOptions Options
{
get
{
return this.options_;
}
set
{
this.options_ = value;
}
}
// Token: 0x060003F4 RID: 1012 RVA: 0x0000F3DB File Offset: 0x0000D5DB
[DebuggerNonUserCode]
public override bool Equals(object other)
{
return this.Equals(other as FieldDescriptorProto);
}
// Token: 0x060003F5 RID: 1013 RVA: 0x0000F3EC File Offset: 0x0000D5EC
[DebuggerNonUserCode]
public bool Equals(FieldDescriptorProto other)
{
return other != null && (other == this || (!(this.Name != other.Name) && this.Number == other.Number && this.Label == other.Label && this.Type == other.Type && !(this.TypeName != other.TypeName) && !(this.Extendee != other.Extendee) && !(this.DefaultValue != other.DefaultValue) && this.OneofIndex == other.OneofIndex && !(this.JsonName != other.JsonName) && object.Equals(this.Options, other.Options)));
}
// Token: 0x060003F6 RID: 1014 RVA: 0x0000F4C4 File Offset: 0x0000D6C4
[DebuggerNonUserCode]
public override int GetHashCode()
{
int num = 1;
if (this.Name.Length != 0)
{
num ^= this.Name.GetHashCode();
}
if (this.Number != 0)
{
num ^= this.Number.GetHashCode();
}
if (this.Label != (FieldDescriptorProto.Types.Label)0)
{
num ^= this.Label.GetHashCode();
}
if (this.Type != (FieldDescriptorProto.Types.Type)0)
{
num ^= this.Type.GetHashCode();
}
if (this.TypeName.Length != 0)
{
num ^= this.TypeName.GetHashCode();
}
if (this.Extendee.Length != 0)
{
num ^= this.Extendee.GetHashCode();
}
if (this.DefaultValue.Length != 0)
{
num ^= this.DefaultValue.GetHashCode();
}
if (this.OneofIndex != 0)
{
num ^= this.OneofIndex.GetHashCode();
}
if (this.JsonName.Length != 0)
{
num ^= this.JsonName.GetHashCode();
}
if (this.options_ != null)
{
num ^= this.Options.GetHashCode();
}
return num;
}
// Token: 0x060003F7 RID: 1015 RVA: 0x00007C02 File Offset: 0x00005E02
[DebuggerNonUserCode]
public override string ToString()
{
return JsonFormatter.ToDiagnosticString(this);
}
// Token: 0x060003F8 RID: 1016 RVA: 0x0000F5E4 File Offset: 0x0000D7E4
[DebuggerNonUserCode]
public void WriteTo(CodedOutputStream output)
{
if (this.Name.Length != 0)
{
output.WriteRawTag(10);
output.WriteString(this.Name);
}
if (this.Extendee.Length != 0)
{
output.WriteRawTag(18);
output.WriteString(this.Extendee);
}
if (this.Number != 0)
{
output.WriteRawTag(24);
output.WriteInt32(this.Number);
}
if (this.Label != (FieldDescriptorProto.Types.Label)0)
{
output.WriteRawTag(32);
output.WriteEnum((int)this.Label);
}
if (this.Type != (FieldDescriptorProto.Types.Type)0)
{
output.WriteRawTag(40);
output.WriteEnum((int)this.Type);
}
if (this.TypeName.Length != 0)
{
output.WriteRawTag(50);
output.WriteString(this.TypeName);
}
if (this.DefaultValue.Length != 0)
{
output.WriteRawTag(58);
output.WriteString(this.DefaultValue);
}
if (this.options_ != null)
{
output.WriteRawTag(66);
output.WriteMessage(this.Options);
}
if (this.OneofIndex != 0)
{
output.WriteRawTag(72);
output.WriteInt32(this.OneofIndex);
}
if (this.JsonName.Length != 0)
{
output.WriteRawTag(82);
output.WriteString(this.JsonName);
}
}
// Token: 0x060003F9 RID: 1017 RVA: 0x0000F724 File Offset: 0x0000D924
[DebuggerNonUserCode]
public int CalculateSize()
{
int num = 0;
if (this.Name.Length != 0)
{
num += 1 + CodedOutputStream.ComputeStringSize(this.Name);
}
if (this.Number != 0)
{
num += 1 + CodedOutputStream.ComputeInt32Size(this.Number);
}
if (this.Label != (FieldDescriptorProto.Types.Label)0)
{
num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Label);
}
if (this.Type != (FieldDescriptorProto.Types.Type)0)
{
num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Type);
}
if (this.TypeName.Length != 0)
{
num += 1 + CodedOutputStream.ComputeStringSize(this.TypeName);
}
if (this.Extendee.Length != 0)
{
num += 1 + CodedOutputStream.ComputeStringSize(this.Extendee);
}
if (this.DefaultValue.Length != 0)
{
num += 1 + CodedOutputStream.ComputeStringSize(this.DefaultValue);
}
if (this.OneofIndex != 0)
{
num += 1 + CodedOutputStream.ComputeInt32Size(this.OneofIndex);
}
if (this.JsonName.Length != 0)
{
num += 1 + CodedOutputStream.ComputeStringSize(this.JsonName);
}
if (this.options_ != null)
{
num += 1 + CodedOutputStream.ComputeMessageSize(this.Options);
}
return num;
}
// Token: 0x060003FA RID: 1018 RVA: 0x0000F840 File Offset: 0x0000DA40
[DebuggerNonUserCode]
public void MergeFrom(FieldDescriptorProto other)
{
if (other == null)
{
return;
}
if (other.Name.Length != 0)
{
this.Name = other.Name;
}
if (other.Number != 0)
{
this.Number = other.Number;
}
if (other.Label != (FieldDescriptorProto.Types.Label)0)
{
this.Label = other.Label;
}
if (other.Type != (FieldDescriptorProto.Types.Type)0)
{
this.Type = other.Type;
}
if (other.TypeName.Length != 0)
{
this.TypeName = other.TypeName;
}
if (other.Extendee.Length != 0)
{
this.Extendee = other.Extendee;
}
if (other.DefaultValue.Length != 0)
{
this.DefaultValue = other.DefaultValue;
}
if (other.OneofIndex != 0)
{
this.OneofIndex = other.OneofIndex;
}
if (other.JsonName.Length != 0)
{
this.JsonName = other.JsonName;
}
if (other.options_ != null)
{
if (this.options_ == null)
{
this.options_ = new FieldOptions();
}
this.Options.MergeFrom(other.Options);
}
}
// Token: 0x060003FB RID: 1019 RVA: 0x0000F94C File Offset: 0x0000DB4C
[DebuggerNonUserCode]
public void MergeFrom(CodedInputStream input)
{
uint num;
while ((num = input.ReadTag()) != 0U)
{
if (num <= 40U)
{
if (num <= 18U)
{
if (num == 10U)
{
this.Name = input.ReadString();
continue;
}
if (num == 18U)
{
this.Extendee = input.ReadString();
continue;
}
}
else
{
if (num == 24U)
{
this.Number = input.ReadInt32();
continue;
}
if (num == 32U)
{
this.label_ = (FieldDescriptorProto.Types.Label)input.ReadEnum();
continue;
}
if (num == 40U)
{
this.type_ = (FieldDescriptorProto.Types.Type)input.ReadEnum();
continue;
}
}
}
else if (num <= 58U)
{
if (num == 50U)
{
this.TypeName = input.ReadString();
continue;
}
if (num == 58U)
{
this.DefaultValue = input.ReadString();
continue;
}
}
else
{
if (num == 66U)
{
if (this.options_ == null)
{
this.options_ = new FieldOptions();
}
input.ReadMessage(this.options_);
continue;
}
if (num == 72U)
{
this.OneofIndex = input.ReadInt32();
continue;
}
if (num == 82U)
{
this.JsonName = input.ReadString();
continue;
}
}
input.SkipLastField();
}
}
// Token: 0x04000156 RID: 342
private static readonly MessageParser<FieldDescriptorProto> _parser = new MessageParser<FieldDescriptorProto>(() => new FieldDescriptorProto());
// Token: 0x04000157 RID: 343
public const int NameFieldNumber = 1;
// Token: 0x04000158 RID: 344
private string name_ = "";
// Token: 0x04000159 RID: 345
public const int NumberFieldNumber = 3;
// Token: 0x0400015A RID: 346
private int number_;
// Token: 0x0400015B RID: 347
public const int LabelFieldNumber = 4;
// Token: 0x0400015C RID: 348
private FieldDescriptorProto.Types.Label label_;
// Token: 0x0400015D RID: 349
public const int TypeFieldNumber = 5;
// Token: 0x0400015E RID: 350
private FieldDescriptorProto.Types.Type type_;
// Token: 0x0400015F RID: 351
public const int TypeNameFieldNumber = 6;
// Token: 0x04000160 RID: 352
private string typeName_ = "";
// Token: 0x04000161 RID: 353
public const int ExtendeeFieldNumber = 2;
// Token: 0x04000162 RID: 354
private string extendee_ = "";
// Token: 0x04000163 RID: 355
public const int DefaultValueFieldNumber = 7;
// Token: 0x04000164 RID: 356
private string defaultValue_ = "";
// Token: 0x04000165 RID: 357
public const int OneofIndexFieldNumber = 9;
// Token: 0x04000166 RID: 358
private int oneofIndex_;
// Token: 0x04000167 RID: 359
public const int JsonNameFieldNumber = 10;
// Token: 0x04000168 RID: 360
private string jsonName_ = "";
// Token: 0x04000169 RID: 361
public const int OptionsFieldNumber = 8;
// Token: 0x0400016A RID: 362
private FieldOptions options_;
// Token: 0x020000A6 RID: 166
[DebuggerNonUserCode]
public static class Types
{
// Token: 0x020000D7 RID: 215
internal enum Type
{
// Token: 0x0400034F RID: 847
[OriginalName("TYPE_DOUBLE")]
Double = 1,
// Token: 0x04000350 RID: 848
[OriginalName("TYPE_FLOAT")]
Float,
// Token: 0x04000351 RID: 849
[OriginalName("TYPE_INT64")]
Int64,
// Token: 0x04000352 RID: 850
[OriginalName("TYPE_UINT64")]
Uint64,
// Token: 0x04000353 RID: 851
[OriginalName("TYPE_INT32")]
Int32,
// Token: 0x04000354 RID: 852
[OriginalName("TYPE_FIXED64")]
Fixed64,
// Token: 0x04000355 RID: 853
[OriginalName("TYPE_FIXED32")]
Fixed32,
// Token: 0x04000356 RID: 854
[OriginalName("TYPE_BOOL")]
Bool,
// Token: 0x04000357 RID: 855
[OriginalName("TYPE_STRING")]
String,
// Token: 0x04000358 RID: 856
[OriginalName("TYPE_GROUP")]
Group,
// Token: 0x04000359 RID: 857
[OriginalName("TYPE_MESSAGE")]
Message,
// Token: 0x0400035A RID: 858
[OriginalName("TYPE_BYTES")]
Bytes,
// Token: 0x0400035B RID: 859
[OriginalName("TYPE_UINT32")]
Uint32,
// Token: 0x0400035C RID: 860
[OriginalName("TYPE_ENUM")]
Enum,
// Token: 0x0400035D RID: 861
[OriginalName("TYPE_SFIXED32")]
Sfixed32,
// Token: 0x0400035E RID: 862
[OriginalName("TYPE_SFIXED64")]
Sfixed64,
// Token: 0x0400035F RID: 863
[OriginalName("TYPE_SINT32")]
Sint32,
// Token: 0x04000360 RID: 864
[OriginalName("TYPE_SINT64")]
Sint64
}
// Token: 0x020000D8 RID: 216
internal enum Label
{
// Token: 0x04000362 RID: 866
[OriginalName("LABEL_OPTIONAL")]
Optional = 1,
// Token: 0x04000363 RID: 867
[OriginalName("LABEL_REQUIRED")]
Required,
// Token: 0x04000364 RID: 868
[OriginalName("LABEL_REPEATED")]
Repeated
}
}
}
}