478 lines
11 KiB
C#
478 lines
11 KiB
C#
using System;
|
|
using System.Diagnostics;
|
|
using Google.Protobuf.Collections;
|
|
|
|
namespace Google.Protobuf.Reflection
|
|
{
|
|
// Token: 0x0200004C RID: 76
|
|
internal sealed class FieldOptions : IMessage<FieldOptions>, IMessage, IEquatable<FieldOptions>, IDeepCloneable<FieldOptions>
|
|
{
|
|
// Token: 0x1700012D RID: 301
|
|
// (get) Token: 0x060004AC RID: 1196 RVA: 0x00011BA8 File Offset: 0x0000FDA8
|
|
[DebuggerNonUserCode]
|
|
public static MessageParser<FieldOptions> Parser
|
|
{
|
|
get
|
|
{
|
|
return FieldOptions._parser;
|
|
}
|
|
}
|
|
|
|
// Token: 0x1700012E RID: 302
|
|
// (get) Token: 0x060004AD RID: 1197 RVA: 0x00011BAF File Offset: 0x0000FDAF
|
|
[DebuggerNonUserCode]
|
|
public static MessageDescriptor Descriptor
|
|
{
|
|
get
|
|
{
|
|
return DescriptorReflection.Descriptor.MessageTypes[11];
|
|
}
|
|
}
|
|
|
|
// Token: 0x1700012F RID: 303
|
|
// (get) Token: 0x060004AE RID: 1198 RVA: 0x00011BC2 File Offset: 0x0000FDC2
|
|
[DebuggerNonUserCode]
|
|
MessageDescriptor IMessage.Descriptor
|
|
{
|
|
get
|
|
{
|
|
return FieldOptions.Descriptor;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060004AF RID: 1199 RVA: 0x00011BC9 File Offset: 0x0000FDC9
|
|
[DebuggerNonUserCode]
|
|
public FieldOptions()
|
|
{
|
|
this.OnConstruction();
|
|
}
|
|
|
|
// Token: 0x060004B0 RID: 1200 RVA: 0x00011BE2 File Offset: 0x0000FDE2
|
|
private void OnConstruction()
|
|
{
|
|
this.Packed = true;
|
|
}
|
|
|
|
// Token: 0x060004B1 RID: 1201 RVA: 0x00011BEC File Offset: 0x0000FDEC
|
|
[DebuggerNonUserCode]
|
|
public FieldOptions(FieldOptions other)
|
|
: this()
|
|
{
|
|
this.ctype_ = other.ctype_;
|
|
this.packed_ = other.packed_;
|
|
this.jstype_ = other.jstype_;
|
|
this.lazy_ = other.lazy_;
|
|
this.deprecated_ = other.deprecated_;
|
|
this.weak_ = other.weak_;
|
|
this.uninterpretedOption_ = other.uninterpretedOption_.Clone();
|
|
}
|
|
|
|
// Token: 0x060004B2 RID: 1202 RVA: 0x00011C58 File Offset: 0x0000FE58
|
|
[DebuggerNonUserCode]
|
|
public FieldOptions Clone()
|
|
{
|
|
return new FieldOptions(this);
|
|
}
|
|
|
|
// Token: 0x17000130 RID: 304
|
|
// (get) Token: 0x060004B3 RID: 1203 RVA: 0x00011C60 File Offset: 0x0000FE60
|
|
// (set) Token: 0x060004B4 RID: 1204 RVA: 0x00011C68 File Offset: 0x0000FE68
|
|
[DebuggerNonUserCode]
|
|
public FieldOptions.Types.CType Ctype
|
|
{
|
|
get
|
|
{
|
|
return this.ctype_;
|
|
}
|
|
set
|
|
{
|
|
this.ctype_ = value;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000131 RID: 305
|
|
// (get) Token: 0x060004B5 RID: 1205 RVA: 0x00011C71 File Offset: 0x0000FE71
|
|
// (set) Token: 0x060004B6 RID: 1206 RVA: 0x00011C79 File Offset: 0x0000FE79
|
|
[DebuggerNonUserCode]
|
|
public bool Packed
|
|
{
|
|
get
|
|
{
|
|
return this.packed_;
|
|
}
|
|
set
|
|
{
|
|
this.packed_ = value;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000132 RID: 306
|
|
// (get) Token: 0x060004B7 RID: 1207 RVA: 0x00011C82 File Offset: 0x0000FE82
|
|
// (set) Token: 0x060004B8 RID: 1208 RVA: 0x00011C8A File Offset: 0x0000FE8A
|
|
[DebuggerNonUserCode]
|
|
public FieldOptions.Types.JSType Jstype
|
|
{
|
|
get
|
|
{
|
|
return this.jstype_;
|
|
}
|
|
set
|
|
{
|
|
this.jstype_ = value;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000133 RID: 307
|
|
// (get) Token: 0x060004B9 RID: 1209 RVA: 0x00011C93 File Offset: 0x0000FE93
|
|
// (set) Token: 0x060004BA RID: 1210 RVA: 0x00011C9B File Offset: 0x0000FE9B
|
|
[DebuggerNonUserCode]
|
|
public bool Lazy
|
|
{
|
|
get
|
|
{
|
|
return this.lazy_;
|
|
}
|
|
set
|
|
{
|
|
this.lazy_ = value;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000134 RID: 308
|
|
// (get) Token: 0x060004BB RID: 1211 RVA: 0x00011CA4 File Offset: 0x0000FEA4
|
|
// (set) Token: 0x060004BC RID: 1212 RVA: 0x00011CAC File Offset: 0x0000FEAC
|
|
[DebuggerNonUserCode]
|
|
public bool Deprecated
|
|
{
|
|
get
|
|
{
|
|
return this.deprecated_;
|
|
}
|
|
set
|
|
{
|
|
this.deprecated_ = value;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000135 RID: 309
|
|
// (get) Token: 0x060004BD RID: 1213 RVA: 0x00011CB5 File Offset: 0x0000FEB5
|
|
// (set) Token: 0x060004BE RID: 1214 RVA: 0x00011CBD File Offset: 0x0000FEBD
|
|
[DebuggerNonUserCode]
|
|
public bool Weak
|
|
{
|
|
get
|
|
{
|
|
return this.weak_;
|
|
}
|
|
set
|
|
{
|
|
this.weak_ = value;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000136 RID: 310
|
|
// (get) Token: 0x060004BF RID: 1215 RVA: 0x00011CC6 File Offset: 0x0000FEC6
|
|
[DebuggerNonUserCode]
|
|
public RepeatedField<UninterpretedOption> UninterpretedOption
|
|
{
|
|
get
|
|
{
|
|
return this.uninterpretedOption_;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060004C0 RID: 1216 RVA: 0x00011CCE File Offset: 0x0000FECE
|
|
[DebuggerNonUserCode]
|
|
public override bool Equals(object other)
|
|
{
|
|
return this.Equals(other as FieldOptions);
|
|
}
|
|
|
|
// Token: 0x060004C1 RID: 1217 RVA: 0x00011CDC File Offset: 0x0000FEDC
|
|
[DebuggerNonUserCode]
|
|
public bool Equals(FieldOptions other)
|
|
{
|
|
return other != null && (other == this || (this.Ctype == other.Ctype && this.Packed == other.Packed && this.Jstype == other.Jstype && this.Lazy == other.Lazy && this.Deprecated == other.Deprecated && this.Weak == other.Weak && this.uninterpretedOption_.Equals(other.uninterpretedOption_)));
|
|
}
|
|
|
|
// Token: 0x060004C2 RID: 1218 RVA: 0x00011D6C File Offset: 0x0000FF6C
|
|
[DebuggerNonUserCode]
|
|
public override int GetHashCode()
|
|
{
|
|
int num = 1;
|
|
if (this.Ctype != FieldOptions.Types.CType.String)
|
|
{
|
|
num ^= this.Ctype.GetHashCode();
|
|
}
|
|
if (this.Packed)
|
|
{
|
|
num ^= this.Packed.GetHashCode();
|
|
}
|
|
if (this.Jstype != FieldOptions.Types.JSType.JsNormal)
|
|
{
|
|
num ^= this.Jstype.GetHashCode();
|
|
}
|
|
if (this.Lazy)
|
|
{
|
|
num ^= this.Lazy.GetHashCode();
|
|
}
|
|
if (this.Deprecated)
|
|
{
|
|
num ^= this.Deprecated.GetHashCode();
|
|
}
|
|
if (this.Weak)
|
|
{
|
|
num ^= this.Weak.GetHashCode();
|
|
}
|
|
return num ^ this.uninterpretedOption_.GetHashCode();
|
|
}
|
|
|
|
// Token: 0x060004C3 RID: 1219 RVA: 0x00007C02 File Offset: 0x00005E02
|
|
[DebuggerNonUserCode]
|
|
public override string ToString()
|
|
{
|
|
return JsonFormatter.ToDiagnosticString(this);
|
|
}
|
|
|
|
// Token: 0x060004C4 RID: 1220 RVA: 0x00011E2C File Offset: 0x0001002C
|
|
[DebuggerNonUserCode]
|
|
public void WriteTo(CodedOutputStream output)
|
|
{
|
|
if (this.Ctype != FieldOptions.Types.CType.String)
|
|
{
|
|
output.WriteRawTag(8);
|
|
output.WriteEnum((int)this.Ctype);
|
|
}
|
|
if (this.Packed)
|
|
{
|
|
output.WriteRawTag(16);
|
|
output.WriteBool(this.Packed);
|
|
}
|
|
if (this.Deprecated)
|
|
{
|
|
output.WriteRawTag(24);
|
|
output.WriteBool(this.Deprecated);
|
|
}
|
|
if (this.Lazy)
|
|
{
|
|
output.WriteRawTag(40);
|
|
output.WriteBool(this.Lazy);
|
|
}
|
|
if (this.Jstype != FieldOptions.Types.JSType.JsNormal)
|
|
{
|
|
output.WriteRawTag(48);
|
|
output.WriteEnum((int)this.Jstype);
|
|
}
|
|
if (this.Weak)
|
|
{
|
|
output.WriteRawTag(80);
|
|
output.WriteBool(this.Weak);
|
|
}
|
|
this.uninterpretedOption_.WriteTo(output, FieldOptions._repeated_uninterpretedOption_codec);
|
|
}
|
|
|
|
// Token: 0x060004C5 RID: 1221 RVA: 0x00011EF4 File Offset: 0x000100F4
|
|
[DebuggerNonUserCode]
|
|
public int CalculateSize()
|
|
{
|
|
int num = 0;
|
|
if (this.Ctype != FieldOptions.Types.CType.String)
|
|
{
|
|
num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Ctype);
|
|
}
|
|
if (this.Packed)
|
|
{
|
|
num += 2;
|
|
}
|
|
if (this.Jstype != FieldOptions.Types.JSType.JsNormal)
|
|
{
|
|
num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Jstype);
|
|
}
|
|
if (this.Lazy)
|
|
{
|
|
num += 2;
|
|
}
|
|
if (this.Deprecated)
|
|
{
|
|
num += 2;
|
|
}
|
|
if (this.Weak)
|
|
{
|
|
num += 2;
|
|
}
|
|
return num + this.uninterpretedOption_.CalculateSize(FieldOptions._repeated_uninterpretedOption_codec);
|
|
}
|
|
|
|
// Token: 0x060004C6 RID: 1222 RVA: 0x00011F78 File Offset: 0x00010178
|
|
[DebuggerNonUserCode]
|
|
public void MergeFrom(FieldOptions other)
|
|
{
|
|
if (other == null)
|
|
{
|
|
return;
|
|
}
|
|
if (other.Ctype != FieldOptions.Types.CType.String)
|
|
{
|
|
this.Ctype = other.Ctype;
|
|
}
|
|
if (other.Packed)
|
|
{
|
|
this.Packed = other.Packed;
|
|
}
|
|
if (other.Jstype != FieldOptions.Types.JSType.JsNormal)
|
|
{
|
|
this.Jstype = other.Jstype;
|
|
}
|
|
if (other.Lazy)
|
|
{
|
|
this.Lazy = other.Lazy;
|
|
}
|
|
if (other.Deprecated)
|
|
{
|
|
this.Deprecated = other.Deprecated;
|
|
}
|
|
if (other.Weak)
|
|
{
|
|
this.Weak = other.Weak;
|
|
}
|
|
this.uninterpretedOption_.Add(other.uninterpretedOption_);
|
|
}
|
|
|
|
// Token: 0x060004C7 RID: 1223 RVA: 0x00012014 File Offset: 0x00010214
|
|
[DebuggerNonUserCode]
|
|
public void MergeFrom(CodedInputStream input)
|
|
{
|
|
uint num;
|
|
while ((num = input.ReadTag()) != 0U)
|
|
{
|
|
if (num <= 24U)
|
|
{
|
|
if (num == 8U)
|
|
{
|
|
this.ctype_ = (FieldOptions.Types.CType)input.ReadEnum();
|
|
continue;
|
|
}
|
|
if (num == 16U)
|
|
{
|
|
this.Packed = input.ReadBool();
|
|
continue;
|
|
}
|
|
if (num == 24U)
|
|
{
|
|
this.Deprecated = input.ReadBool();
|
|
continue;
|
|
}
|
|
}
|
|
else if (num <= 48U)
|
|
{
|
|
if (num == 40U)
|
|
{
|
|
this.Lazy = input.ReadBool();
|
|
continue;
|
|
}
|
|
if (num == 48U)
|
|
{
|
|
this.jstype_ = (FieldOptions.Types.JSType)input.ReadEnum();
|
|
continue;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (num == 80U)
|
|
{
|
|
this.Weak = input.ReadBool();
|
|
continue;
|
|
}
|
|
if (num == 7994U)
|
|
{
|
|
this.uninterpretedOption_.AddEntriesFrom(input, FieldOptions._repeated_uninterpretedOption_codec);
|
|
continue;
|
|
}
|
|
}
|
|
input.SkipLastField();
|
|
}
|
|
}
|
|
|
|
// Token: 0x040001C0 RID: 448
|
|
private static readonly MessageParser<FieldOptions> _parser = new MessageParser<FieldOptions>(() => new FieldOptions());
|
|
|
|
// Token: 0x040001C1 RID: 449
|
|
public const int CtypeFieldNumber = 1;
|
|
|
|
// Token: 0x040001C2 RID: 450
|
|
private FieldOptions.Types.CType ctype_;
|
|
|
|
// Token: 0x040001C3 RID: 451
|
|
public const int PackedFieldNumber = 2;
|
|
|
|
// Token: 0x040001C4 RID: 452
|
|
private bool packed_;
|
|
|
|
// Token: 0x040001C5 RID: 453
|
|
public const int JstypeFieldNumber = 6;
|
|
|
|
// Token: 0x040001C6 RID: 454
|
|
private FieldOptions.Types.JSType jstype_;
|
|
|
|
// Token: 0x040001C7 RID: 455
|
|
public const int LazyFieldNumber = 5;
|
|
|
|
// Token: 0x040001C8 RID: 456
|
|
private bool lazy_;
|
|
|
|
// Token: 0x040001C9 RID: 457
|
|
public const int DeprecatedFieldNumber = 3;
|
|
|
|
// Token: 0x040001CA RID: 458
|
|
private bool deprecated_;
|
|
|
|
// Token: 0x040001CB RID: 459
|
|
public const int WeakFieldNumber = 10;
|
|
|
|
// Token: 0x040001CC RID: 460
|
|
private bool weak_;
|
|
|
|
// Token: 0x040001CD RID: 461
|
|
public const int UninterpretedOptionFieldNumber = 999;
|
|
|
|
// Token: 0x040001CE RID: 462
|
|
private static readonly FieldCodec<UninterpretedOption> _repeated_uninterpretedOption_codec = FieldCodec.ForMessage<UninterpretedOption>(7994U, Google.Protobuf.Reflection.UninterpretedOption.Parser);
|
|
|
|
// Token: 0x040001CF RID: 463
|
|
private readonly RepeatedField<UninterpretedOption> uninterpretedOption_ = new RepeatedField<UninterpretedOption>();
|
|
|
|
// Token: 0x020000B0 RID: 176
|
|
[DebuggerNonUserCode]
|
|
public static class Types
|
|
{
|
|
// Token: 0x020000DA RID: 218
|
|
internal enum CType
|
|
{
|
|
// Token: 0x0400036A RID: 874
|
|
[OriginalName("STRING")]
|
|
String,
|
|
// Token: 0x0400036B RID: 875
|
|
[OriginalName("CORD")]
|
|
Cord,
|
|
// Token: 0x0400036C RID: 876
|
|
[OriginalName("STRING_PIECE")]
|
|
StringPiece
|
|
}
|
|
|
|
// Token: 0x020000DB RID: 219
|
|
internal enum JSType
|
|
{
|
|
// Token: 0x0400036E RID: 878
|
|
[OriginalName("JS_NORMAL")]
|
|
JsNormal,
|
|
// Token: 0x0400036F RID: 879
|
|
[OriginalName("JS_STRING")]
|
|
JsString,
|
|
// Token: 0x04000370 RID: 880
|
|
[OriginalName("JS_NUMBER")]
|
|
JsNumber
|
|
}
|
|
}
|
|
}
|
|
}
|