using System; using System.Diagnostics; using Google.Protobuf.Collections; namespace Google.Protobuf.Reflection { // Token: 0x02000042 RID: 66 internal sealed class FileDescriptorProto : IMessage, IMessage, IEquatable, IDeepCloneable { // Token: 0x170000CA RID: 202 // (get) Token: 0x0600039E RID: 926 RVA: 0x0000DFC0 File Offset: 0x0000C1C0 [DebuggerNonUserCode] public static MessageParser Parser { get { return FileDescriptorProto._parser; } } // Token: 0x170000CB RID: 203 // (get) Token: 0x0600039F RID: 927 RVA: 0x0000DFC7 File Offset: 0x0000C1C7 [DebuggerNonUserCode] public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[1]; } } // Token: 0x170000CC RID: 204 // (get) Token: 0x060003A0 RID: 928 RVA: 0x0000DFD9 File Offset: 0x0000C1D9 [DebuggerNonUserCode] MessageDescriptor IMessage.Descriptor { get { return FileDescriptorProto.Descriptor; } } // Token: 0x060003A1 RID: 929 RVA: 0x0000DFE0 File Offset: 0x0000C1E0 [DebuggerNonUserCode] public FileDescriptorProto() { } // Token: 0x060003A2 RID: 930 RVA: 0x0000E064 File Offset: 0x0000C264 [DebuggerNonUserCode] public FileDescriptorProto(FileDescriptorProto other) : this() { this.name_ = other.name_; this.package_ = other.package_; this.dependency_ = other.dependency_.Clone(); this.publicDependency_ = other.publicDependency_.Clone(); this.weakDependency_ = other.weakDependency_.Clone(); this.messageType_ = other.messageType_.Clone(); this.enumType_ = other.enumType_.Clone(); this.service_ = other.service_.Clone(); this.extension_ = other.extension_.Clone(); this.Options = ((other.options_ != null) ? other.Options.Clone() : null); this.SourceCodeInfo = ((other.sourceCodeInfo_ != null) ? other.SourceCodeInfo.Clone() : null); this.syntax_ = other.syntax_; } // Token: 0x060003A3 RID: 931 RVA: 0x0000E14A File Offset: 0x0000C34A [DebuggerNonUserCode] public FileDescriptorProto Clone() { return new FileDescriptorProto(this); } // Token: 0x170000CD RID: 205 // (get) Token: 0x060003A4 RID: 932 RVA: 0x0000E152 File Offset: 0x0000C352 // (set) Token: 0x060003A5 RID: 933 RVA: 0x0000E15A File Offset: 0x0000C35A [DebuggerNonUserCode] public string Name { get { return this.name_; } set { this.name_ = ProtoPreconditions.CheckNotNull(value, "value"); } } // Token: 0x170000CE RID: 206 // (get) Token: 0x060003A6 RID: 934 RVA: 0x0000E16D File Offset: 0x0000C36D // (set) Token: 0x060003A7 RID: 935 RVA: 0x0000E175 File Offset: 0x0000C375 [DebuggerNonUserCode] public string Package { get { return this.package_; } set { this.package_ = ProtoPreconditions.CheckNotNull(value, "value"); } } // Token: 0x170000CF RID: 207 // (get) Token: 0x060003A8 RID: 936 RVA: 0x0000E188 File Offset: 0x0000C388 [DebuggerNonUserCode] public RepeatedField Dependency { get { return this.dependency_; } } // Token: 0x170000D0 RID: 208 // (get) Token: 0x060003A9 RID: 937 RVA: 0x0000E190 File Offset: 0x0000C390 [DebuggerNonUserCode] public RepeatedField PublicDependency { get { return this.publicDependency_; } } // Token: 0x170000D1 RID: 209 // (get) Token: 0x060003AA RID: 938 RVA: 0x0000E198 File Offset: 0x0000C398 [DebuggerNonUserCode] public RepeatedField WeakDependency { get { return this.weakDependency_; } } // Token: 0x170000D2 RID: 210 // (get) Token: 0x060003AB RID: 939 RVA: 0x0000E1A0 File Offset: 0x0000C3A0 [DebuggerNonUserCode] public RepeatedField MessageType { get { return this.messageType_; } } // Token: 0x170000D3 RID: 211 // (get) Token: 0x060003AC RID: 940 RVA: 0x0000E1A8 File Offset: 0x0000C3A8 [DebuggerNonUserCode] public RepeatedField EnumType { get { return this.enumType_; } } // Token: 0x170000D4 RID: 212 // (get) Token: 0x060003AD RID: 941 RVA: 0x0000E1B0 File Offset: 0x0000C3B0 [DebuggerNonUserCode] public RepeatedField Service { get { return this.service_; } } // Token: 0x170000D5 RID: 213 // (get) Token: 0x060003AE RID: 942 RVA: 0x0000E1B8 File Offset: 0x0000C3B8 [DebuggerNonUserCode] public RepeatedField Extension { get { return this.extension_; } } // Token: 0x170000D6 RID: 214 // (get) Token: 0x060003AF RID: 943 RVA: 0x0000E1C0 File Offset: 0x0000C3C0 // (set) Token: 0x060003B0 RID: 944 RVA: 0x0000E1C8 File Offset: 0x0000C3C8 [DebuggerNonUserCode] public FileOptions Options { get { return this.options_; } set { this.options_ = value; } } // Token: 0x170000D7 RID: 215 // (get) Token: 0x060003B1 RID: 945 RVA: 0x0000E1D1 File Offset: 0x0000C3D1 // (set) Token: 0x060003B2 RID: 946 RVA: 0x0000E1D9 File Offset: 0x0000C3D9 [DebuggerNonUserCode] public SourceCodeInfo SourceCodeInfo { get { return this.sourceCodeInfo_; } set { this.sourceCodeInfo_ = value; } } // Token: 0x170000D8 RID: 216 // (get) Token: 0x060003B3 RID: 947 RVA: 0x0000E1E2 File Offset: 0x0000C3E2 // (set) Token: 0x060003B4 RID: 948 RVA: 0x0000E1EA File Offset: 0x0000C3EA [DebuggerNonUserCode] public string Syntax { get { return this.syntax_; } set { this.syntax_ = ProtoPreconditions.CheckNotNull(value, "value"); } } // Token: 0x060003B5 RID: 949 RVA: 0x0000E1FD File Offset: 0x0000C3FD [DebuggerNonUserCode] public override bool Equals(object other) { return this.Equals(other as FileDescriptorProto); } // Token: 0x060003B6 RID: 950 RVA: 0x0000E20C File Offset: 0x0000C40C [DebuggerNonUserCode] public bool Equals(FileDescriptorProto other) { return other != null && (other == this || (!(this.Name != other.Name) && !(this.Package != other.Package) && this.dependency_.Equals(other.dependency_) && this.publicDependency_.Equals(other.publicDependency_) && this.weakDependency_.Equals(other.weakDependency_) && this.messageType_.Equals(other.messageType_) && this.enumType_.Equals(other.enumType_) && this.service_.Equals(other.service_) && this.extension_.Equals(other.extension_) && object.Equals(this.Options, other.Options) && object.Equals(this.SourceCodeInfo, other.SourceCodeInfo) && !(this.Syntax != other.Syntax))); } // Token: 0x060003B7 RID: 951 RVA: 0x0000E324 File Offset: 0x0000C524 [DebuggerNonUserCode] public override int GetHashCode() { int num = 1; if (this.Name.Length != 0) { num ^= this.Name.GetHashCode(); } if (this.Package.Length != 0) { num ^= this.Package.GetHashCode(); } num ^= this.dependency_.GetHashCode(); num ^= this.publicDependency_.GetHashCode(); num ^= this.weakDependency_.GetHashCode(); num ^= this.messageType_.GetHashCode(); num ^= this.enumType_.GetHashCode(); num ^= this.service_.GetHashCode(); num ^= this.extension_.GetHashCode(); if (this.options_ != null) { num ^= this.Options.GetHashCode(); } if (this.sourceCodeInfo_ != null) { num ^= this.SourceCodeInfo.GetHashCode(); } if (this.Syntax.Length != 0) { num ^= this.Syntax.GetHashCode(); } return num; } // Token: 0x060003B8 RID: 952 RVA: 0x00007C02 File Offset: 0x00005E02 [DebuggerNonUserCode] public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } // Token: 0x060003B9 RID: 953 RVA: 0x0000E414 File Offset: 0x0000C614 [DebuggerNonUserCode] public void WriteTo(CodedOutputStream output) { if (this.Name.Length != 0) { output.WriteRawTag(10); output.WriteString(this.Name); } if (this.Package.Length != 0) { output.WriteRawTag(18); output.WriteString(this.Package); } this.dependency_.WriteTo(output, FileDescriptorProto._repeated_dependency_codec); this.messageType_.WriteTo(output, FileDescriptorProto._repeated_messageType_codec); this.enumType_.WriteTo(output, FileDescriptorProto._repeated_enumType_codec); this.service_.WriteTo(output, FileDescriptorProto._repeated_service_codec); this.extension_.WriteTo(output, FileDescriptorProto._repeated_extension_codec); if (this.options_ != null) { output.WriteRawTag(66); output.WriteMessage(this.Options); } if (this.sourceCodeInfo_ != null) { output.WriteRawTag(74); output.WriteMessage(this.SourceCodeInfo); } this.publicDependency_.WriteTo(output, FileDescriptorProto._repeated_publicDependency_codec); this.weakDependency_.WriteTo(output, FileDescriptorProto._repeated_weakDependency_codec); if (this.Syntax.Length != 0) { output.WriteRawTag(98); output.WriteString(this.Syntax); } } // Token: 0x060003BA RID: 954 RVA: 0x0000E534 File Offset: 0x0000C734 [DebuggerNonUserCode] public int CalculateSize() { int num = 0; if (this.Name.Length != 0) { num += 1 + CodedOutputStream.ComputeStringSize(this.Name); } if (this.Package.Length != 0) { num += 1 + CodedOutputStream.ComputeStringSize(this.Package); } num += this.dependency_.CalculateSize(FileDescriptorProto._repeated_dependency_codec); num += this.publicDependency_.CalculateSize(FileDescriptorProto._repeated_publicDependency_codec); num += this.weakDependency_.CalculateSize(FileDescriptorProto._repeated_weakDependency_codec); num += this.messageType_.CalculateSize(FileDescriptorProto._repeated_messageType_codec); num += this.enumType_.CalculateSize(FileDescriptorProto._repeated_enumType_codec); num += this.service_.CalculateSize(FileDescriptorProto._repeated_service_codec); num += this.extension_.CalculateSize(FileDescriptorProto._repeated_extension_codec); if (this.options_ != null) { num += 1 + CodedOutputStream.ComputeMessageSize(this.Options); } if (this.sourceCodeInfo_ != null) { num += 1 + CodedOutputStream.ComputeMessageSize(this.SourceCodeInfo); } if (this.Syntax.Length != 0) { num += 1 + CodedOutputStream.ComputeStringSize(this.Syntax); } return num; } // Token: 0x060003BB RID: 955 RVA: 0x0000E650 File Offset: 0x0000C850 [DebuggerNonUserCode] public void MergeFrom(FileDescriptorProto other) { if (other == null) { return; } if (other.Name.Length != 0) { this.Name = other.Name; } if (other.Package.Length != 0) { this.Package = other.Package; } this.dependency_.Add(other.dependency_); this.publicDependency_.Add(other.publicDependency_); this.weakDependency_.Add(other.weakDependency_); this.messageType_.Add(other.messageType_); this.enumType_.Add(other.enumType_); this.service_.Add(other.service_); this.extension_.Add(other.extension_); if (other.options_ != null) { if (this.options_ == null) { this.options_ = new FileOptions(); } this.Options.MergeFrom(other.Options); } if (other.sourceCodeInfo_ != null) { if (this.sourceCodeInfo_ == null) { this.sourceCodeInfo_ = new SourceCodeInfo(); } this.SourceCodeInfo.MergeFrom(other.SourceCodeInfo); } if (other.Syntax.Length != 0) { this.Syntax = other.Syntax; } } // Token: 0x060003BC RID: 956 RVA: 0x0000E77C File Offset: 0x0000C97C [DebuggerNonUserCode] public void MergeFrom(CodedInputStream input) { uint num; while ((num = input.ReadTag()) != 0U) { if (num > 58U) { if (num > 80U) { if (num <= 88U) { if (num == 82U) { goto IL_172; } if (num != 88U) { goto IL_98; } } else if (num != 90U) { if (num != 98U) { goto IL_98; } this.Syntax = input.ReadString(); continue; } this.weakDependency_.AddEntriesFrom(input, FileDescriptorProto._repeated_weakDependency_codec); continue; } if (num == 66U) { if (this.options_ == null) { this.options_ = new FileOptions(); } input.ReadMessage(this.options_); continue; } if (num == 74U) { if (this.sourceCodeInfo_ == null) { this.sourceCodeInfo_ = new SourceCodeInfo(); } input.ReadMessage(this.sourceCodeInfo_); continue; } if (num != 80U) { goto IL_98; } IL_172: this.publicDependency_.AddEntriesFrom(input, FileDescriptorProto._repeated_publicDependency_codec); continue; } if (num <= 26U) { if (num == 10U) { this.Name = input.ReadString(); continue; } if (num == 18U) { this.Package = input.ReadString(); continue; } if (num == 26U) { this.dependency_.AddEntriesFrom(input, FileDescriptorProto._repeated_dependency_codec); continue; } } else if (num <= 42U) { if (num == 34U) { this.messageType_.AddEntriesFrom(input, FileDescriptorProto._repeated_messageType_codec); continue; } if (num == 42U) { this.enumType_.AddEntriesFrom(input, FileDescriptorProto._repeated_enumType_codec); continue; } } else { if (num == 50U) { this.service_.AddEntriesFrom(input, FileDescriptorProto._repeated_service_codec); continue; } if (num == 58U) { this.extension_.AddEntriesFrom(input, FileDescriptorProto._repeated_extension_codec); continue; } } IL_98: input.SkipLastField(); } } // Token: 0x04000119 RID: 281 private static readonly MessageParser _parser = new MessageParser(() => new FileDescriptorProto()); // Token: 0x0400011A RID: 282 public const int NameFieldNumber = 1; // Token: 0x0400011B RID: 283 private string name_ = ""; // Token: 0x0400011C RID: 284 public const int PackageFieldNumber = 2; // Token: 0x0400011D RID: 285 private string package_ = ""; // Token: 0x0400011E RID: 286 public const int DependencyFieldNumber = 3; // Token: 0x0400011F RID: 287 private static readonly FieldCodec _repeated_dependency_codec = FieldCodec.ForString(26U); // Token: 0x04000120 RID: 288 private readonly RepeatedField dependency_ = new RepeatedField(); // Token: 0x04000121 RID: 289 public const int PublicDependencyFieldNumber = 10; // Token: 0x04000122 RID: 290 private static readonly FieldCodec _repeated_publicDependency_codec = FieldCodec.ForInt32(80U); // Token: 0x04000123 RID: 291 private readonly RepeatedField publicDependency_ = new RepeatedField(); // Token: 0x04000124 RID: 292 public const int WeakDependencyFieldNumber = 11; // Token: 0x04000125 RID: 293 private static readonly FieldCodec _repeated_weakDependency_codec = FieldCodec.ForInt32(88U); // Token: 0x04000126 RID: 294 private readonly RepeatedField weakDependency_ = new RepeatedField(); // Token: 0x04000127 RID: 295 public const int MessageTypeFieldNumber = 4; // Token: 0x04000128 RID: 296 private static readonly FieldCodec _repeated_messageType_codec = FieldCodec.ForMessage(34U, DescriptorProto.Parser); // Token: 0x04000129 RID: 297 private readonly RepeatedField messageType_ = new RepeatedField(); // Token: 0x0400012A RID: 298 public const int EnumTypeFieldNumber = 5; // Token: 0x0400012B RID: 299 private static readonly FieldCodec _repeated_enumType_codec = FieldCodec.ForMessage(42U, EnumDescriptorProto.Parser); // Token: 0x0400012C RID: 300 private readonly RepeatedField enumType_ = new RepeatedField(); // Token: 0x0400012D RID: 301 public const int ServiceFieldNumber = 6; // Token: 0x0400012E RID: 302 private static readonly FieldCodec _repeated_service_codec = FieldCodec.ForMessage(50U, ServiceDescriptorProto.Parser); // Token: 0x0400012F RID: 303 private readonly RepeatedField service_ = new RepeatedField(); // Token: 0x04000130 RID: 304 public const int ExtensionFieldNumber = 7; // Token: 0x04000131 RID: 305 private static readonly FieldCodec _repeated_extension_codec = FieldCodec.ForMessage(58U, FieldDescriptorProto.Parser); // Token: 0x04000132 RID: 306 private readonly RepeatedField extension_ = new RepeatedField(); // Token: 0x04000133 RID: 307 public const int OptionsFieldNumber = 8; // Token: 0x04000134 RID: 308 private FileOptions options_; // Token: 0x04000135 RID: 309 public const int SourceCodeInfoFieldNumber = 9; // Token: 0x04000136 RID: 310 private SourceCodeInfo sourceCodeInfo_; // Token: 0x04000137 RID: 311 public const int SyntaxFieldNumber = 12; // Token: 0x04000138 RID: 312 private string syntax_ = ""; } }