279 lines
6.4 KiB
C#
279 lines
6.4 KiB
C#
using System;
|
|
using System.Diagnostics;
|
|
|
|
namespace Google.Protobuf.Reflection
|
|
{
|
|
// Token: 0x02000047 RID: 71
|
|
internal sealed class EnumValueDescriptorProto : IMessage<EnumValueDescriptorProto>, IMessage, IEquatable<EnumValueDescriptorProto>, IDeepCloneable<EnumValueDescriptorProto>
|
|
{
|
|
// Token: 0x170000FE RID: 254
|
|
// (get) Token: 0x06000424 RID: 1060 RVA: 0x00010031 File Offset: 0x0000E231
|
|
[DebuggerNonUserCode]
|
|
public static MessageParser<EnumValueDescriptorProto> Parser
|
|
{
|
|
get
|
|
{
|
|
return EnumValueDescriptorProto._parser;
|
|
}
|
|
}
|
|
|
|
// Token: 0x170000FF RID: 255
|
|
// (get) Token: 0x06000425 RID: 1061 RVA: 0x00010038 File Offset: 0x0000E238
|
|
[DebuggerNonUserCode]
|
|
public static MessageDescriptor Descriptor
|
|
{
|
|
get
|
|
{
|
|
return DescriptorReflection.Descriptor.MessageTypes[6];
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000100 RID: 256
|
|
// (get) Token: 0x06000426 RID: 1062 RVA: 0x0001004A File Offset: 0x0000E24A
|
|
[DebuggerNonUserCode]
|
|
MessageDescriptor IMessage.Descriptor
|
|
{
|
|
get
|
|
{
|
|
return EnumValueDescriptorProto.Descriptor;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000427 RID: 1063 RVA: 0x00010051 File Offset: 0x0000E251
|
|
[DebuggerNonUserCode]
|
|
public EnumValueDescriptorProto()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06000428 RID: 1064 RVA: 0x00010064 File Offset: 0x0000E264
|
|
[DebuggerNonUserCode]
|
|
public EnumValueDescriptorProto(EnumValueDescriptorProto other)
|
|
: this()
|
|
{
|
|
this.name_ = other.name_;
|
|
this.number_ = other.number_;
|
|
this.Options = ((other.options_ != null) ? other.Options.Clone() : null);
|
|
}
|
|
|
|
// Token: 0x06000429 RID: 1065 RVA: 0x000100A0 File Offset: 0x0000E2A0
|
|
[DebuggerNonUserCode]
|
|
public EnumValueDescriptorProto Clone()
|
|
{
|
|
return new EnumValueDescriptorProto(this);
|
|
}
|
|
|
|
// Token: 0x17000101 RID: 257
|
|
// (get) Token: 0x0600042A RID: 1066 RVA: 0x000100A8 File Offset: 0x0000E2A8
|
|
// (set) Token: 0x0600042B RID: 1067 RVA: 0x000100B0 File Offset: 0x0000E2B0
|
|
[DebuggerNonUserCode]
|
|
public string Name
|
|
{
|
|
get
|
|
{
|
|
return this.name_;
|
|
}
|
|
set
|
|
{
|
|
this.name_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000102 RID: 258
|
|
// (get) Token: 0x0600042C RID: 1068 RVA: 0x000100C3 File Offset: 0x0000E2C3
|
|
// (set) Token: 0x0600042D RID: 1069 RVA: 0x000100CB File Offset: 0x0000E2CB
|
|
[DebuggerNonUserCode]
|
|
public int Number
|
|
{
|
|
get
|
|
{
|
|
return this.number_;
|
|
}
|
|
set
|
|
{
|
|
this.number_ = value;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000103 RID: 259
|
|
// (get) Token: 0x0600042E RID: 1070 RVA: 0x000100D4 File Offset: 0x0000E2D4
|
|
// (set) Token: 0x0600042F RID: 1071 RVA: 0x000100DC File Offset: 0x0000E2DC
|
|
[DebuggerNonUserCode]
|
|
public EnumValueOptions Options
|
|
{
|
|
get
|
|
{
|
|
return this.options_;
|
|
}
|
|
set
|
|
{
|
|
this.options_ = value;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000430 RID: 1072 RVA: 0x000100E5 File Offset: 0x0000E2E5
|
|
[DebuggerNonUserCode]
|
|
public override bool Equals(object other)
|
|
{
|
|
return this.Equals(other as EnumValueDescriptorProto);
|
|
}
|
|
|
|
// Token: 0x06000431 RID: 1073 RVA: 0x000100F4 File Offset: 0x0000E2F4
|
|
[DebuggerNonUserCode]
|
|
public bool Equals(EnumValueDescriptorProto other)
|
|
{
|
|
return other != null && (other == this || (!(this.Name != other.Name) && this.Number == other.Number && object.Equals(this.Options, other.Options)));
|
|
}
|
|
|
|
// Token: 0x06000432 RID: 1074 RVA: 0x00010148 File Offset: 0x0000E348
|
|
[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.options_ != null)
|
|
{
|
|
num ^= this.Options.GetHashCode();
|
|
}
|
|
return num;
|
|
}
|
|
|
|
// Token: 0x06000433 RID: 1075 RVA: 0x00007C02 File Offset: 0x00005E02
|
|
[DebuggerNonUserCode]
|
|
public override string ToString()
|
|
{
|
|
return JsonFormatter.ToDiagnosticString(this);
|
|
}
|
|
|
|
// Token: 0x06000434 RID: 1076 RVA: 0x000101A4 File Offset: 0x0000E3A4
|
|
[DebuggerNonUserCode]
|
|
public void WriteTo(CodedOutputStream output)
|
|
{
|
|
if (this.Name.Length != 0)
|
|
{
|
|
output.WriteRawTag(10);
|
|
output.WriteString(this.Name);
|
|
}
|
|
if (this.Number != 0)
|
|
{
|
|
output.WriteRawTag(16);
|
|
output.WriteInt32(this.Number);
|
|
}
|
|
if (this.options_ != null)
|
|
{
|
|
output.WriteRawTag(26);
|
|
output.WriteMessage(this.Options);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000435 RID: 1077 RVA: 0x0001020C File Offset: 0x0000E40C
|
|
[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.options_ != null)
|
|
{
|
|
num += 1 + CodedOutputStream.ComputeMessageSize(this.Options);
|
|
}
|
|
return num;
|
|
}
|
|
|
|
// Token: 0x06000436 RID: 1078 RVA: 0x0001026C File Offset: 0x0000E46C
|
|
[DebuggerNonUserCode]
|
|
public void MergeFrom(EnumValueDescriptorProto other)
|
|
{
|
|
if (other == null)
|
|
{
|
|
return;
|
|
}
|
|
if (other.Name.Length != 0)
|
|
{
|
|
this.Name = other.Name;
|
|
}
|
|
if (other.Number != 0)
|
|
{
|
|
this.Number = other.Number;
|
|
}
|
|
if (other.options_ != null)
|
|
{
|
|
if (this.options_ == null)
|
|
{
|
|
this.options_ = new EnumValueOptions();
|
|
}
|
|
this.Options.MergeFrom(other.Options);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000437 RID: 1079 RVA: 0x000102D8 File Offset: 0x0000E4D8
|
|
[DebuggerNonUserCode]
|
|
public void MergeFrom(CodedInputStream input)
|
|
{
|
|
uint num;
|
|
while ((num = input.ReadTag()) != 0U)
|
|
{
|
|
if (num != 10U)
|
|
{
|
|
if (num != 16U)
|
|
{
|
|
if (num != 26U)
|
|
{
|
|
input.SkipLastField();
|
|
}
|
|
else
|
|
{
|
|
if (this.options_ == null)
|
|
{
|
|
this.options_ = new EnumValueOptions();
|
|
}
|
|
input.ReadMessage(this.options_);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.Number = input.ReadInt32();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.Name = input.ReadString();
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x04000178 RID: 376
|
|
private static readonly MessageParser<EnumValueDescriptorProto> _parser = new MessageParser<EnumValueDescriptorProto>(() => new EnumValueDescriptorProto());
|
|
|
|
// Token: 0x04000179 RID: 377
|
|
public const int NameFieldNumber = 1;
|
|
|
|
// Token: 0x0400017A RID: 378
|
|
private string name_ = "";
|
|
|
|
// Token: 0x0400017B RID: 379
|
|
public const int NumberFieldNumber = 2;
|
|
|
|
// Token: 0x0400017C RID: 380
|
|
private int number_;
|
|
|
|
// Token: 0x0400017D RID: 381
|
|
public const int OptionsFieldNumber = 3;
|
|
|
|
// Token: 0x0400017E RID: 382
|
|
private EnumValueOptions options_;
|
|
}
|
|
}
|