scripts
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
|
||||
namespace Google.Protobuf
|
||||
{
|
||||
// Token: 0x02000002 RID: 2
|
||||
internal static class ByteArray
|
||||
{
|
||||
// Token: 0x06000001 RID: 1 RVA: 0x00002050 File Offset: 0x00000250
|
||||
internal static void Copy(byte[] src, int srcOffset, byte[] dst, int dstOffset, int count)
|
||||
{
|
||||
if (count > 12)
|
||||
{
|
||||
Buffer.BlockCopy(src, srcOffset, dst, dstOffset, count);
|
||||
return;
|
||||
}
|
||||
int num = srcOffset + count;
|
||||
for (int i = srcOffset; i < num; i++)
|
||||
{
|
||||
dst[dstOffset++] = src[i];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000002 RID: 2 RVA: 0x0000208C File Offset: 0x0000028C
|
||||
internal static void Reverse(byte[] bytes)
|
||||
{
|
||||
int i = 0;
|
||||
int num = bytes.Length - 1;
|
||||
while (i < num)
|
||||
{
|
||||
byte b = bytes[i];
|
||||
bytes[i] = bytes[num];
|
||||
bytes[num] = b;
|
||||
i++;
|
||||
num--;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000001 RID: 1
|
||||
private const int CopyThreshold = 12;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,235 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace Google.Protobuf
|
||||
{
|
||||
// Token: 0x02000003 RID: 3
|
||||
public sealed class ByteString : IEnumerable<byte>, IEnumerable, IEquatable<ByteString>
|
||||
{
|
||||
// Token: 0x06000003 RID: 3 RVA: 0x000020BD File Offset: 0x000002BD
|
||||
internal static ByteString AttachBytes(byte[] bytes)
|
||||
{
|
||||
return new ByteString(bytes);
|
||||
}
|
||||
|
||||
// Token: 0x06000004 RID: 4 RVA: 0x000020C5 File Offset: 0x000002C5
|
||||
private ByteString(byte[] bytes)
|
||||
{
|
||||
this.bytes = bytes;
|
||||
}
|
||||
|
||||
// Token: 0x17000001 RID: 1
|
||||
// (get) Token: 0x06000005 RID: 5 RVA: 0x000020D4 File Offset: 0x000002D4
|
||||
public static ByteString Empty
|
||||
{
|
||||
get
|
||||
{
|
||||
return ByteString.empty;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000002 RID: 2
|
||||
// (get) Token: 0x06000006 RID: 6 RVA: 0x000020DB File Offset: 0x000002DB
|
||||
public int Length
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.bytes.Length;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000003 RID: 3
|
||||
// (get) Token: 0x06000007 RID: 7 RVA: 0x000020E5 File Offset: 0x000002E5
|
||||
public bool IsEmpty
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Length == 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000008 RID: 8 RVA: 0x000020F0 File Offset: 0x000002F0
|
||||
public byte[] ToByteArray()
|
||||
{
|
||||
return (byte[])this.bytes.Clone();
|
||||
}
|
||||
|
||||
// Token: 0x06000009 RID: 9 RVA: 0x00002102 File Offset: 0x00000302
|
||||
public string ToBase64()
|
||||
{
|
||||
return Convert.ToBase64String(this.bytes);
|
||||
}
|
||||
|
||||
// Token: 0x0600000A RID: 10 RVA: 0x0000210F File Offset: 0x0000030F
|
||||
public static ByteString FromBase64(string bytes)
|
||||
{
|
||||
if (!(bytes == ""))
|
||||
{
|
||||
return new ByteString(Convert.FromBase64String(bytes));
|
||||
}
|
||||
return ByteString.Empty;
|
||||
}
|
||||
|
||||
// Token: 0x0600000B RID: 11 RVA: 0x0000212F File Offset: 0x0000032F
|
||||
public static ByteString CopyFrom(params byte[] bytes)
|
||||
{
|
||||
return new ByteString((byte[])bytes.Clone());
|
||||
}
|
||||
|
||||
// Token: 0x0600000C RID: 12 RVA: 0x00002144 File Offset: 0x00000344
|
||||
public static ByteString CopyFrom(byte[] bytes, int offset, int count)
|
||||
{
|
||||
byte[] array = new byte[count];
|
||||
ByteArray.Copy(bytes, offset, array, 0, count);
|
||||
return new ByteString(array);
|
||||
}
|
||||
|
||||
// Token: 0x0600000D RID: 13 RVA: 0x00002168 File Offset: 0x00000368
|
||||
public static ByteString CopyFrom(string text, Encoding encoding)
|
||||
{
|
||||
return new ByteString(encoding.GetBytes(text));
|
||||
}
|
||||
|
||||
// Token: 0x0600000E RID: 14 RVA: 0x00002176 File Offset: 0x00000376
|
||||
public static ByteString CopyFromUtf8(string text)
|
||||
{
|
||||
return ByteString.CopyFrom(text, Encoding.UTF8);
|
||||
}
|
||||
|
||||
// Token: 0x17000004 RID: 4
|
||||
public byte this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.bytes[index];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000010 RID: 16 RVA: 0x0000218D File Offset: 0x0000038D
|
||||
public string ToString(Encoding encoding)
|
||||
{
|
||||
return encoding.GetString(this.bytes, 0, this.bytes.Length);
|
||||
}
|
||||
|
||||
// Token: 0x06000011 RID: 17 RVA: 0x000021A4 File Offset: 0x000003A4
|
||||
public string ToStringUtf8()
|
||||
{
|
||||
return this.ToString(Encoding.UTF8);
|
||||
}
|
||||
|
||||
// Token: 0x06000012 RID: 18 RVA: 0x000021B1 File Offset: 0x000003B1
|
||||
public IEnumerator<byte> GetEnumerator()
|
||||
{
|
||||
return ((IEnumerable<byte>)this.bytes).GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x06000013 RID: 19 RVA: 0x000021BE File Offset: 0x000003BE
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x06000014 RID: 20 RVA: 0x000021C6 File Offset: 0x000003C6
|
||||
public CodedInputStream CreateCodedInput()
|
||||
{
|
||||
return new CodedInputStream(this.bytes);
|
||||
}
|
||||
|
||||
// Token: 0x06000015 RID: 21 RVA: 0x000021D4 File Offset: 0x000003D4
|
||||
public static bool operator ==(ByteString lhs, ByteString rhs)
|
||||
{
|
||||
if (lhs == rhs)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (lhs == null || rhs == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (lhs.bytes.Length != rhs.bytes.Length)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < lhs.Length; i++)
|
||||
{
|
||||
if (rhs.bytes[i] != lhs.bytes[i])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x06000016 RID: 22 RVA: 0x00002229 File Offset: 0x00000429
|
||||
public static bool operator !=(ByteString lhs, ByteString rhs)
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
// Token: 0x06000017 RID: 23 RVA: 0x00002235 File Offset: 0x00000435
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return this == obj as ByteString;
|
||||
}
|
||||
|
||||
// Token: 0x06000018 RID: 24 RVA: 0x00002244 File Offset: 0x00000444
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 23;
|
||||
foreach (byte b in this.bytes)
|
||||
{
|
||||
num = (num << 8) | (int)b;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000019 RID: 25 RVA: 0x00002274 File Offset: 0x00000474
|
||||
public bool Equals(ByteString other)
|
||||
{
|
||||
return this == other;
|
||||
}
|
||||
|
||||
// Token: 0x0600001A RID: 26 RVA: 0x0000227D File Offset: 0x0000047D
|
||||
internal void WriteRawBytesTo(CodedOutputStream outputStream)
|
||||
{
|
||||
outputStream.WriteRawBytes(this.bytes, 0, this.bytes.Length);
|
||||
}
|
||||
|
||||
// Token: 0x0600001B RID: 27 RVA: 0x00002294 File Offset: 0x00000494
|
||||
public void CopyTo(byte[] array, int position)
|
||||
{
|
||||
ByteArray.Copy(this.bytes, 0, array, position, this.bytes.Length);
|
||||
}
|
||||
|
||||
// Token: 0x0600001C RID: 28 RVA: 0x000022AC File Offset: 0x000004AC
|
||||
public void WriteTo(Stream outputStream)
|
||||
{
|
||||
outputStream.Write(this.bytes, 0, this.bytes.Length);
|
||||
}
|
||||
|
||||
// Token: 0x04000002 RID: 2
|
||||
private static readonly ByteString empty = new ByteString(new byte[0]);
|
||||
|
||||
// Token: 0x04000003 RID: 3
|
||||
private readonly byte[] bytes;
|
||||
|
||||
// Token: 0x02000073 RID: 115
|
||||
internal static class Unsafe
|
||||
{
|
||||
// Token: 0x0600066F RID: 1647 RVA: 0x000020BD File Offset: 0x000002BD
|
||||
internal static ByteString FromBytes(byte[] bytes)
|
||||
{
|
||||
return new ByteString(bytes);
|
||||
}
|
||||
|
||||
// Token: 0x06000670 RID: 1648 RVA: 0x00016260 File Offset: 0x00014460
|
||||
internal static byte[] GetBuffer(ByteString bytes)
|
||||
{
|
||||
return bytes.bytes;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,936 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace Google.Protobuf
|
||||
{
|
||||
// Token: 0x02000004 RID: 4
|
||||
public sealed class CodedInputStream : IDisposable
|
||||
{
|
||||
// Token: 0x0600001E RID: 30 RVA: 0x000022D5 File Offset: 0x000004D5
|
||||
public CodedInputStream(byte[] buffer)
|
||||
: this(null, ProtoPreconditions.CheckNotNull<byte[]>(buffer, "buffer"), 0, buffer.Length)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600001F RID: 31 RVA: 0x000022F0 File Offset: 0x000004F0
|
||||
public CodedInputStream(byte[] buffer, int offset, int length)
|
||||
: this(null, ProtoPreconditions.CheckNotNull<byte[]>(buffer, "buffer"), offset, offset + length)
|
||||
{
|
||||
if (offset < 0 || offset > buffer.Length)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("offset", "Offset must be within the buffer");
|
||||
}
|
||||
if (length < 0 || offset + length > buffer.Length)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("length", "Length must be non-negative and within the buffer");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000020 RID: 32 RVA: 0x00002349 File Offset: 0x00000549
|
||||
public CodedInputStream(Stream input)
|
||||
: this(input, false)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000021 RID: 33 RVA: 0x00002353 File Offset: 0x00000553
|
||||
public CodedInputStream(Stream input, bool leaveOpen)
|
||||
: this(ProtoPreconditions.CheckNotNull<Stream>(input, "input"), new byte[4096], 0, 0)
|
||||
{
|
||||
this.leaveOpen = leaveOpen;
|
||||
}
|
||||
|
||||
// Token: 0x06000022 RID: 34 RVA: 0x0000237C File Offset: 0x0000057C
|
||||
internal CodedInputStream(Stream input, byte[] buffer, int bufferPos, int bufferSize)
|
||||
{
|
||||
this.input = input;
|
||||
this.buffer = buffer;
|
||||
this.bufferPos = bufferPos;
|
||||
this.bufferSize = bufferSize;
|
||||
this.sizeLimit = 67108864;
|
||||
this.recursionLimit = 64;
|
||||
}
|
||||
|
||||
// Token: 0x06000023 RID: 35 RVA: 0x000023CC File Offset: 0x000005CC
|
||||
internal CodedInputStream(Stream input, byte[] buffer, int bufferPos, int bufferSize, int sizeLimit, int recursionLimit)
|
||||
: this(input, buffer, bufferPos, bufferSize)
|
||||
{
|
||||
if (sizeLimit <= 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("sizeLimit", "Size limit must be positive");
|
||||
}
|
||||
if (recursionLimit <= 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("recursionLimit!", "Recursion limit must be positive");
|
||||
}
|
||||
this.sizeLimit = sizeLimit;
|
||||
this.recursionLimit = recursionLimit;
|
||||
}
|
||||
|
||||
// Token: 0x06000024 RID: 36 RVA: 0x0000241E File Offset: 0x0000061E
|
||||
public static CodedInputStream CreateWithLimits(Stream input, int sizeLimit, int recursionLimit)
|
||||
{
|
||||
return new CodedInputStream(input, new byte[4096], 0, 0, sizeLimit, recursionLimit);
|
||||
}
|
||||
|
||||
// Token: 0x17000005 RID: 5
|
||||
// (get) Token: 0x06000025 RID: 37 RVA: 0x00002434 File Offset: 0x00000634
|
||||
public long Position
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.input != null)
|
||||
{
|
||||
return this.input.Position - (long)(this.bufferSize + this.bufferSizeAfterLimit - this.bufferPos);
|
||||
}
|
||||
return (long)this.bufferPos;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000006 RID: 6
|
||||
// (get) Token: 0x06000026 RID: 38 RVA: 0x00002467 File Offset: 0x00000667
|
||||
internal uint LastTag
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.lastTag;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000007 RID: 7
|
||||
// (get) Token: 0x06000027 RID: 39 RVA: 0x0000246F File Offset: 0x0000066F
|
||||
public int SizeLimit
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.sizeLimit;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000008 RID: 8
|
||||
// (get) Token: 0x06000028 RID: 40 RVA: 0x00002477 File Offset: 0x00000677
|
||||
public int RecursionLimit
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.recursionLimit;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000029 RID: 41 RVA: 0x0000247F File Offset: 0x0000067F
|
||||
public void Dispose()
|
||||
{
|
||||
if (!this.leaveOpen)
|
||||
{
|
||||
this.input.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600002A RID: 42 RVA: 0x00002494 File Offset: 0x00000694
|
||||
internal void CheckReadEndOfStreamTag()
|
||||
{
|
||||
if (this.lastTag != 0U)
|
||||
{
|
||||
throw InvalidProtocolBufferException.MoreDataAvailable();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600002B RID: 43 RVA: 0x000024A4 File Offset: 0x000006A4
|
||||
public uint PeekTag()
|
||||
{
|
||||
if (this.hasNextTag)
|
||||
{
|
||||
return this.nextTag;
|
||||
}
|
||||
uint num = this.lastTag;
|
||||
this.nextTag = this.ReadTag();
|
||||
this.hasNextTag = true;
|
||||
this.lastTag = num;
|
||||
return this.nextTag;
|
||||
}
|
||||
|
||||
// Token: 0x0600002C RID: 44 RVA: 0x000024E8 File Offset: 0x000006E8
|
||||
public uint ReadTag()
|
||||
{
|
||||
if (this.hasNextTag)
|
||||
{
|
||||
this.lastTag = this.nextTag;
|
||||
this.hasNextTag = false;
|
||||
return this.lastTag;
|
||||
}
|
||||
if (this.bufferPos + 2 <= this.bufferSize)
|
||||
{
|
||||
byte[] array = this.buffer;
|
||||
int num = this.bufferPos;
|
||||
this.bufferPos = num + 1;
|
||||
int num2 = array[num];
|
||||
if (num2 < 128)
|
||||
{
|
||||
this.lastTag = (uint)num2;
|
||||
}
|
||||
else
|
||||
{
|
||||
int num3 = num2 & 127;
|
||||
byte[] array2 = this.buffer;
|
||||
num = this.bufferPos;
|
||||
this.bufferPos = num + 1;
|
||||
if ((num2 = array2[num]) < 128)
|
||||
{
|
||||
num3 |= num2 << 7;
|
||||
this.lastTag = (uint)num3;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.bufferPos -= 2;
|
||||
this.lastTag = this.ReadRawVarint32();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.IsAtEnd)
|
||||
{
|
||||
this.lastTag = 0U;
|
||||
return 0U;
|
||||
}
|
||||
this.lastTag = this.ReadRawVarint32();
|
||||
}
|
||||
if (this.lastTag == 0U)
|
||||
{
|
||||
throw InvalidProtocolBufferException.InvalidTag();
|
||||
}
|
||||
return this.lastTag;
|
||||
}
|
||||
|
||||
// Token: 0x0600002D RID: 45 RVA: 0x000025D4 File Offset: 0x000007D4
|
||||
public void SkipLastField()
|
||||
{
|
||||
if (this.lastTag == 0U)
|
||||
{
|
||||
throw new InvalidOperationException("SkipLastField cannot be called at the end of a stream");
|
||||
}
|
||||
switch (WireFormat.GetTagWireType(this.lastTag))
|
||||
{
|
||||
case WireFormat.WireType.Varint:
|
||||
this.ReadRawVarint32();
|
||||
return;
|
||||
case WireFormat.WireType.Fixed64:
|
||||
this.ReadFixed64();
|
||||
return;
|
||||
case WireFormat.WireType.LengthDelimited:
|
||||
{
|
||||
int num = this.ReadLength();
|
||||
this.SkipRawBytes(num);
|
||||
return;
|
||||
}
|
||||
case WireFormat.WireType.StartGroup:
|
||||
this.SkipGroup(this.lastTag);
|
||||
return;
|
||||
case WireFormat.WireType.EndGroup:
|
||||
throw new InvalidProtocolBufferException("SkipLastField called on an end-group tag, indicating that the corresponding start-group was missing");
|
||||
case WireFormat.WireType.Fixed32:
|
||||
this.ReadFixed32();
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600002E RID: 46 RVA: 0x00002660 File Offset: 0x00000860
|
||||
private void SkipGroup(uint startGroupTag)
|
||||
{
|
||||
this.recursionDepth++;
|
||||
if (this.recursionDepth >= this.recursionLimit)
|
||||
{
|
||||
throw InvalidProtocolBufferException.RecursionLimitExceeded();
|
||||
}
|
||||
uint num;
|
||||
for (;;)
|
||||
{
|
||||
num = this.ReadTag();
|
||||
if (num == 0U)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (WireFormat.GetTagWireType(num) == WireFormat.WireType.EndGroup)
|
||||
{
|
||||
goto IL_43;
|
||||
}
|
||||
this.SkipLastField();
|
||||
}
|
||||
throw InvalidProtocolBufferException.TruncatedMessage();
|
||||
IL_43:
|
||||
int tagFieldNumber = WireFormat.GetTagFieldNumber(startGroupTag);
|
||||
int tagFieldNumber2 = WireFormat.GetTagFieldNumber(num);
|
||||
if (tagFieldNumber != tagFieldNumber2)
|
||||
{
|
||||
throw new InvalidProtocolBufferException(string.Format("Mismatched end-group tag. Started with field {0}; ended with field {1}", tagFieldNumber, tagFieldNumber2));
|
||||
}
|
||||
this.recursionDepth--;
|
||||
}
|
||||
|
||||
// Token: 0x0600002F RID: 47 RVA: 0x000026EC File Offset: 0x000008EC
|
||||
public double ReadDouble()
|
||||
{
|
||||
return BitConverter.Int64BitsToDouble((long)this.ReadRawLittleEndian64());
|
||||
}
|
||||
|
||||
// Token: 0x06000030 RID: 48 RVA: 0x000026FC File Offset: 0x000008FC
|
||||
public float ReadFloat()
|
||||
{
|
||||
if (BitConverter.IsLittleEndian && 4 <= this.bufferSize - this.bufferPos)
|
||||
{
|
||||
float num = BitConverter.ToSingle(this.buffer, this.bufferPos);
|
||||
this.bufferPos += 4;
|
||||
return num;
|
||||
}
|
||||
byte[] array = this.ReadRawBytes(4);
|
||||
if (!BitConverter.IsLittleEndian)
|
||||
{
|
||||
ByteArray.Reverse(array);
|
||||
}
|
||||
return BitConverter.ToSingle(array, 0);
|
||||
}
|
||||
|
||||
// Token: 0x06000031 RID: 49 RVA: 0x0000275C File Offset: 0x0000095C
|
||||
public ulong ReadUInt64()
|
||||
{
|
||||
return this.ReadRawVarint64();
|
||||
}
|
||||
|
||||
// Token: 0x06000032 RID: 50 RVA: 0x0000275C File Offset: 0x0000095C
|
||||
public long ReadInt64()
|
||||
{
|
||||
return (long)this.ReadRawVarint64();
|
||||
}
|
||||
|
||||
// Token: 0x06000033 RID: 51 RVA: 0x00002764 File Offset: 0x00000964
|
||||
public int ReadInt32()
|
||||
{
|
||||
return (int)this.ReadRawVarint32();
|
||||
}
|
||||
|
||||
// Token: 0x06000034 RID: 52 RVA: 0x0000276C File Offset: 0x0000096C
|
||||
public ulong ReadFixed64()
|
||||
{
|
||||
return this.ReadRawLittleEndian64();
|
||||
}
|
||||
|
||||
// Token: 0x06000035 RID: 53 RVA: 0x00002774 File Offset: 0x00000974
|
||||
public uint ReadFixed32()
|
||||
{
|
||||
return this.ReadRawLittleEndian32();
|
||||
}
|
||||
|
||||
// Token: 0x06000036 RID: 54 RVA: 0x0000277C File Offset: 0x0000097C
|
||||
public bool ReadBool()
|
||||
{
|
||||
return this.ReadRawVarint32() > 0U;
|
||||
}
|
||||
|
||||
// Token: 0x06000037 RID: 55 RVA: 0x00002788 File Offset: 0x00000988
|
||||
public string ReadString()
|
||||
{
|
||||
int num = this.ReadLength();
|
||||
if (num == 0)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
if (num <= this.bufferSize - this.bufferPos)
|
||||
{
|
||||
string @string = CodedOutputStream.Utf8Encoding.GetString(this.buffer, this.bufferPos, num);
|
||||
this.bufferPos += num;
|
||||
return @string;
|
||||
}
|
||||
return CodedOutputStream.Utf8Encoding.GetString(this.ReadRawBytes(num), 0, num);
|
||||
}
|
||||
|
||||
// Token: 0x06000038 RID: 56 RVA: 0x000027F0 File Offset: 0x000009F0
|
||||
public void ReadMessage(IMessage builder)
|
||||
{
|
||||
int num = this.ReadLength();
|
||||
if (this.recursionDepth >= this.recursionLimit)
|
||||
{
|
||||
throw InvalidProtocolBufferException.RecursionLimitExceeded();
|
||||
}
|
||||
int num2 = this.PushLimit(num);
|
||||
this.recursionDepth++;
|
||||
builder.MergeFrom(this);
|
||||
this.CheckReadEndOfStreamTag();
|
||||
if (!this.ReachedLimit)
|
||||
{
|
||||
throw InvalidProtocolBufferException.TruncatedMessage();
|
||||
}
|
||||
this.recursionDepth--;
|
||||
this.PopLimit(num2);
|
||||
}
|
||||
|
||||
// Token: 0x06000039 RID: 57 RVA: 0x00002860 File Offset: 0x00000A60
|
||||
public ByteString ReadBytes()
|
||||
{
|
||||
int num = this.ReadLength();
|
||||
if (num <= this.bufferSize - this.bufferPos && num > 0)
|
||||
{
|
||||
ByteString byteString = ByteString.CopyFrom(this.buffer, this.bufferPos, num);
|
||||
this.bufferPos += num;
|
||||
return byteString;
|
||||
}
|
||||
return ByteString.AttachBytes(this.ReadRawBytes(num));
|
||||
}
|
||||
|
||||
// Token: 0x0600003A RID: 58 RVA: 0x00002764 File Offset: 0x00000964
|
||||
public uint ReadUInt32()
|
||||
{
|
||||
return this.ReadRawVarint32();
|
||||
}
|
||||
|
||||
// Token: 0x0600003B RID: 59 RVA: 0x00002764 File Offset: 0x00000964
|
||||
public int ReadEnum()
|
||||
{
|
||||
return (int)this.ReadRawVarint32();
|
||||
}
|
||||
|
||||
// Token: 0x0600003C RID: 60 RVA: 0x00002774 File Offset: 0x00000974
|
||||
public int ReadSFixed32()
|
||||
{
|
||||
return (int)this.ReadRawLittleEndian32();
|
||||
}
|
||||
|
||||
// Token: 0x0600003D RID: 61 RVA: 0x0000276C File Offset: 0x0000096C
|
||||
public long ReadSFixed64()
|
||||
{
|
||||
return (long)this.ReadRawLittleEndian64();
|
||||
}
|
||||
|
||||
// Token: 0x0600003E RID: 62 RVA: 0x000028B5 File Offset: 0x00000AB5
|
||||
public int ReadSInt32()
|
||||
{
|
||||
return CodedInputStream.DecodeZigZag32(this.ReadRawVarint32());
|
||||
}
|
||||
|
||||
// Token: 0x0600003F RID: 63 RVA: 0x000028C2 File Offset: 0x00000AC2
|
||||
public long ReadSInt64()
|
||||
{
|
||||
return CodedInputStream.DecodeZigZag64(this.ReadRawVarint64());
|
||||
}
|
||||
|
||||
// Token: 0x06000040 RID: 64 RVA: 0x00002764 File Offset: 0x00000964
|
||||
public int ReadLength()
|
||||
{
|
||||
return (int)this.ReadRawVarint32();
|
||||
}
|
||||
|
||||
// Token: 0x06000041 RID: 65 RVA: 0x000028CF File Offset: 0x00000ACF
|
||||
public bool MaybeConsumeTag(uint tag)
|
||||
{
|
||||
if (this.PeekTag() == tag)
|
||||
{
|
||||
this.hasNextTag = false;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Token: 0x06000042 RID: 66 RVA: 0x000028E4 File Offset: 0x00000AE4
|
||||
private uint SlowReadRawVarint32()
|
||||
{
|
||||
int num = (int)this.ReadRawByte();
|
||||
if (num < 128)
|
||||
{
|
||||
return (uint)num;
|
||||
}
|
||||
int num2 = num & 127;
|
||||
if ((num = (int)this.ReadRawByte()) < 128)
|
||||
{
|
||||
num2 |= num << 7;
|
||||
}
|
||||
else
|
||||
{
|
||||
num2 |= (num & 127) << 7;
|
||||
if ((num = (int)this.ReadRawByte()) < 128)
|
||||
{
|
||||
num2 |= num << 14;
|
||||
}
|
||||
else
|
||||
{
|
||||
num2 |= (num & 127) << 14;
|
||||
if ((num = (int)this.ReadRawByte()) < 128)
|
||||
{
|
||||
num2 |= num << 21;
|
||||
}
|
||||
else
|
||||
{
|
||||
num2 |= (num & 127) << 21;
|
||||
num2 |= (num = (int)this.ReadRawByte()) << 28;
|
||||
if (num >= 128)
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
if (this.ReadRawByte() < 128)
|
||||
{
|
||||
return (uint)num2;
|
||||
}
|
||||
}
|
||||
throw InvalidProtocolBufferException.MalformedVarint();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return (uint)num2;
|
||||
}
|
||||
|
||||
// Token: 0x06000043 RID: 67 RVA: 0x000029A8 File Offset: 0x00000BA8
|
||||
internal uint ReadRawVarint32()
|
||||
{
|
||||
if (this.bufferPos + 5 > this.bufferSize)
|
||||
{
|
||||
return this.SlowReadRawVarint32();
|
||||
}
|
||||
byte[] array = this.buffer;
|
||||
int num = this.bufferPos;
|
||||
this.bufferPos = num + 1;
|
||||
int num2 = array[num];
|
||||
if (num2 < 128)
|
||||
{
|
||||
return (uint)num2;
|
||||
}
|
||||
int num3 = num2 & 127;
|
||||
byte[] array2 = this.buffer;
|
||||
num = this.bufferPos;
|
||||
this.bufferPos = num + 1;
|
||||
if ((num2 = array2[num]) < 128)
|
||||
{
|
||||
num3 |= num2 << 7;
|
||||
}
|
||||
else
|
||||
{
|
||||
num3 |= (num2 & 127) << 7;
|
||||
byte[] array3 = this.buffer;
|
||||
num = this.bufferPos;
|
||||
this.bufferPos = num + 1;
|
||||
if ((num2 = array3[num]) < 128)
|
||||
{
|
||||
num3 |= num2 << 14;
|
||||
}
|
||||
else
|
||||
{
|
||||
num3 |= (num2 & 127) << 14;
|
||||
byte[] array4 = this.buffer;
|
||||
num = this.bufferPos;
|
||||
this.bufferPos = num + 1;
|
||||
if ((num2 = array4[num]) < 128)
|
||||
{
|
||||
num3 |= num2 << 21;
|
||||
}
|
||||
else
|
||||
{
|
||||
num3 |= (num2 & 127) << 21;
|
||||
int num4 = num3;
|
||||
byte[] array5 = this.buffer;
|
||||
num = this.bufferPos;
|
||||
this.bufferPos = num + 1;
|
||||
num3 = num4 | ((num2 = array5[num]) << 28);
|
||||
if (num2 >= 128)
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
if (this.ReadRawByte() < 128)
|
||||
{
|
||||
return (uint)num3;
|
||||
}
|
||||
}
|
||||
throw InvalidProtocolBufferException.MalformedVarint();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return (uint)num3;
|
||||
}
|
||||
|
||||
// Token: 0x06000044 RID: 68 RVA: 0x00002AE0 File Offset: 0x00000CE0
|
||||
internal static uint ReadRawVarint32(Stream input)
|
||||
{
|
||||
int num = 0;
|
||||
int i;
|
||||
for (i = 0; i < 32; i += 7)
|
||||
{
|
||||
int num2 = input.ReadByte();
|
||||
if (num2 == -1)
|
||||
{
|
||||
throw InvalidProtocolBufferException.TruncatedMessage();
|
||||
}
|
||||
num |= (num2 & 127) << i;
|
||||
if ((num2 & 128) == 0)
|
||||
{
|
||||
return (uint)num;
|
||||
}
|
||||
}
|
||||
while (i < 64)
|
||||
{
|
||||
int num3 = input.ReadByte();
|
||||
if (num3 == -1)
|
||||
{
|
||||
throw InvalidProtocolBufferException.TruncatedMessage();
|
||||
}
|
||||
if ((num3 & 128) == 0)
|
||||
{
|
||||
return (uint)num;
|
||||
}
|
||||
i += 7;
|
||||
}
|
||||
throw InvalidProtocolBufferException.MalformedVarint();
|
||||
}
|
||||
|
||||
// Token: 0x06000045 RID: 69 RVA: 0x00002B50 File Offset: 0x00000D50
|
||||
internal ulong ReadRawVarint64()
|
||||
{
|
||||
int i = 0;
|
||||
ulong num = 0UL;
|
||||
while (i < 64)
|
||||
{
|
||||
byte b = this.ReadRawByte();
|
||||
num |= (ulong)((ulong)((long)(b & 127)) << i);
|
||||
if ((b & 128) == 0)
|
||||
{
|
||||
return num;
|
||||
}
|
||||
i += 7;
|
||||
}
|
||||
throw InvalidProtocolBufferException.MalformedVarint();
|
||||
}
|
||||
|
||||
// Token: 0x06000046 RID: 70 RVA: 0x00002B94 File Offset: 0x00000D94
|
||||
internal uint ReadRawLittleEndian32()
|
||||
{
|
||||
uint num = (uint)this.ReadRawByte();
|
||||
uint num2 = (uint)this.ReadRawByte();
|
||||
uint num3 = (uint)this.ReadRawByte();
|
||||
uint num4 = (uint)this.ReadRawByte();
|
||||
return num | (num2 << 8) | (num3 << 16) | (num4 << 24);
|
||||
}
|
||||
|
||||
// Token: 0x06000047 RID: 71 RVA: 0x00002BCC File Offset: 0x00000DCC
|
||||
internal ulong ReadRawLittleEndian64()
|
||||
{
|
||||
ulong num = (ulong)this.ReadRawByte();
|
||||
ulong num2 = (ulong)this.ReadRawByte();
|
||||
ulong num3 = (ulong)this.ReadRawByte();
|
||||
ulong num4 = (ulong)this.ReadRawByte();
|
||||
ulong num5 = (ulong)this.ReadRawByte();
|
||||
ulong num6 = (ulong)this.ReadRawByte();
|
||||
ulong num7 = (ulong)this.ReadRawByte();
|
||||
ulong num8 = (ulong)this.ReadRawByte();
|
||||
return num | (num2 << 8) | (num3 << 16) | (num4 << 24) | (num5 << 32) | (num6 << 40) | (num7 << 48) | (num8 << 56);
|
||||
}
|
||||
|
||||
// Token: 0x06000048 RID: 72 RVA: 0x00002C40 File Offset: 0x00000E40
|
||||
internal static int DecodeZigZag32(uint n)
|
||||
{
|
||||
return (int)((n >> 1) ^ -(int)(n & 1U));
|
||||
}
|
||||
|
||||
// Token: 0x06000049 RID: 73 RVA: 0x00002C4A File Offset: 0x00000E4A
|
||||
internal static long DecodeZigZag64(ulong n)
|
||||
{
|
||||
return (long)((n >> 1) ^ -(long)(n & 1UL));
|
||||
}
|
||||
|
||||
// Token: 0x0600004A RID: 74 RVA: 0x00002C58 File Offset: 0x00000E58
|
||||
internal int PushLimit(int byteLimit)
|
||||
{
|
||||
if (byteLimit < 0)
|
||||
{
|
||||
throw InvalidProtocolBufferException.NegativeSize();
|
||||
}
|
||||
byteLimit += this.totalBytesRetired + this.bufferPos;
|
||||
int num = this.currentLimit;
|
||||
if (byteLimit > num)
|
||||
{
|
||||
throw InvalidProtocolBufferException.TruncatedMessage();
|
||||
}
|
||||
this.currentLimit = byteLimit;
|
||||
this.RecomputeBufferSizeAfterLimit();
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0600004B RID: 75 RVA: 0x00002CA0 File Offset: 0x00000EA0
|
||||
private void RecomputeBufferSizeAfterLimit()
|
||||
{
|
||||
this.bufferSize += this.bufferSizeAfterLimit;
|
||||
int num = this.totalBytesRetired + this.bufferSize;
|
||||
if (num > this.currentLimit)
|
||||
{
|
||||
this.bufferSizeAfterLimit = num - this.currentLimit;
|
||||
this.bufferSize -= this.bufferSizeAfterLimit;
|
||||
return;
|
||||
}
|
||||
this.bufferSizeAfterLimit = 0;
|
||||
}
|
||||
|
||||
// Token: 0x0600004C RID: 76 RVA: 0x00002D00 File Offset: 0x00000F00
|
||||
internal void PopLimit(int oldLimit)
|
||||
{
|
||||
this.currentLimit = oldLimit;
|
||||
this.RecomputeBufferSizeAfterLimit();
|
||||
}
|
||||
|
||||
// Token: 0x17000009 RID: 9
|
||||
// (get) Token: 0x0600004D RID: 77 RVA: 0x00002D0F File Offset: 0x00000F0F
|
||||
internal bool ReachedLimit
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.currentLimit != int.MaxValue && this.totalBytesRetired + this.bufferPos >= this.currentLimit;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700000A RID: 10
|
||||
// (get) Token: 0x0600004E RID: 78 RVA: 0x00002D38 File Offset: 0x00000F38
|
||||
public bool IsAtEnd
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.bufferPos == this.bufferSize && !this.RefillBuffer(false);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600004F RID: 79 RVA: 0x00002D54 File Offset: 0x00000F54
|
||||
private bool RefillBuffer(bool mustSucceed)
|
||||
{
|
||||
if (this.bufferPos < this.bufferSize)
|
||||
{
|
||||
throw new InvalidOperationException("RefillBuffer() called when buffer wasn't empty.");
|
||||
}
|
||||
if (this.totalBytesRetired + this.bufferSize == this.currentLimit)
|
||||
{
|
||||
if (mustSucceed)
|
||||
{
|
||||
throw InvalidProtocolBufferException.TruncatedMessage();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.totalBytesRetired += this.bufferSize;
|
||||
this.bufferPos = 0;
|
||||
this.bufferSize = ((this.input == null) ? 0 : this.input.Read(this.buffer, 0, this.buffer.Length));
|
||||
if (this.bufferSize < 0)
|
||||
{
|
||||
throw new InvalidOperationException("Stream.Read returned a negative count");
|
||||
}
|
||||
if (this.bufferSize == 0)
|
||||
{
|
||||
if (mustSucceed)
|
||||
{
|
||||
throw InvalidProtocolBufferException.TruncatedMessage();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.RecomputeBufferSizeAfterLimit();
|
||||
int num = this.totalBytesRetired + this.bufferSize + this.bufferSizeAfterLimit;
|
||||
if (num > this.sizeLimit || num < 0)
|
||||
{
|
||||
throw InvalidProtocolBufferException.SizeLimitExceeded();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000050 RID: 80 RVA: 0x00002E38 File Offset: 0x00001038
|
||||
internal byte ReadRawByte()
|
||||
{
|
||||
if (this.bufferPos == this.bufferSize)
|
||||
{
|
||||
this.RefillBuffer(true);
|
||||
}
|
||||
byte[] array = this.buffer;
|
||||
int num = this.bufferPos;
|
||||
this.bufferPos = num + 1;
|
||||
return array[num];
|
||||
}
|
||||
|
||||
// Token: 0x06000051 RID: 81 RVA: 0x00002E74 File Offset: 0x00001074
|
||||
internal byte[] ReadRawBytes(int size)
|
||||
{
|
||||
if (size < 0)
|
||||
{
|
||||
throw InvalidProtocolBufferException.NegativeSize();
|
||||
}
|
||||
if (this.totalBytesRetired + this.bufferPos + size > this.currentLimit)
|
||||
{
|
||||
this.SkipRawBytes(this.currentLimit - this.totalBytesRetired - this.bufferPos);
|
||||
throw InvalidProtocolBufferException.TruncatedMessage();
|
||||
}
|
||||
if (size <= this.bufferSize - this.bufferPos)
|
||||
{
|
||||
byte[] array = new byte[size];
|
||||
ByteArray.Copy(this.buffer, this.bufferPos, array, 0, size);
|
||||
this.bufferPos += size;
|
||||
return array;
|
||||
}
|
||||
if (size < this.buffer.Length)
|
||||
{
|
||||
byte[] array2 = new byte[size];
|
||||
int num = this.bufferSize - this.bufferPos;
|
||||
ByteArray.Copy(this.buffer, this.bufferPos, array2, 0, num);
|
||||
this.bufferPos = this.bufferSize;
|
||||
this.RefillBuffer(true);
|
||||
while (size - num > this.bufferSize)
|
||||
{
|
||||
Buffer.BlockCopy(this.buffer, 0, array2, num, this.bufferSize);
|
||||
num += this.bufferSize;
|
||||
this.bufferPos = this.bufferSize;
|
||||
this.RefillBuffer(true);
|
||||
}
|
||||
ByteArray.Copy(this.buffer, 0, array2, num, size - num);
|
||||
this.bufferPos = size - num;
|
||||
return array2;
|
||||
}
|
||||
int num2 = this.bufferPos;
|
||||
int num3 = this.bufferSize;
|
||||
this.totalBytesRetired += this.bufferSize;
|
||||
this.bufferPos = 0;
|
||||
this.bufferSize = 0;
|
||||
int i = size - (num3 - num2);
|
||||
List<byte[]> list = new List<byte[]>();
|
||||
while (i > 0)
|
||||
{
|
||||
byte[] array3 = new byte[Math.Min(i, this.buffer.Length)];
|
||||
int num4;
|
||||
for (int j = 0; j < array3.Length; j += num4)
|
||||
{
|
||||
num4 = ((this.input == null) ? (-1) : this.input.Read(array3, j, array3.Length - j));
|
||||
if (num4 <= 0)
|
||||
{
|
||||
throw InvalidProtocolBufferException.TruncatedMessage();
|
||||
}
|
||||
this.totalBytesRetired += num4;
|
||||
}
|
||||
i -= array3.Length;
|
||||
list.Add(array3);
|
||||
}
|
||||
byte[] array4 = new byte[size];
|
||||
int num5 = num3 - num2;
|
||||
ByteArray.Copy(this.buffer, num2, array4, 0, num5);
|
||||
foreach (byte[] array5 in list)
|
||||
{
|
||||
Buffer.BlockCopy(array5, 0, array4, num5, array5.Length);
|
||||
num5 += array5.Length;
|
||||
}
|
||||
return array4;
|
||||
}
|
||||
|
||||
// Token: 0x06000052 RID: 82 RVA: 0x000030D8 File Offset: 0x000012D8
|
||||
private void SkipRawBytes(int size)
|
||||
{
|
||||
if (size < 0)
|
||||
{
|
||||
throw InvalidProtocolBufferException.NegativeSize();
|
||||
}
|
||||
if (this.totalBytesRetired + this.bufferPos + size > this.currentLimit)
|
||||
{
|
||||
this.SkipRawBytes(this.currentLimit - this.totalBytesRetired - this.bufferPos);
|
||||
throw InvalidProtocolBufferException.TruncatedMessage();
|
||||
}
|
||||
if (size <= this.bufferSize - this.bufferPos)
|
||||
{
|
||||
this.bufferPos += size;
|
||||
return;
|
||||
}
|
||||
int num = this.bufferSize - this.bufferPos;
|
||||
this.totalBytesRetired += this.bufferSize;
|
||||
this.bufferPos = 0;
|
||||
this.bufferSize = 0;
|
||||
if (num < size)
|
||||
{
|
||||
if (this.input == null)
|
||||
{
|
||||
throw InvalidProtocolBufferException.TruncatedMessage();
|
||||
}
|
||||
this.SkipImpl(size - num);
|
||||
this.totalBytesRetired += size - num;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000053 RID: 83 RVA: 0x000031A0 File Offset: 0x000013A0
|
||||
private void SkipImpl(int amountToSkip)
|
||||
{
|
||||
if (this.input.CanSeek)
|
||||
{
|
||||
long position = this.input.Position;
|
||||
this.input.Position += (long)amountToSkip;
|
||||
if (this.input.Position != position + (long)amountToSkip)
|
||||
{
|
||||
throw InvalidProtocolBufferException.TruncatedMessage();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
byte[] array = new byte[Math.Min(1024, amountToSkip)];
|
||||
while (amountToSkip > 0)
|
||||
{
|
||||
int num = this.input.Read(array, 0, Math.Min(array.Length, amountToSkip));
|
||||
if (num <= 0)
|
||||
{
|
||||
throw InvalidProtocolBufferException.TruncatedMessage();
|
||||
}
|
||||
amountToSkip -= num;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000004 RID: 4
|
||||
private readonly bool leaveOpen;
|
||||
|
||||
// Token: 0x04000005 RID: 5
|
||||
private readonly byte[] buffer;
|
||||
|
||||
// Token: 0x04000006 RID: 6
|
||||
private int bufferSize;
|
||||
|
||||
// Token: 0x04000007 RID: 7
|
||||
private int bufferSizeAfterLimit;
|
||||
|
||||
// Token: 0x04000008 RID: 8
|
||||
private int bufferPos;
|
||||
|
||||
// Token: 0x04000009 RID: 9
|
||||
private readonly Stream input;
|
||||
|
||||
// Token: 0x0400000A RID: 10
|
||||
private uint lastTag;
|
||||
|
||||
// Token: 0x0400000B RID: 11
|
||||
private uint nextTag;
|
||||
|
||||
// Token: 0x0400000C RID: 12
|
||||
private bool hasNextTag;
|
||||
|
||||
// Token: 0x0400000D RID: 13
|
||||
internal const int DefaultRecursionLimit = 64;
|
||||
|
||||
// Token: 0x0400000E RID: 14
|
||||
internal const int DefaultSizeLimit = 67108864;
|
||||
|
||||
// Token: 0x0400000F RID: 15
|
||||
internal const int BufferSize = 4096;
|
||||
|
||||
// Token: 0x04000010 RID: 16
|
||||
private int totalBytesRetired;
|
||||
|
||||
// Token: 0x04000011 RID: 17
|
||||
private int currentLimit = int.MaxValue;
|
||||
|
||||
// Token: 0x04000012 RID: 18
|
||||
private int recursionDepth;
|
||||
|
||||
// Token: 0x04000013 RID: 19
|
||||
private readonly int recursionLimit;
|
||||
|
||||
// Token: 0x04000014 RID: 20
|
||||
private readonly int sizeLimit;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,774 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace Google.Protobuf
|
||||
{
|
||||
// Token: 0x02000005 RID: 5
|
||||
public sealed class CodedOutputStream : IDisposable
|
||||
{
|
||||
// Token: 0x06000054 RID: 84 RVA: 0x0000322E File Offset: 0x0000142E
|
||||
public static int ComputeDoubleSize(double value)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
// Token: 0x06000055 RID: 85 RVA: 0x00003231 File Offset: 0x00001431
|
||||
public static int ComputeFloatSize(float value)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
// Token: 0x06000056 RID: 86 RVA: 0x00003234 File Offset: 0x00001434
|
||||
public static int ComputeUInt64Size(ulong value)
|
||||
{
|
||||
return CodedOutputStream.ComputeRawVarint64Size(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000057 RID: 87 RVA: 0x00003234 File Offset: 0x00001434
|
||||
public static int ComputeInt64Size(long value)
|
||||
{
|
||||
return CodedOutputStream.ComputeRawVarint64Size((ulong)value);
|
||||
}
|
||||
|
||||
// Token: 0x06000058 RID: 88 RVA: 0x0000323C File Offset: 0x0000143C
|
||||
public static int ComputeInt32Size(int value)
|
||||
{
|
||||
if (value >= 0)
|
||||
{
|
||||
return CodedOutputStream.ComputeRawVarint32Size((uint)value);
|
||||
}
|
||||
return 10;
|
||||
}
|
||||
|
||||
// Token: 0x06000059 RID: 89 RVA: 0x0000322E File Offset: 0x0000142E
|
||||
public static int ComputeFixed64Size(ulong value)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
// Token: 0x0600005A RID: 90 RVA: 0x00003231 File Offset: 0x00001431
|
||||
public static int ComputeFixed32Size(uint value)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
// Token: 0x0600005B RID: 91 RVA: 0x0000324B File Offset: 0x0000144B
|
||||
public static int ComputeBoolSize(bool value)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Token: 0x0600005C RID: 92 RVA: 0x00003250 File Offset: 0x00001450
|
||||
public static int ComputeStringSize(string value)
|
||||
{
|
||||
int byteCount = CodedOutputStream.Utf8Encoding.GetByteCount(value);
|
||||
return CodedOutputStream.ComputeLengthSize(byteCount) + byteCount;
|
||||
}
|
||||
|
||||
// Token: 0x0600005D RID: 93 RVA: 0x00003271 File Offset: 0x00001471
|
||||
public static int ComputeGroupSize(IMessage value)
|
||||
{
|
||||
return value.CalculateSize();
|
||||
}
|
||||
|
||||
// Token: 0x0600005E RID: 94 RVA: 0x0000327C File Offset: 0x0000147C
|
||||
public static int ComputeMessageSize(IMessage value)
|
||||
{
|
||||
int num = value.CalculateSize();
|
||||
return CodedOutputStream.ComputeLengthSize(num) + num;
|
||||
}
|
||||
|
||||
// Token: 0x0600005F RID: 95 RVA: 0x00003298 File Offset: 0x00001498
|
||||
public static int ComputeBytesSize(ByteString value)
|
||||
{
|
||||
return CodedOutputStream.ComputeLengthSize(value.Length) + value.Length;
|
||||
}
|
||||
|
||||
// Token: 0x06000060 RID: 96 RVA: 0x000032AC File Offset: 0x000014AC
|
||||
public static int ComputeUInt32Size(uint value)
|
||||
{
|
||||
return CodedOutputStream.ComputeRawVarint32Size(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000061 RID: 97 RVA: 0x000032B4 File Offset: 0x000014B4
|
||||
public static int ComputeEnumSize(int value)
|
||||
{
|
||||
return CodedOutputStream.ComputeInt32Size(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000062 RID: 98 RVA: 0x00003231 File Offset: 0x00001431
|
||||
public static int ComputeSFixed32Size(int value)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
// Token: 0x06000063 RID: 99 RVA: 0x0000322E File Offset: 0x0000142E
|
||||
public static int ComputeSFixed64Size(long value)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
// Token: 0x06000064 RID: 100 RVA: 0x000032BC File Offset: 0x000014BC
|
||||
public static int ComputeSInt32Size(int value)
|
||||
{
|
||||
return CodedOutputStream.ComputeRawVarint32Size(CodedOutputStream.EncodeZigZag32(value));
|
||||
}
|
||||
|
||||
// Token: 0x06000065 RID: 101 RVA: 0x000032C9 File Offset: 0x000014C9
|
||||
public static int ComputeSInt64Size(long value)
|
||||
{
|
||||
return CodedOutputStream.ComputeRawVarint64Size(CodedOutputStream.EncodeZigZag64(value));
|
||||
}
|
||||
|
||||
// Token: 0x06000066 RID: 102 RVA: 0x000032AC File Offset: 0x000014AC
|
||||
public static int ComputeLengthSize(int length)
|
||||
{
|
||||
return CodedOutputStream.ComputeRawVarint32Size((uint)length);
|
||||
}
|
||||
|
||||
// Token: 0x06000067 RID: 103 RVA: 0x000032D6 File Offset: 0x000014D6
|
||||
public static int ComputeRawVarint32Size(uint value)
|
||||
{
|
||||
if ((value & 4294967168U) == 0U)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if ((value & 4294950912U) == 0U)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
if ((value & 4292870144U) == 0U)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
if ((value & 4026531840U) == 0U)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
return 5;
|
||||
}
|
||||
|
||||
// Token: 0x06000068 RID: 104 RVA: 0x00003304 File Offset: 0x00001504
|
||||
public static int ComputeRawVarint64Size(ulong value)
|
||||
{
|
||||
if ((value & 18446744073709551488UL) == 0UL)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if ((value & 18446744073709535232UL) == 0UL)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
if ((value & 18446744073707454464UL) == 0UL)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
if ((value & 18446744073441116160UL) == 0UL)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
if ((value & 18446744039349813248UL) == 0UL)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
if ((value & 18446739675663040512UL) == 0UL)
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
if ((value & 18446181123756130304UL) == 0UL)
|
||||
{
|
||||
return 7;
|
||||
}
|
||||
if ((value & 18374686479671623680UL) == 0UL)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
if ((value & 9223372036854775808UL) == 0UL)
|
||||
{
|
||||
return 9;
|
||||
}
|
||||
return 10;
|
||||
}
|
||||
|
||||
// Token: 0x06000069 RID: 105 RVA: 0x0000338C File Offset: 0x0000158C
|
||||
public static int ComputeTagSize(int fieldNumber)
|
||||
{
|
||||
return CodedOutputStream.ComputeRawVarint32Size(WireFormat.MakeTag(fieldNumber, WireFormat.WireType.Varint));
|
||||
}
|
||||
|
||||
// Token: 0x0600006A RID: 106 RVA: 0x0000339A File Offset: 0x0000159A
|
||||
public CodedOutputStream(byte[] flatArray)
|
||||
: this(flatArray, 0, flatArray.Length)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600006B RID: 107 RVA: 0x000033A7 File Offset: 0x000015A7
|
||||
private CodedOutputStream(byte[] buffer, int offset, int length)
|
||||
{
|
||||
this.output = null;
|
||||
this.buffer = buffer;
|
||||
this.position = offset;
|
||||
this.limit = offset + length;
|
||||
this.leaveOpen = true;
|
||||
}
|
||||
|
||||
// Token: 0x0600006C RID: 108 RVA: 0x000033D4 File Offset: 0x000015D4
|
||||
private CodedOutputStream(Stream output, byte[] buffer, bool leaveOpen)
|
||||
{
|
||||
this.output = ProtoPreconditions.CheckNotNull<Stream>(output, "output");
|
||||
this.buffer = buffer;
|
||||
this.position = 0;
|
||||
this.limit = buffer.Length;
|
||||
this.leaveOpen = leaveOpen;
|
||||
}
|
||||
|
||||
// Token: 0x0600006D RID: 109 RVA: 0x0000340B File Offset: 0x0000160B
|
||||
public CodedOutputStream(Stream output)
|
||||
: this(output, CodedOutputStream.DefaultBufferSize, false)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600006E RID: 110 RVA: 0x0000341A File Offset: 0x0000161A
|
||||
public CodedOutputStream(Stream output, int bufferSize)
|
||||
: this(output, new byte[bufferSize], false)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600006F RID: 111 RVA: 0x0000342A File Offset: 0x0000162A
|
||||
public CodedOutputStream(Stream output, bool leaveOpen)
|
||||
: this(output, CodedOutputStream.DefaultBufferSize, leaveOpen)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000070 RID: 112 RVA: 0x00003439 File Offset: 0x00001639
|
||||
public CodedOutputStream(Stream output, int bufferSize, bool leaveOpen)
|
||||
: this(output, new byte[bufferSize], leaveOpen)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x1700000B RID: 11
|
||||
// (get) Token: 0x06000071 RID: 113 RVA: 0x00003449 File Offset: 0x00001649
|
||||
public long Position
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.output != null)
|
||||
{
|
||||
return this.output.Position + (long)this.position;
|
||||
}
|
||||
return (long)this.position;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000072 RID: 114 RVA: 0x0000346E File Offset: 0x0000166E
|
||||
public void WriteDouble(double value)
|
||||
{
|
||||
this.WriteRawLittleEndian64((ulong)BitConverter.DoubleToInt64Bits(value));
|
||||
}
|
||||
|
||||
// Token: 0x06000073 RID: 115 RVA: 0x0000347C File Offset: 0x0000167C
|
||||
public void WriteFloat(float value)
|
||||
{
|
||||
byte[] bytes = BitConverter.GetBytes(value);
|
||||
if (!BitConverter.IsLittleEndian)
|
||||
{
|
||||
ByteArray.Reverse(bytes);
|
||||
}
|
||||
if (this.limit - this.position >= 4)
|
||||
{
|
||||
byte[] array = this.buffer;
|
||||
int num = this.position;
|
||||
this.position = num + 1;
|
||||
array[num] = bytes[0];
|
||||
byte[] array2 = this.buffer;
|
||||
num = this.position;
|
||||
this.position = num + 1;
|
||||
array2[num] = bytes[1];
|
||||
byte[] array3 = this.buffer;
|
||||
num = this.position;
|
||||
this.position = num + 1;
|
||||
array3[num] = bytes[2];
|
||||
byte[] array4 = this.buffer;
|
||||
num = this.position;
|
||||
this.position = num + 1;
|
||||
array4[num] = bytes[3];
|
||||
return;
|
||||
}
|
||||
this.WriteRawBytes(bytes, 0, 4);
|
||||
}
|
||||
|
||||
// Token: 0x06000074 RID: 116 RVA: 0x00003523 File Offset: 0x00001723
|
||||
public void WriteUInt64(ulong value)
|
||||
{
|
||||
this.WriteRawVarint64(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000075 RID: 117 RVA: 0x00003523 File Offset: 0x00001723
|
||||
public void WriteInt64(long value)
|
||||
{
|
||||
this.WriteRawVarint64((ulong)value);
|
||||
}
|
||||
|
||||
// Token: 0x06000076 RID: 118 RVA: 0x0000352C File Offset: 0x0000172C
|
||||
public void WriteInt32(int value)
|
||||
{
|
||||
if (value >= 0)
|
||||
{
|
||||
this.WriteRawVarint32((uint)value);
|
||||
return;
|
||||
}
|
||||
this.WriteRawVarint64((ulong)((long)value));
|
||||
}
|
||||
|
||||
// Token: 0x06000077 RID: 119 RVA: 0x00003542 File Offset: 0x00001742
|
||||
public void WriteFixed64(ulong value)
|
||||
{
|
||||
this.WriteRawLittleEndian64(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000078 RID: 120 RVA: 0x0000354B File Offset: 0x0000174B
|
||||
public void WriteFixed32(uint value)
|
||||
{
|
||||
this.WriteRawLittleEndian32(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000079 RID: 121 RVA: 0x00003554 File Offset: 0x00001754
|
||||
public void WriteBool(bool value)
|
||||
{
|
||||
this.WriteRawByte(value ? 1 : 0);
|
||||
}
|
||||
|
||||
// Token: 0x0600007A RID: 122 RVA: 0x00003564 File Offset: 0x00001764
|
||||
public void WriteString(string value)
|
||||
{
|
||||
int byteCount = CodedOutputStream.Utf8Encoding.GetByteCount(value);
|
||||
this.WriteLength(byteCount);
|
||||
if (this.limit - this.position >= byteCount)
|
||||
{
|
||||
if (byteCount == value.Length)
|
||||
{
|
||||
for (int i = 0; i < byteCount; i++)
|
||||
{
|
||||
this.buffer[this.position + i] = (byte)value[i];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CodedOutputStream.Utf8Encoding.GetBytes(value, 0, value.Length, this.buffer, this.position);
|
||||
}
|
||||
this.position += byteCount;
|
||||
return;
|
||||
}
|
||||
byte[] bytes = CodedOutputStream.Utf8Encoding.GetBytes(value);
|
||||
this.WriteRawBytes(bytes);
|
||||
}
|
||||
|
||||
// Token: 0x0600007B RID: 123 RVA: 0x00003603 File Offset: 0x00001803
|
||||
public void WriteMessage(IMessage value)
|
||||
{
|
||||
this.WriteLength(value.CalculateSize());
|
||||
value.WriteTo(this);
|
||||
}
|
||||
|
||||
// Token: 0x0600007C RID: 124 RVA: 0x00003618 File Offset: 0x00001818
|
||||
public void WriteBytes(ByteString value)
|
||||
{
|
||||
this.WriteLength(value.Length);
|
||||
value.WriteRawBytesTo(this);
|
||||
}
|
||||
|
||||
// Token: 0x0600007D RID: 125 RVA: 0x0000362D File Offset: 0x0000182D
|
||||
public void WriteUInt32(uint value)
|
||||
{
|
||||
this.WriteRawVarint32(value);
|
||||
}
|
||||
|
||||
// Token: 0x0600007E RID: 126 RVA: 0x00003636 File Offset: 0x00001836
|
||||
public void WriteEnum(int value)
|
||||
{
|
||||
this.WriteInt32(value);
|
||||
}
|
||||
|
||||
// Token: 0x0600007F RID: 127 RVA: 0x0000354B File Offset: 0x0000174B
|
||||
public void WriteSFixed32(int value)
|
||||
{
|
||||
this.WriteRawLittleEndian32((uint)value);
|
||||
}
|
||||
|
||||
// Token: 0x06000080 RID: 128 RVA: 0x00003542 File Offset: 0x00001742
|
||||
public void WriteSFixed64(long value)
|
||||
{
|
||||
this.WriteRawLittleEndian64((ulong)value);
|
||||
}
|
||||
|
||||
// Token: 0x06000081 RID: 129 RVA: 0x0000363F File Offset: 0x0000183F
|
||||
public void WriteSInt32(int value)
|
||||
{
|
||||
this.WriteRawVarint32(CodedOutputStream.EncodeZigZag32(value));
|
||||
}
|
||||
|
||||
// Token: 0x06000082 RID: 130 RVA: 0x0000364D File Offset: 0x0000184D
|
||||
public void WriteSInt64(long value)
|
||||
{
|
||||
this.WriteRawVarint64(CodedOutputStream.EncodeZigZag64(value));
|
||||
}
|
||||
|
||||
// Token: 0x06000083 RID: 131 RVA: 0x0000362D File Offset: 0x0000182D
|
||||
public void WriteLength(int length)
|
||||
{
|
||||
this.WriteRawVarint32((uint)length);
|
||||
}
|
||||
|
||||
// Token: 0x06000084 RID: 132 RVA: 0x0000365B File Offset: 0x0000185B
|
||||
public void WriteTag(int fieldNumber, WireFormat.WireType type)
|
||||
{
|
||||
this.WriteRawVarint32(WireFormat.MakeTag(fieldNumber, type));
|
||||
}
|
||||
|
||||
// Token: 0x06000085 RID: 133 RVA: 0x0000362D File Offset: 0x0000182D
|
||||
public void WriteTag(uint tag)
|
||||
{
|
||||
this.WriteRawVarint32(tag);
|
||||
}
|
||||
|
||||
// Token: 0x06000086 RID: 134 RVA: 0x0000366A File Offset: 0x0000186A
|
||||
public void WriteRawTag(byte b1)
|
||||
{
|
||||
this.WriteRawByte(b1);
|
||||
}
|
||||
|
||||
// Token: 0x06000087 RID: 135 RVA: 0x00003673 File Offset: 0x00001873
|
||||
public void WriteRawTag(byte b1, byte b2)
|
||||
{
|
||||
this.WriteRawByte(b1);
|
||||
this.WriteRawByte(b2);
|
||||
}
|
||||
|
||||
// Token: 0x06000088 RID: 136 RVA: 0x00003683 File Offset: 0x00001883
|
||||
public void WriteRawTag(byte b1, byte b2, byte b3)
|
||||
{
|
||||
this.WriteRawByte(b1);
|
||||
this.WriteRawByte(b2);
|
||||
this.WriteRawByte(b3);
|
||||
}
|
||||
|
||||
// Token: 0x06000089 RID: 137 RVA: 0x0000369A File Offset: 0x0000189A
|
||||
public void WriteRawTag(byte b1, byte b2, byte b3, byte b4)
|
||||
{
|
||||
this.WriteRawByte(b1);
|
||||
this.WriteRawByte(b2);
|
||||
this.WriteRawByte(b3);
|
||||
this.WriteRawByte(b4);
|
||||
}
|
||||
|
||||
// Token: 0x0600008A RID: 138 RVA: 0x000036B9 File Offset: 0x000018B9
|
||||
public void WriteRawTag(byte b1, byte b2, byte b3, byte b4, byte b5)
|
||||
{
|
||||
this.WriteRawByte(b1);
|
||||
this.WriteRawByte(b2);
|
||||
this.WriteRawByte(b3);
|
||||
this.WriteRawByte(b4);
|
||||
this.WriteRawByte(b5);
|
||||
}
|
||||
|
||||
// Token: 0x0600008B RID: 139 RVA: 0x000036E0 File Offset: 0x000018E0
|
||||
internal void WriteRawVarint32(uint value)
|
||||
{
|
||||
if (value < 128U && this.position < this.limit)
|
||||
{
|
||||
byte[] array = this.buffer;
|
||||
int num = this.position;
|
||||
this.position = num + 1;
|
||||
array[num] = (byte)value;
|
||||
return;
|
||||
}
|
||||
while (value > 127U)
|
||||
{
|
||||
if (this.position >= this.limit)
|
||||
{
|
||||
break;
|
||||
}
|
||||
byte[] array2 = this.buffer;
|
||||
int num = this.position;
|
||||
this.position = num + 1;
|
||||
array2[num] = (byte)((value & 127U) | 128U);
|
||||
value >>= 7;
|
||||
}
|
||||
while (value > 127U)
|
||||
{
|
||||
this.WriteRawByte((byte)((value & 127U) | 128U));
|
||||
value >>= 7;
|
||||
}
|
||||
if (this.position < this.limit)
|
||||
{
|
||||
byte[] array3 = this.buffer;
|
||||
int num = this.position;
|
||||
this.position = num + 1;
|
||||
array3[num] = (byte)value;
|
||||
return;
|
||||
}
|
||||
this.WriteRawByte((byte)value);
|
||||
}
|
||||
|
||||
// Token: 0x0600008C RID: 140 RVA: 0x000037A8 File Offset: 0x000019A8
|
||||
internal void WriteRawVarint64(ulong value)
|
||||
{
|
||||
while (value > 127UL)
|
||||
{
|
||||
if (this.position >= this.limit)
|
||||
{
|
||||
break;
|
||||
}
|
||||
byte[] array = this.buffer;
|
||||
int num = this.position;
|
||||
this.position = num + 1;
|
||||
array[num] = (byte)((value & 127UL) | 128UL);
|
||||
value >>= 7;
|
||||
}
|
||||
while (value > 127UL)
|
||||
{
|
||||
this.WriteRawByte((byte)((value & 127UL) | 128UL));
|
||||
value >>= 7;
|
||||
}
|
||||
if (this.position < this.limit)
|
||||
{
|
||||
byte[] array2 = this.buffer;
|
||||
int num = this.position;
|
||||
this.position = num + 1;
|
||||
array2[num] = (byte)value;
|
||||
return;
|
||||
}
|
||||
this.WriteRawByte((byte)value);
|
||||
}
|
||||
|
||||
// Token: 0x0600008D RID: 141 RVA: 0x00003848 File Offset: 0x00001A48
|
||||
internal void WriteRawLittleEndian32(uint value)
|
||||
{
|
||||
if (this.position + 4 > this.limit)
|
||||
{
|
||||
this.WriteRawByte((byte)value);
|
||||
this.WriteRawByte((byte)(value >> 8));
|
||||
this.WriteRawByte((byte)(value >> 16));
|
||||
this.WriteRawByte((byte)(value >> 24));
|
||||
return;
|
||||
}
|
||||
byte[] array = this.buffer;
|
||||
int num = this.position;
|
||||
this.position = num + 1;
|
||||
array[num] = (byte)value;
|
||||
byte[] array2 = this.buffer;
|
||||
num = this.position;
|
||||
this.position = num + 1;
|
||||
array2[num] = (byte)(value >> 8);
|
||||
byte[] array3 = this.buffer;
|
||||
num = this.position;
|
||||
this.position = num + 1;
|
||||
array3[num] = (byte)(value >> 16);
|
||||
byte[] array4 = this.buffer;
|
||||
num = this.position;
|
||||
this.position = num + 1;
|
||||
array4[num] = (byte)(value >> 24);
|
||||
}
|
||||
|
||||
// Token: 0x0600008E RID: 142 RVA: 0x00003900 File Offset: 0x00001B00
|
||||
internal void WriteRawLittleEndian64(ulong value)
|
||||
{
|
||||
if (this.position + 8 > this.limit)
|
||||
{
|
||||
this.WriteRawByte((byte)value);
|
||||
this.WriteRawByte((byte)(value >> 8));
|
||||
this.WriteRawByte((byte)(value >> 16));
|
||||
this.WriteRawByte((byte)(value >> 24));
|
||||
this.WriteRawByte((byte)(value >> 32));
|
||||
this.WriteRawByte((byte)(value >> 40));
|
||||
this.WriteRawByte((byte)(value >> 48));
|
||||
this.WriteRawByte((byte)(value >> 56));
|
||||
return;
|
||||
}
|
||||
byte[] array = this.buffer;
|
||||
int num = this.position;
|
||||
this.position = num + 1;
|
||||
array[num] = (byte)value;
|
||||
byte[] array2 = this.buffer;
|
||||
num = this.position;
|
||||
this.position = num + 1;
|
||||
array2[num] = (byte)(value >> 8);
|
||||
byte[] array3 = this.buffer;
|
||||
num = this.position;
|
||||
this.position = num + 1;
|
||||
array3[num] = (byte)(value >> 16);
|
||||
byte[] array4 = this.buffer;
|
||||
num = this.position;
|
||||
this.position = num + 1;
|
||||
array4[num] = (byte)(value >> 24);
|
||||
byte[] array5 = this.buffer;
|
||||
num = this.position;
|
||||
this.position = num + 1;
|
||||
array5[num] = (byte)(value >> 32);
|
||||
byte[] array6 = this.buffer;
|
||||
num = this.position;
|
||||
this.position = num + 1;
|
||||
array6[num] = (byte)(value >> 40);
|
||||
byte[] array7 = this.buffer;
|
||||
num = this.position;
|
||||
this.position = num + 1;
|
||||
array7[num] = (byte)(value >> 48);
|
||||
byte[] array8 = this.buffer;
|
||||
num = this.position;
|
||||
this.position = num + 1;
|
||||
array8[num] = (byte)(value >> 56);
|
||||
}
|
||||
|
||||
// Token: 0x0600008F RID: 143 RVA: 0x00003A58 File Offset: 0x00001C58
|
||||
internal void WriteRawByte(byte value)
|
||||
{
|
||||
if (this.position == this.limit)
|
||||
{
|
||||
this.RefreshBuffer();
|
||||
}
|
||||
byte[] array = this.buffer;
|
||||
int num = this.position;
|
||||
this.position = num + 1;
|
||||
array[num] = value;
|
||||
}
|
||||
|
||||
// Token: 0x06000090 RID: 144 RVA: 0x00003A92 File Offset: 0x00001C92
|
||||
internal void WriteRawByte(uint value)
|
||||
{
|
||||
this.WriteRawByte((byte)value);
|
||||
}
|
||||
|
||||
// Token: 0x06000091 RID: 145 RVA: 0x00003A9C File Offset: 0x00001C9C
|
||||
internal void WriteRawBytes(byte[] value)
|
||||
{
|
||||
this.WriteRawBytes(value, 0, value.Length);
|
||||
}
|
||||
|
||||
// Token: 0x06000092 RID: 146 RVA: 0x00003AAC File Offset: 0x00001CAC
|
||||
internal void WriteRawBytes(byte[] value, int offset, int length)
|
||||
{
|
||||
if (this.limit - this.position >= length)
|
||||
{
|
||||
ByteArray.Copy(value, offset, this.buffer, this.position, length);
|
||||
this.position += length;
|
||||
return;
|
||||
}
|
||||
int num = this.limit - this.position;
|
||||
ByteArray.Copy(value, offset, this.buffer, this.position, num);
|
||||
offset += num;
|
||||
length -= num;
|
||||
this.position = this.limit;
|
||||
this.RefreshBuffer();
|
||||
if (length <= this.limit)
|
||||
{
|
||||
ByteArray.Copy(value, offset, this.buffer, 0, length);
|
||||
this.position = length;
|
||||
return;
|
||||
}
|
||||
this.output.Write(value, offset, length);
|
||||
}
|
||||
|
||||
// Token: 0x06000093 RID: 147 RVA: 0x00003B58 File Offset: 0x00001D58
|
||||
internal static uint EncodeZigZag32(int n)
|
||||
{
|
||||
return (uint)((n << 1) ^ (n >> 31));
|
||||
}
|
||||
|
||||
// Token: 0x06000094 RID: 148 RVA: 0x00003B62 File Offset: 0x00001D62
|
||||
internal static ulong EncodeZigZag64(long n)
|
||||
{
|
||||
return (ulong)((n << 1) ^ (n >> 63));
|
||||
}
|
||||
|
||||
// Token: 0x06000095 RID: 149 RVA: 0x00003B6C File Offset: 0x00001D6C
|
||||
private void RefreshBuffer()
|
||||
{
|
||||
if (this.output == null)
|
||||
{
|
||||
throw new CodedOutputStream.OutOfSpaceException();
|
||||
}
|
||||
this.output.Write(this.buffer, 0, this.position);
|
||||
this.position = 0;
|
||||
}
|
||||
|
||||
// Token: 0x06000096 RID: 150 RVA: 0x00003B9B File Offset: 0x00001D9B
|
||||
public void Dispose()
|
||||
{
|
||||
this.Flush();
|
||||
if (!this.leaveOpen)
|
||||
{
|
||||
this.output.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000097 RID: 151 RVA: 0x00003BB6 File Offset: 0x00001DB6
|
||||
public void Flush()
|
||||
{
|
||||
if (this.output != null)
|
||||
{
|
||||
this.RefreshBuffer();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000098 RID: 152 RVA: 0x00003BC6 File Offset: 0x00001DC6
|
||||
public void CheckNoSpaceLeft()
|
||||
{
|
||||
if (this.SpaceLeft != 0)
|
||||
{
|
||||
throw new InvalidOperationException("Did not write as much data as expected.");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700000C RID: 12
|
||||
// (get) Token: 0x06000099 RID: 153 RVA: 0x00003BDB File Offset: 0x00001DDB
|
||||
public int SpaceLeft
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.output == null)
|
||||
{
|
||||
return this.limit - this.position;
|
||||
}
|
||||
throw new InvalidOperationException("SpaceLeft can only be called on CodedOutputStreams that are writing to a flat array.");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000015 RID: 21
|
||||
private const int LittleEndian64Size = 8;
|
||||
|
||||
// Token: 0x04000016 RID: 22
|
||||
private const int LittleEndian32Size = 4;
|
||||
|
||||
// Token: 0x04000017 RID: 23
|
||||
internal static readonly Encoding Utf8Encoding = Encoding.UTF8;
|
||||
|
||||
// Token: 0x04000018 RID: 24
|
||||
public static readonly int DefaultBufferSize = 4096;
|
||||
|
||||
// Token: 0x04000019 RID: 25
|
||||
private readonly bool leaveOpen;
|
||||
|
||||
// Token: 0x0400001A RID: 26
|
||||
private readonly byte[] buffer;
|
||||
|
||||
// Token: 0x0400001B RID: 27
|
||||
private readonly int limit;
|
||||
|
||||
// Token: 0x0400001C RID: 28
|
||||
private int position;
|
||||
|
||||
// Token: 0x0400001D RID: 29
|
||||
private readonly Stream output;
|
||||
|
||||
// Token: 0x02000074 RID: 116
|
||||
public sealed class OutOfSpaceException : IOException
|
||||
{
|
||||
// Token: 0x06000671 RID: 1649 RVA: 0x00016268 File Offset: 0x00014468
|
||||
internal OutOfSpaceException()
|
||||
: base("CodedOutputStream was writing to a flat byte array and ran out of space.")
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,746 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.Collections
|
||||
{
|
||||
// Token: 0x0200006F RID: 111
|
||||
public sealed class MapField<TKey, TValue> : IDeepCloneable<MapField<TKey, TValue>>, IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable, IEquatable<MapField<TKey, TValue>>, IDictionary, ICollection
|
||||
{
|
||||
// Token: 0x0600060B RID: 1547 RVA: 0x000151CC File Offset: 0x000133CC
|
||||
public MapField<TKey, TValue> Clone()
|
||||
{
|
||||
MapField<TKey, TValue> mapField = new MapField<TKey, TValue>();
|
||||
if (typeof(IDeepCloneable<TValue>).IsAssignableFrom(typeof(TValue)))
|
||||
{
|
||||
using (LinkedList<KeyValuePair<TKey, TValue>>.Enumerator enumerator = this.list.GetEnumerator())
|
||||
{
|
||||
while (enumerator.MoveNext())
|
||||
{
|
||||
KeyValuePair<TKey, TValue> keyValuePair = enumerator.Current;
|
||||
mapField.Add(keyValuePair.Key, ((IDeepCloneable<TValue>)((object)keyValuePair.Value)).Clone());
|
||||
}
|
||||
return mapField;
|
||||
}
|
||||
}
|
||||
mapField.Add(this);
|
||||
return mapField;
|
||||
}
|
||||
|
||||
// Token: 0x0600060C RID: 1548 RVA: 0x00015264 File Offset: 0x00013464
|
||||
public void Add(TKey key, TValue value)
|
||||
{
|
||||
if (this.ContainsKey(key))
|
||||
{
|
||||
throw new ArgumentException("Key already exists in map", "key");
|
||||
}
|
||||
this[key] = value;
|
||||
}
|
||||
|
||||
// Token: 0x0600060D RID: 1549 RVA: 0x00015287 File Offset: 0x00013487
|
||||
public bool ContainsKey(TKey key)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNullUnconstrained<TKey>(key, "key");
|
||||
return this.map.ContainsKey(key);
|
||||
}
|
||||
|
||||
// Token: 0x0600060E RID: 1550 RVA: 0x000152A4 File Offset: 0x000134A4
|
||||
private bool ContainsValue(TValue value)
|
||||
{
|
||||
EqualityComparer<TValue> comparer = EqualityComparer<TValue>.Default;
|
||||
return this.list.Any((KeyValuePair<TKey, TValue> pair) => comparer.Equals(pair.Value, value));
|
||||
}
|
||||
|
||||
// Token: 0x0600060F RID: 1551 RVA: 0x000152E0 File Offset: 0x000134E0
|
||||
public bool Remove(TKey key)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNullUnconstrained<TKey>(key, "key");
|
||||
LinkedListNode<KeyValuePair<TKey, TValue>> linkedListNode;
|
||||
if (this.map.TryGetValue(key, out linkedListNode))
|
||||
{
|
||||
this.map.Remove(key);
|
||||
linkedListNode.List.Remove(linkedListNode);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Token: 0x06000610 RID: 1552 RVA: 0x00015328 File Offset: 0x00013528
|
||||
public bool TryGetValue(TKey key, out TValue value)
|
||||
{
|
||||
LinkedListNode<KeyValuePair<TKey, TValue>> linkedListNode;
|
||||
if (this.map.TryGetValue(key, out linkedListNode))
|
||||
{
|
||||
value = linkedListNode.Value.Value;
|
||||
return true;
|
||||
}
|
||||
value = default(TValue);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Token: 0x170001B5 RID: 437
|
||||
public TValue this[TKey key]
|
||||
{
|
||||
get
|
||||
{
|
||||
ProtoPreconditions.CheckNotNullUnconstrained<TKey>(key, "key");
|
||||
TValue tvalue;
|
||||
if (this.TryGetValue(key, out tvalue))
|
||||
{
|
||||
return tvalue;
|
||||
}
|
||||
throw new KeyNotFoundException();
|
||||
}
|
||||
set
|
||||
{
|
||||
ProtoPreconditions.CheckNotNullUnconstrained<TKey>(key, "key");
|
||||
if (value == null)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNullUnconstrained<TValue>(value, "value");
|
||||
}
|
||||
KeyValuePair<TKey, TValue> keyValuePair = new KeyValuePair<TKey, TValue>(key, value);
|
||||
LinkedListNode<KeyValuePair<TKey, TValue>> linkedListNode;
|
||||
if (this.map.TryGetValue(key, out linkedListNode))
|
||||
{
|
||||
linkedListNode.Value = keyValuePair;
|
||||
return;
|
||||
}
|
||||
linkedListNode = this.list.AddLast(keyValuePair);
|
||||
this.map[key] = linkedListNode;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001B6 RID: 438
|
||||
// (get) Token: 0x06000613 RID: 1555 RVA: 0x000153F8 File Offset: 0x000135F8
|
||||
public ICollection<TKey> Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return new MapField<TKey, TValue>.MapView<TKey>(this, (KeyValuePair<TKey, TValue> pair) => pair.Key, new Func<TKey, bool>(this.ContainsKey));
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001B7 RID: 439
|
||||
// (get) Token: 0x06000614 RID: 1556 RVA: 0x0001542C File Offset: 0x0001362C
|
||||
public ICollection<TValue> Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return new MapField<TKey, TValue>.MapView<TValue>(this, (KeyValuePair<TKey, TValue> pair) => pair.Value, new Func<TValue, bool>(this.ContainsValue));
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000615 RID: 1557 RVA: 0x00015460 File Offset: 0x00013660
|
||||
public void Add(IDictionary<TKey, TValue> entries)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<IDictionary<TKey, TValue>>(entries, "entries");
|
||||
foreach (KeyValuePair<TKey, TValue> keyValuePair in entries)
|
||||
{
|
||||
this.Add(keyValuePair.Key, keyValuePair.Value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000616 RID: 1558 RVA: 0x000154C4 File Offset: 0x000136C4
|
||||
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
|
||||
{
|
||||
return this.list.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x06000617 RID: 1559 RVA: 0x000154D6 File Offset: 0x000136D6
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x06000618 RID: 1560 RVA: 0x000154DE File Offset: 0x000136DE
|
||||
void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
|
||||
{
|
||||
this.Add(item.Key, item.Value);
|
||||
}
|
||||
|
||||
// Token: 0x06000619 RID: 1561 RVA: 0x000154F4 File Offset: 0x000136F4
|
||||
public void Clear()
|
||||
{
|
||||
this.list.Clear();
|
||||
this.map.Clear();
|
||||
}
|
||||
|
||||
// Token: 0x0600061A RID: 1562 RVA: 0x0001550C File Offset: 0x0001370C
|
||||
bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item)
|
||||
{
|
||||
TValue tvalue;
|
||||
return this.TryGetValue(item.Key, out tvalue) && EqualityComparer<TValue>.Default.Equals(item.Value, tvalue);
|
||||
}
|
||||
|
||||
// Token: 0x0600061B RID: 1563 RVA: 0x0001553E File Offset: 0x0001373E
|
||||
void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
|
||||
{
|
||||
this.list.CopyTo(array, arrayIndex);
|
||||
}
|
||||
|
||||
// Token: 0x0600061C RID: 1564 RVA: 0x00015550 File Offset: 0x00013750
|
||||
bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
|
||||
{
|
||||
if (item.Key == null)
|
||||
{
|
||||
throw new ArgumentException("Key is null", "item");
|
||||
}
|
||||
LinkedListNode<KeyValuePair<TKey, TValue>> linkedListNode;
|
||||
if (this.map.TryGetValue(item.Key, out linkedListNode) && EqualityComparer<TValue>.Default.Equals(item.Value, linkedListNode.Value.Value))
|
||||
{
|
||||
this.map.Remove(item.Key);
|
||||
linkedListNode.List.Remove(linkedListNode);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Token: 0x170001B8 RID: 440
|
||||
// (get) Token: 0x0600061D RID: 1565 RVA: 0x000155D4 File Offset: 0x000137D4
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001B9 RID: 441
|
||||
// (get) Token: 0x0600061E RID: 1566 RVA: 0x0000761F File Offset: 0x0000581F
|
||||
public bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600061F RID: 1567 RVA: 0x000155E1 File Offset: 0x000137E1
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as MapField<TKey, TValue>);
|
||||
}
|
||||
|
||||
// Token: 0x06000620 RID: 1568 RVA: 0x000155F0 File Offset: 0x000137F0
|
||||
public override int GetHashCode()
|
||||
{
|
||||
EqualityComparer<TValue> @default = EqualityComparer<TValue>.Default;
|
||||
int num = 0;
|
||||
foreach (KeyValuePair<TKey, TValue> keyValuePair in this.list)
|
||||
{
|
||||
int num2 = num;
|
||||
TKey key = keyValuePair.Key;
|
||||
num = num2 ^ (key.GetHashCode() * 31 + @default.GetHashCode(keyValuePair.Value));
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000621 RID: 1569 RVA: 0x00015670 File Offset: 0x00013870
|
||||
public bool Equals(MapField<TKey, TValue> other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (other == this)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (other.Count != this.Count)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
EqualityComparer<TValue> @default = EqualityComparer<TValue>.Default;
|
||||
foreach (KeyValuePair<TKey, TValue> keyValuePair in this)
|
||||
{
|
||||
TValue tvalue;
|
||||
if (!other.TryGetValue(keyValuePair.Key, out tvalue))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!@default.Equals(tvalue, keyValuePair.Value))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x06000622 RID: 1570 RVA: 0x00015704 File Offset: 0x00013904
|
||||
public void AddEntriesFrom(CodedInputStream input, MapField<TKey, TValue>.Codec codec)
|
||||
{
|
||||
MapField<TKey, TValue>.Codec.MessageAdapter messageAdapter = new MapField<TKey, TValue>.Codec.MessageAdapter(codec);
|
||||
do
|
||||
{
|
||||
messageAdapter.Reset();
|
||||
input.ReadMessage(messageAdapter);
|
||||
this[messageAdapter.Key] = messageAdapter.Value;
|
||||
}
|
||||
while (input.MaybeConsumeTag(codec.MapTag));
|
||||
}
|
||||
|
||||
// Token: 0x06000623 RID: 1571 RVA: 0x00015748 File Offset: 0x00013948
|
||||
public void WriteTo(CodedOutputStream output, MapField<TKey, TValue>.Codec codec)
|
||||
{
|
||||
MapField<TKey, TValue>.Codec.MessageAdapter messageAdapter = new MapField<TKey, TValue>.Codec.MessageAdapter(codec);
|
||||
foreach (KeyValuePair<TKey, TValue> keyValuePair in this.list)
|
||||
{
|
||||
messageAdapter.Key = keyValuePair.Key;
|
||||
messageAdapter.Value = keyValuePair.Value;
|
||||
output.WriteTag(codec.MapTag);
|
||||
output.WriteMessage(messageAdapter);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000624 RID: 1572 RVA: 0x000157C8 File Offset: 0x000139C8
|
||||
public int CalculateSize(MapField<TKey, TValue>.Codec codec)
|
||||
{
|
||||
if (this.Count == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
MapField<TKey, TValue>.Codec.MessageAdapter messageAdapter = new MapField<TKey, TValue>.Codec.MessageAdapter(codec);
|
||||
int num = 0;
|
||||
foreach (KeyValuePair<TKey, TValue> keyValuePair in this.list)
|
||||
{
|
||||
messageAdapter.Key = keyValuePair.Key;
|
||||
messageAdapter.Value = keyValuePair.Value;
|
||||
num += CodedOutputStream.ComputeRawVarint32Size(codec.MapTag);
|
||||
num += CodedOutputStream.ComputeMessageSize(messageAdapter);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000625 RID: 1573 RVA: 0x0001585C File Offset: 0x00013A5C
|
||||
public override string ToString()
|
||||
{
|
||||
StringWriter stringWriter = new StringWriter();
|
||||
JsonFormatter.Default.WriteDictionary(stringWriter, this);
|
||||
return stringWriter.ToString();
|
||||
}
|
||||
|
||||
// Token: 0x06000626 RID: 1574 RVA: 0x00015881 File Offset: 0x00013A81
|
||||
void IDictionary.Add(object key, object value)
|
||||
{
|
||||
this.Add((TKey)((object)key), (TValue)((object)value));
|
||||
}
|
||||
|
||||
// Token: 0x06000627 RID: 1575 RVA: 0x00015895 File Offset: 0x00013A95
|
||||
bool IDictionary.Contains(object key)
|
||||
{
|
||||
return key is TKey && this.ContainsKey((TKey)((object)key));
|
||||
}
|
||||
|
||||
// Token: 0x06000628 RID: 1576 RVA: 0x000158AD File Offset: 0x00013AAD
|
||||
IDictionaryEnumerator IDictionary.GetEnumerator()
|
||||
{
|
||||
return new MapField<TKey, TValue>.DictionaryEnumerator(this.GetEnumerator());
|
||||
}
|
||||
|
||||
// Token: 0x06000629 RID: 1577 RVA: 0x000158BA File Offset: 0x00013ABA
|
||||
void IDictionary.Remove(object key)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<object>(key, "key");
|
||||
if (!(key is TKey))
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.Remove((TKey)((object)key));
|
||||
}
|
||||
|
||||
// Token: 0x0600062A RID: 1578 RVA: 0x000158DE File Offset: 0x00013ADE
|
||||
void ICollection.CopyTo(Array array, int index)
|
||||
{
|
||||
((ICollection)this.Select((KeyValuePair<TKey, TValue> pair) => new DictionaryEntry(pair.Key, pair.Value)).ToList<DictionaryEntry>()).CopyTo(array, index);
|
||||
}
|
||||
|
||||
// Token: 0x170001BA RID: 442
|
||||
// (get) Token: 0x0600062B RID: 1579 RVA: 0x0000761F File Offset: 0x0000581F
|
||||
bool IDictionary.IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001BB RID: 443
|
||||
// (get) Token: 0x0600062C RID: 1580 RVA: 0x00015911 File Offset: 0x00013B11
|
||||
ICollection IDictionary.Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return (ICollection)this.Keys;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001BC RID: 444
|
||||
// (get) Token: 0x0600062D RID: 1581 RVA: 0x0001591E File Offset: 0x00013B1E
|
||||
ICollection IDictionary.Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return (ICollection)this.Values;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001BD RID: 445
|
||||
// (get) Token: 0x0600062E RID: 1582 RVA: 0x0000761F File Offset: 0x0000581F
|
||||
bool ICollection.IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001BE RID: 446
|
||||
// (get) Token: 0x0600062F RID: 1583 RVA: 0x000142A1 File Offset: 0x000124A1
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001BF RID: 447
|
||||
object IDictionary.this[object key]
|
||||
{
|
||||
get
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<object>(key, "key");
|
||||
if (!(key is TKey))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
TValue tvalue;
|
||||
this.TryGetValue((TKey)((object)key), out tvalue);
|
||||
return tvalue;
|
||||
}
|
||||
set
|
||||
{
|
||||
this[(TKey)((object)key)] = (TValue)((object)value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000266 RID: 614
|
||||
private readonly Dictionary<TKey, LinkedListNode<KeyValuePair<TKey, TValue>>> map = new Dictionary<TKey, LinkedListNode<KeyValuePair<TKey, TValue>>>();
|
||||
|
||||
// Token: 0x04000267 RID: 615
|
||||
private readonly LinkedList<KeyValuePair<TKey, TValue>> list = new LinkedList<KeyValuePair<TKey, TValue>>();
|
||||
|
||||
// Token: 0x020000C8 RID: 200
|
||||
private class DictionaryEnumerator : IDictionaryEnumerator, IEnumerator
|
||||
{
|
||||
// Token: 0x06000787 RID: 1927 RVA: 0x00017941 File Offset: 0x00015B41
|
||||
internal DictionaryEnumerator(IEnumerator<KeyValuePair<TKey, TValue>> enumerator)
|
||||
{
|
||||
this.enumerator = enumerator;
|
||||
}
|
||||
|
||||
// Token: 0x06000788 RID: 1928 RVA: 0x00017950 File Offset: 0x00015B50
|
||||
public bool MoveNext()
|
||||
{
|
||||
return this.enumerator.MoveNext();
|
||||
}
|
||||
|
||||
// Token: 0x06000789 RID: 1929 RVA: 0x0001795D File Offset: 0x00015B5D
|
||||
public void Reset()
|
||||
{
|
||||
this.enumerator.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x170001D4 RID: 468
|
||||
// (get) Token: 0x0600078A RID: 1930 RVA: 0x0001796A File Offset: 0x00015B6A
|
||||
public object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Entry;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001D5 RID: 469
|
||||
// (get) Token: 0x0600078B RID: 1931 RVA: 0x00017977 File Offset: 0x00015B77
|
||||
public DictionaryEntry Entry
|
||||
{
|
||||
get
|
||||
{
|
||||
return new DictionaryEntry(this.Key, this.Value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001D6 RID: 470
|
||||
// (get) Token: 0x0600078C RID: 1932 RVA: 0x0001798C File Offset: 0x00015B8C
|
||||
public object Key
|
||||
{
|
||||
get
|
||||
{
|
||||
KeyValuePair<TKey, TValue> keyValuePair = this.enumerator.Current;
|
||||
return keyValuePair.Key;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001D7 RID: 471
|
||||
// (get) Token: 0x0600078D RID: 1933 RVA: 0x000179B4 File Offset: 0x00015BB4
|
||||
public object Value
|
||||
{
|
||||
get
|
||||
{
|
||||
KeyValuePair<TKey, TValue> keyValuePair = this.enumerator.Current;
|
||||
return keyValuePair.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000305 RID: 773
|
||||
private readonly IEnumerator<KeyValuePair<TKey, TValue>> enumerator;
|
||||
}
|
||||
|
||||
// Token: 0x020000C9 RID: 201
|
||||
public sealed class Codec
|
||||
{
|
||||
// Token: 0x0600078E RID: 1934 RVA: 0x000179D9 File Offset: 0x00015BD9
|
||||
public Codec(FieldCodec<TKey> keyCodec, FieldCodec<TValue> valueCodec, uint mapTag)
|
||||
{
|
||||
this.keyCodec = keyCodec;
|
||||
this.valueCodec = valueCodec;
|
||||
this.mapTag = mapTag;
|
||||
}
|
||||
|
||||
// Token: 0x170001D8 RID: 472
|
||||
// (get) Token: 0x0600078F RID: 1935 RVA: 0x000179F6 File Offset: 0x00015BF6
|
||||
internal uint MapTag
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.mapTag;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000306 RID: 774
|
||||
private readonly FieldCodec<TKey> keyCodec;
|
||||
|
||||
// Token: 0x04000307 RID: 775
|
||||
private readonly FieldCodec<TValue> valueCodec;
|
||||
|
||||
// Token: 0x04000308 RID: 776
|
||||
private readonly uint mapTag;
|
||||
|
||||
// Token: 0x020000DF RID: 223
|
||||
internal class MessageAdapter : IMessage
|
||||
{
|
||||
// Token: 0x170001FD RID: 509
|
||||
// (get) Token: 0x06000818 RID: 2072 RVA: 0x00018B77 File Offset: 0x00016D77
|
||||
// (set) Token: 0x06000819 RID: 2073 RVA: 0x00018B7F File Offset: 0x00016D7F
|
||||
internal TKey Key { get; set; }
|
||||
|
||||
// Token: 0x170001FE RID: 510
|
||||
// (get) Token: 0x0600081A RID: 2074 RVA: 0x00018B88 File Offset: 0x00016D88
|
||||
// (set) Token: 0x0600081B RID: 2075 RVA: 0x00018B90 File Offset: 0x00016D90
|
||||
internal TValue Value { get; set; }
|
||||
|
||||
// Token: 0x0600081C RID: 2076 RVA: 0x00018B99 File Offset: 0x00016D99
|
||||
internal MessageAdapter(MapField<TKey, TValue>.Codec codec)
|
||||
{
|
||||
this.codec = codec;
|
||||
}
|
||||
|
||||
// Token: 0x0600081D RID: 2077 RVA: 0x00018BA8 File Offset: 0x00016DA8
|
||||
internal void Reset()
|
||||
{
|
||||
this.Key = this.codec.keyCodec.DefaultValue;
|
||||
this.Value = this.codec.valueCodec.DefaultValue;
|
||||
}
|
||||
|
||||
// Token: 0x0600081E RID: 2078 RVA: 0x00018BD8 File Offset: 0x00016DD8
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num == this.codec.keyCodec.Tag)
|
||||
{
|
||||
this.Key = this.codec.keyCodec.Read(input);
|
||||
}
|
||||
else if (num == this.codec.valueCodec.Tag)
|
||||
{
|
||||
this.Value = this.codec.valueCodec.Read(input);
|
||||
}
|
||||
else
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
}
|
||||
if (this.Value == null)
|
||||
{
|
||||
this.Value = this.codec.valueCodec.Read(new CodedInputStream(MapField<TKey, TValue>.Codec.MessageAdapter.ZeroLengthMessageStreamData));
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600081F RID: 2079 RVA: 0x00018C7C File Offset: 0x00016E7C
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
this.codec.keyCodec.WriteTagAndValue(output, this.Key);
|
||||
this.codec.valueCodec.WriteTagAndValue(output, this.Value);
|
||||
}
|
||||
|
||||
// Token: 0x06000820 RID: 2080 RVA: 0x00018CAC File Offset: 0x00016EAC
|
||||
public int CalculateSize()
|
||||
{
|
||||
return this.codec.keyCodec.CalculateSizeWithTag(this.Key) + this.codec.valueCodec.CalculateSizeWithTag(this.Value);
|
||||
}
|
||||
|
||||
// Token: 0x170001FF RID: 511
|
||||
// (get) Token: 0x06000821 RID: 2081 RVA: 0x00018CDB File Offset: 0x00016EDB
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400038E RID: 910
|
||||
private static readonly byte[] ZeroLengthMessageStreamData = new byte[1];
|
||||
|
||||
// Token: 0x0400038F RID: 911
|
||||
private readonly MapField<TKey, TValue>.Codec codec;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x020000CA RID: 202
|
||||
private class MapView<T> : ICollection<T>, IEnumerable<T>, IEnumerable, ICollection
|
||||
{
|
||||
// Token: 0x06000790 RID: 1936 RVA: 0x000179FE File Offset: 0x00015BFE
|
||||
internal MapView(MapField<TKey, TValue> parent, Func<KeyValuePair<TKey, TValue>, T> projection, Func<T, bool> containsCheck)
|
||||
{
|
||||
this.parent = parent;
|
||||
this.projection = projection;
|
||||
this.containsCheck = containsCheck;
|
||||
}
|
||||
|
||||
// Token: 0x170001D9 RID: 473
|
||||
// (get) Token: 0x06000791 RID: 1937 RVA: 0x00017A1B File Offset: 0x00015C1B
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.parent.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001DA RID: 474
|
||||
// (get) Token: 0x06000792 RID: 1938 RVA: 0x0000324B File Offset: 0x0000144B
|
||||
public bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001DB RID: 475
|
||||
// (get) Token: 0x06000793 RID: 1939 RVA: 0x0000761F File Offset: 0x0000581F
|
||||
public bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001DC RID: 476
|
||||
// (get) Token: 0x06000794 RID: 1940 RVA: 0x00017A28 File Offset: 0x00015C28
|
||||
public object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.parent;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000795 RID: 1941 RVA: 0x00007624 File Offset: 0x00005824
|
||||
public void Add(T item)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x06000796 RID: 1942 RVA: 0x00007624 File Offset: 0x00005824
|
||||
public void Clear()
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x06000797 RID: 1943 RVA: 0x00017A30 File Offset: 0x00015C30
|
||||
public bool Contains(T item)
|
||||
{
|
||||
return this.containsCheck(item);
|
||||
}
|
||||
|
||||
// Token: 0x06000798 RID: 1944 RVA: 0x00017A40 File Offset: 0x00015C40
|
||||
public void CopyTo(T[] array, int arrayIndex)
|
||||
{
|
||||
if (arrayIndex < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("arrayIndex");
|
||||
}
|
||||
if (arrayIndex + this.Count >= array.Length)
|
||||
{
|
||||
throw new ArgumentException("Not enough space in the array", "array");
|
||||
}
|
||||
foreach (T t in this)
|
||||
{
|
||||
array[arrayIndex++] = t;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000799 RID: 1945 RVA: 0x00017ABC File Offset: 0x00015CBC
|
||||
public IEnumerator<T> GetEnumerator()
|
||||
{
|
||||
return this.parent.list.Select(this.projection).GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x0600079A RID: 1946 RVA: 0x00007624 File Offset: 0x00005824
|
||||
public bool Remove(T item)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x0600079B RID: 1947 RVA: 0x00017AD9 File Offset: 0x00015CD9
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x0600079C RID: 1948 RVA: 0x00017AE4 File Offset: 0x00015CE4
|
||||
public void CopyTo(Array array, int index)
|
||||
{
|
||||
if (index < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
if (index + this.Count >= array.Length)
|
||||
{
|
||||
throw new ArgumentException("Not enough space in the array", "array");
|
||||
}
|
||||
foreach (T t in this)
|
||||
{
|
||||
array.SetValue(t, index++);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000309 RID: 777
|
||||
private readonly MapField<TKey, TValue> parent;
|
||||
|
||||
// Token: 0x0400030A RID: 778
|
||||
private readonly Func<KeyValuePair<TKey, TValue>, T> projection;
|
||||
|
||||
// Token: 0x0400030B RID: 779
|
||||
private readonly Func<T, bool> containsCheck;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Google.Protobuf.Collections
|
||||
{
|
||||
// Token: 0x02000070 RID: 112
|
||||
internal sealed class ReadOnlyDictionary<TKey, TValue> : IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable
|
||||
{
|
||||
// Token: 0x06000633 RID: 1587 RVA: 0x00015996 File Offset: 0x00013B96
|
||||
public ReadOnlyDictionary(IDictionary<TKey, TValue> wrapped)
|
||||
{
|
||||
this.wrapped = wrapped;
|
||||
}
|
||||
|
||||
// Token: 0x06000634 RID: 1588 RVA: 0x000159A5 File Offset: 0x00013BA5
|
||||
public void Add(TKey key, TValue value)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
|
||||
// Token: 0x06000635 RID: 1589 RVA: 0x000159AC File Offset: 0x00013BAC
|
||||
public bool ContainsKey(TKey key)
|
||||
{
|
||||
return this.wrapped.ContainsKey(key);
|
||||
}
|
||||
|
||||
// Token: 0x170001C0 RID: 448
|
||||
// (get) Token: 0x06000636 RID: 1590 RVA: 0x000159BA File Offset: 0x00013BBA
|
||||
public ICollection<TKey> Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.wrapped.Keys;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000637 RID: 1591 RVA: 0x000159A5 File Offset: 0x00013BA5
|
||||
public bool Remove(TKey key)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
|
||||
// Token: 0x06000638 RID: 1592 RVA: 0x000159C7 File Offset: 0x00013BC7
|
||||
public bool TryGetValue(TKey key, out TValue value)
|
||||
{
|
||||
return this.wrapped.TryGetValue(key, out value);
|
||||
}
|
||||
|
||||
// Token: 0x170001C1 RID: 449
|
||||
// (get) Token: 0x06000639 RID: 1593 RVA: 0x000159D6 File Offset: 0x00013BD6
|
||||
public ICollection<TValue> Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.wrapped.Values;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001C2 RID: 450
|
||||
public TValue this[TKey key]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.wrapped[key];
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600063C RID: 1596 RVA: 0x000159A5 File Offset: 0x00013BA5
|
||||
public void Add(KeyValuePair<TKey, TValue> item)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
|
||||
// Token: 0x0600063D RID: 1597 RVA: 0x000159A5 File Offset: 0x00013BA5
|
||||
public void Clear()
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
|
||||
// Token: 0x0600063E RID: 1598 RVA: 0x000159F1 File Offset: 0x00013BF1
|
||||
public bool Contains(KeyValuePair<TKey, TValue> item)
|
||||
{
|
||||
return this.wrapped.Contains(item);
|
||||
}
|
||||
|
||||
// Token: 0x0600063F RID: 1599 RVA: 0x000159FF File Offset: 0x00013BFF
|
||||
public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
|
||||
{
|
||||
this.wrapped.CopyTo(array, arrayIndex);
|
||||
}
|
||||
|
||||
// Token: 0x170001C3 RID: 451
|
||||
// (get) Token: 0x06000640 RID: 1600 RVA: 0x00015A0E File Offset: 0x00013C0E
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.wrapped.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001C4 RID: 452
|
||||
// (get) Token: 0x06000641 RID: 1601 RVA: 0x0000324B File Offset: 0x0000144B
|
||||
public bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000642 RID: 1602 RVA: 0x000159A5 File Offset: 0x00013BA5
|
||||
public bool Remove(KeyValuePair<TKey, TValue> item)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
|
||||
// Token: 0x06000643 RID: 1603 RVA: 0x00015A1B File Offset: 0x00013C1B
|
||||
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
|
||||
{
|
||||
return this.wrapped.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x06000644 RID: 1604 RVA: 0x00015A28 File Offset: 0x00013C28
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.wrapped.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x06000645 RID: 1605 RVA: 0x00015A35 File Offset: 0x00013C35
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return this.wrapped.Equals(obj);
|
||||
}
|
||||
|
||||
// Token: 0x06000646 RID: 1606 RVA: 0x00015A43 File Offset: 0x00013C43
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.wrapped.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x06000647 RID: 1607 RVA: 0x00015A50 File Offset: 0x00013C50
|
||||
public override string ToString()
|
||||
{
|
||||
return this.wrapped.ToString();
|
||||
}
|
||||
|
||||
// Token: 0x04000268 RID: 616
|
||||
private readonly IDictionary<TKey, TValue> wrapped;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,480 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace Google.Protobuf.Collections
|
||||
{
|
||||
// Token: 0x02000071 RID: 113
|
||||
public sealed class RepeatedField<T> : IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable, IList, ICollection, IDeepCloneable<RepeatedField<T>>, IEquatable<RepeatedField<T>>
|
||||
{
|
||||
// Token: 0x06000648 RID: 1608 RVA: 0x00015A60 File Offset: 0x00013C60
|
||||
public RepeatedField<T> Clone()
|
||||
{
|
||||
RepeatedField<T> repeatedField = new RepeatedField<T>();
|
||||
if (this.array != RepeatedField<T>.EmptyArray)
|
||||
{
|
||||
repeatedField.array = (T[])this.array.Clone();
|
||||
IDeepCloneable<T>[] array = repeatedField.array as IDeepCloneable<T>[];
|
||||
if (array != null)
|
||||
{
|
||||
for (int i = 0; i < this.count; i++)
|
||||
{
|
||||
repeatedField.array[i] = array[i].Clone();
|
||||
}
|
||||
}
|
||||
}
|
||||
repeatedField.count = this.count;
|
||||
return repeatedField;
|
||||
}
|
||||
|
||||
// Token: 0x06000649 RID: 1609 RVA: 0x00015AD8 File Offset: 0x00013CD8
|
||||
public void AddEntriesFrom(CodedInputStream input, FieldCodec<T> codec)
|
||||
{
|
||||
uint lastTag = input.LastTag;
|
||||
Func<CodedInputStream, T> valueReader = codec.ValueReader;
|
||||
if (FieldCodec<T>.IsPackedRepeatedField(lastTag))
|
||||
{
|
||||
int num = input.ReadLength();
|
||||
if (num > 0)
|
||||
{
|
||||
int num2 = input.PushLimit(num);
|
||||
while (!input.ReachedLimit)
|
||||
{
|
||||
this.Add(valueReader(input));
|
||||
}
|
||||
input.PopLimit(num2);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
do
|
||||
{
|
||||
this.Add(valueReader(input));
|
||||
}
|
||||
while (input.MaybeConsumeTag(lastTag));
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600064A RID: 1610 RVA: 0x00015B44 File Offset: 0x00013D44
|
||||
public int CalculateSize(FieldCodec<T> codec)
|
||||
{
|
||||
if (this.count == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
uint tag = codec.Tag;
|
||||
if (codec.PackedRepeatedField)
|
||||
{
|
||||
int num = this.CalculatePackedDataSize(codec);
|
||||
return CodedOutputStream.ComputeRawVarint32Size(tag) + CodedOutputStream.ComputeLengthSize(num) + num;
|
||||
}
|
||||
Func<T, int> valueSizeCalculator = codec.ValueSizeCalculator;
|
||||
int num2 = this.count * CodedOutputStream.ComputeRawVarint32Size(tag);
|
||||
for (int i = 0; i < this.count; i++)
|
||||
{
|
||||
num2 += valueSizeCalculator(this.array[i]);
|
||||
}
|
||||
return num2;
|
||||
}
|
||||
|
||||
// Token: 0x0600064B RID: 1611 RVA: 0x00015BC4 File Offset: 0x00013DC4
|
||||
private int CalculatePackedDataSize(FieldCodec<T> codec)
|
||||
{
|
||||
int fixedSize = codec.FixedSize;
|
||||
if (fixedSize == 0)
|
||||
{
|
||||
Func<T, int> valueSizeCalculator = codec.ValueSizeCalculator;
|
||||
int num = 0;
|
||||
for (int i = 0; i < this.count; i++)
|
||||
{
|
||||
num += valueSizeCalculator(this.array[i]);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
return fixedSize * this.Count;
|
||||
}
|
||||
|
||||
// Token: 0x0600064C RID: 1612 RVA: 0x00015C14 File Offset: 0x00013E14
|
||||
public void WriteTo(CodedOutputStream output, FieldCodec<T> codec)
|
||||
{
|
||||
if (this.count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Action<CodedOutputStream, T> valueWriter = codec.ValueWriter;
|
||||
uint tag = codec.Tag;
|
||||
if (codec.PackedRepeatedField)
|
||||
{
|
||||
uint num = (uint)this.CalculatePackedDataSize(codec);
|
||||
output.WriteTag(tag);
|
||||
output.WriteRawVarint32(num);
|
||||
for (int i = 0; i < this.count; i++)
|
||||
{
|
||||
valueWriter(output, this.array[i]);
|
||||
}
|
||||
return;
|
||||
}
|
||||
for (int j = 0; j < this.count; j++)
|
||||
{
|
||||
output.WriteTag(tag);
|
||||
valueWriter(output, this.array[j]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600064D RID: 1613 RVA: 0x00015CAC File Offset: 0x00013EAC
|
||||
private void EnsureSize(int size)
|
||||
{
|
||||
if (this.array.Length < size)
|
||||
{
|
||||
size = Math.Max(size, 8);
|
||||
T[] array = new T[Math.Max(this.array.Length * 2, size)];
|
||||
Array.Copy(this.array, 0, array, 0, this.array.Length);
|
||||
this.array = array;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600064E RID: 1614 RVA: 0x00015D00 File Offset: 0x00013F00
|
||||
public void Add(T item)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNullUnconstrained<T>(item, "item");
|
||||
this.EnsureSize(this.count + 1);
|
||||
T[] array = this.array;
|
||||
int num = this.count;
|
||||
this.count = num + 1;
|
||||
array[num] = item;
|
||||
}
|
||||
|
||||
// Token: 0x0600064F RID: 1615 RVA: 0x00015D44 File Offset: 0x00013F44
|
||||
public void Clear()
|
||||
{
|
||||
this.array = RepeatedField<T>.EmptyArray;
|
||||
this.count = 0;
|
||||
}
|
||||
|
||||
// Token: 0x06000650 RID: 1616 RVA: 0x00015D58 File Offset: 0x00013F58
|
||||
public bool Contains(T item)
|
||||
{
|
||||
return this.IndexOf(item) != -1;
|
||||
}
|
||||
|
||||
// Token: 0x06000651 RID: 1617 RVA: 0x00015D67 File Offset: 0x00013F67
|
||||
public void CopyTo(T[] array, int arrayIndex)
|
||||
{
|
||||
Array.Copy(this.array, 0, array, arrayIndex, this.count);
|
||||
}
|
||||
|
||||
// Token: 0x06000652 RID: 1618 RVA: 0x00015D80 File Offset: 0x00013F80
|
||||
public bool Remove(T item)
|
||||
{
|
||||
int num = this.IndexOf(item);
|
||||
if (num == -1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Array.Copy(this.array, num + 1, this.array, num, this.count - num - 1);
|
||||
this.count--;
|
||||
this.array[this.count] = default(T);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x170001C5 RID: 453
|
||||
// (get) Token: 0x06000653 RID: 1619 RVA: 0x00015DE3 File Offset: 0x00013FE3
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001C6 RID: 454
|
||||
// (get) Token: 0x06000654 RID: 1620 RVA: 0x0000761F File Offset: 0x0000581F
|
||||
public bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000655 RID: 1621 RVA: 0x00015DEC File Offset: 0x00013FEC
|
||||
public void AddRange(IEnumerable<T> values)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<IEnumerable<T>>(values, "values");
|
||||
RepeatedField<T> repeatedField = values as RepeatedField<T>;
|
||||
if (repeatedField != null)
|
||||
{
|
||||
this.EnsureSize(this.count + repeatedField.count);
|
||||
Array.Copy(repeatedField.array, 0, this.array, this.count, repeatedField.count);
|
||||
this.count += repeatedField.count;
|
||||
return;
|
||||
}
|
||||
ICollection collection = values as ICollection;
|
||||
if (collection != null)
|
||||
{
|
||||
int num = collection.Count;
|
||||
if (default(T) == null)
|
||||
{
|
||||
using (IEnumerator enumerator = collection.GetEnumerator())
|
||||
{
|
||||
while (enumerator.MoveNext())
|
||||
{
|
||||
if (enumerator.Current == null)
|
||||
{
|
||||
throw new ArgumentException("Sequence contained null element", "values");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.EnsureSize(this.count + num);
|
||||
collection.CopyTo(this.array, this.count);
|
||||
this.count += num;
|
||||
return;
|
||||
}
|
||||
foreach (T t in values)
|
||||
{
|
||||
this.Add(t);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000656 RID: 1622 RVA: 0x00015F38 File Offset: 0x00014138
|
||||
public void Add(IEnumerable<T> values)
|
||||
{
|
||||
this.AddRange(values);
|
||||
}
|
||||
|
||||
// Token: 0x06000657 RID: 1623 RVA: 0x00015F41 File Offset: 0x00014141
|
||||
public IEnumerator<T> GetEnumerator()
|
||||
{
|
||||
int num;
|
||||
for (int i = 0; i < this.count; i = num + 1)
|
||||
{
|
||||
yield return this.array[i];
|
||||
num = i;
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
// Token: 0x06000658 RID: 1624 RVA: 0x00015F50 File Offset: 0x00014150
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return this.Equals(obj as RepeatedField<T>);
|
||||
}
|
||||
|
||||
// Token: 0x06000659 RID: 1625 RVA: 0x00015F5E File Offset: 0x0001415E
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x0600065A RID: 1626 RVA: 0x00015F68 File Offset: 0x00014168
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 0;
|
||||
for (int i = 0; i < this.count; i++)
|
||||
{
|
||||
num = num * 31 + this.array[i].GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0600065B RID: 1627 RVA: 0x00015FA8 File Offset: 0x000141A8
|
||||
public bool Equals(RepeatedField<T> other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (other == this)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (other.Count != this.Count)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
EqualityComparer<T> @default = EqualityComparer<T>.Default;
|
||||
for (int i = 0; i < this.count; i++)
|
||||
{
|
||||
if (!@default.Equals(this.array[i], other.array[i]))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x0600065C RID: 1628 RVA: 0x0001600C File Offset: 0x0001420C
|
||||
public int IndexOf(T item)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNullUnconstrained<T>(item, "item");
|
||||
EqualityComparer<T> @default = EqualityComparer<T>.Default;
|
||||
for (int i = 0; i < this.count; i++)
|
||||
{
|
||||
if (@default.Equals(this.array[i], item))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Token: 0x0600065D RID: 1629 RVA: 0x00016054 File Offset: 0x00014254
|
||||
public void Insert(int index, T item)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNullUnconstrained<T>(item, "item");
|
||||
if (index < 0 || index > this.count)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
this.EnsureSize(this.count + 1);
|
||||
Array.Copy(this.array, index, this.array, index + 1, this.count - index);
|
||||
this.array[index] = item;
|
||||
this.count++;
|
||||
}
|
||||
|
||||
// Token: 0x0600065E RID: 1630 RVA: 0x000160CC File Offset: 0x000142CC
|
||||
public void RemoveAt(int index)
|
||||
{
|
||||
if (index < 0 || index >= this.count)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
Array.Copy(this.array, index + 1, this.array, index, this.count - index - 1);
|
||||
this.count--;
|
||||
this.array[this.count] = default(T);
|
||||
}
|
||||
|
||||
// Token: 0x0600065F RID: 1631 RVA: 0x00016138 File Offset: 0x00014338
|
||||
public override string ToString()
|
||||
{
|
||||
StringWriter stringWriter = new StringWriter();
|
||||
JsonFormatter.Default.WriteList(stringWriter, this);
|
||||
return stringWriter.ToString();
|
||||
}
|
||||
|
||||
// Token: 0x170001C7 RID: 455
|
||||
public T this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (index < 0 || index >= this.count)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
return this.array[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
if (index < 0 || index >= this.count)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
ProtoPreconditions.CheckNotNullUnconstrained<T>(value, "value");
|
||||
this.array[index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001C8 RID: 456
|
||||
// (get) Token: 0x06000662 RID: 1634 RVA: 0x0000761F File Offset: 0x0000581F
|
||||
bool IList.IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000663 RID: 1635 RVA: 0x00015D67 File Offset: 0x00013F67
|
||||
void ICollection.CopyTo(Array array, int index)
|
||||
{
|
||||
Array.Copy(this.array, 0, array, index, this.count);
|
||||
}
|
||||
|
||||
// Token: 0x170001C9 RID: 457
|
||||
// (get) Token: 0x06000664 RID: 1636 RVA: 0x0000761F File Offset: 0x0000581F
|
||||
bool ICollection.IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001CA RID: 458
|
||||
// (get) Token: 0x06000665 RID: 1637 RVA: 0x000142A1 File Offset: 0x000124A1
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001CB RID: 459
|
||||
object IList.this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
this[index] = (T)((object)value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000668 RID: 1640 RVA: 0x000161D3 File Offset: 0x000143D3
|
||||
int IList.Add(object value)
|
||||
{
|
||||
this.Add((T)((object)value));
|
||||
return this.count - 1;
|
||||
}
|
||||
|
||||
// Token: 0x06000669 RID: 1641 RVA: 0x000161E9 File Offset: 0x000143E9
|
||||
bool IList.Contains(object value)
|
||||
{
|
||||
return value is T && this.Contains((T)((object)value));
|
||||
}
|
||||
|
||||
// Token: 0x0600066A RID: 1642 RVA: 0x00016201 File Offset: 0x00014401
|
||||
int IList.IndexOf(object value)
|
||||
{
|
||||
if (!(value is T))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return this.IndexOf((T)((object)value));
|
||||
}
|
||||
|
||||
// Token: 0x0600066B RID: 1643 RVA: 0x00016219 File Offset: 0x00014419
|
||||
void IList.Insert(int index, object value)
|
||||
{
|
||||
this.Insert(index, (T)((object)value));
|
||||
}
|
||||
|
||||
// Token: 0x0600066C RID: 1644 RVA: 0x00016228 File Offset: 0x00014428
|
||||
void IList.Remove(object value)
|
||||
{
|
||||
if (!(value is T))
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.Remove((T)((object)value));
|
||||
}
|
||||
|
||||
// Token: 0x04000269 RID: 617
|
||||
private static readonly T[] EmptyArray = new T[0];
|
||||
|
||||
// Token: 0x0400026A RID: 618
|
||||
private const int MinArraySize = 8;
|
||||
|
||||
// Token: 0x0400026B RID: 619
|
||||
private T[] array = RepeatedField<T>.EmptyArray;
|
||||
|
||||
// Token: 0x0400026C RID: 620
|
||||
private int count;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Google.Protobuf.Compatibility
|
||||
{
|
||||
// Token: 0x0200006E RID: 110
|
||||
internal static class PropertyInfoExtensions
|
||||
{
|
||||
// Token: 0x06000609 RID: 1545 RVA: 0x00015184 File Offset: 0x00013384
|
||||
internal static MethodInfo GetGetMethod(this PropertyInfo target)
|
||||
{
|
||||
MethodInfo getMethod = target.GetGetMethod();
|
||||
if (getMethod == null || !getMethod.IsPublic)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return getMethod;
|
||||
}
|
||||
|
||||
// Token: 0x0600060A RID: 1546 RVA: 0x000151A8 File Offset: 0x000133A8
|
||||
internal static MethodInfo GetSetMethod(this PropertyInfo target)
|
||||
{
|
||||
MethodInfo setMethod = target.GetSetMethod();
|
||||
if (setMethod == null || !setMethod.IsPublic)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return setMethod;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Google.Protobuf
|
||||
{
|
||||
// Token: 0x02000007 RID: 7
|
||||
public sealed class FieldCodec<T>
|
||||
{
|
||||
// Token: 0x060000AE RID: 174 RVA: 0x000042E0 File Offset: 0x000024E0
|
||||
static FieldCodec()
|
||||
{
|
||||
if (typeof(T) == typeof(string))
|
||||
{
|
||||
FieldCodec<T>.DefaultDefault = (T)((object)"");
|
||||
return;
|
||||
}
|
||||
if (typeof(T) == typeof(ByteString))
|
||||
{
|
||||
FieldCodec<T>.DefaultDefault = (T)((object)ByteString.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060000AF RID: 175 RVA: 0x0000434E File Offset: 0x0000254E
|
||||
internal static bool IsPackedRepeatedField(uint tag)
|
||||
{
|
||||
return FieldCodec<T>.TypeSupportsPacking && WireFormat.GetTagWireType(tag) == WireFormat.WireType.LengthDelimited;
|
||||
}
|
||||
|
||||
// Token: 0x1700000D RID: 13
|
||||
// (get) Token: 0x060000B0 RID: 176 RVA: 0x00004362 File Offset: 0x00002562
|
||||
internal bool PackedRepeatedField { get; }
|
||||
|
||||
// Token: 0x1700000E RID: 14
|
||||
// (get) Token: 0x060000B1 RID: 177 RVA: 0x0000436A File Offset: 0x0000256A
|
||||
internal Action<CodedOutputStream, T> ValueWriter { get; }
|
||||
|
||||
// Token: 0x1700000F RID: 15
|
||||
// (get) Token: 0x060000B2 RID: 178 RVA: 0x00004372 File Offset: 0x00002572
|
||||
internal Func<T, int> ValueSizeCalculator { get; }
|
||||
|
||||
// Token: 0x17000010 RID: 16
|
||||
// (get) Token: 0x060000B3 RID: 179 RVA: 0x0000437A File Offset: 0x0000257A
|
||||
internal Func<CodedInputStream, T> ValueReader { get; }
|
||||
|
||||
// Token: 0x17000011 RID: 17
|
||||
// (get) Token: 0x060000B4 RID: 180 RVA: 0x00004382 File Offset: 0x00002582
|
||||
internal int FixedSize { get; }
|
||||
|
||||
// Token: 0x17000012 RID: 18
|
||||
// (get) Token: 0x060000B5 RID: 181 RVA: 0x0000438A File Offset: 0x0000258A
|
||||
internal uint Tag { get; }
|
||||
|
||||
// Token: 0x17000013 RID: 19
|
||||
// (get) Token: 0x060000B6 RID: 182 RVA: 0x00004392 File Offset: 0x00002592
|
||||
internal T DefaultValue { get; }
|
||||
|
||||
// Token: 0x060000B7 RID: 183 RVA: 0x0000439C File Offset: 0x0000259C
|
||||
internal FieldCodec(Func<CodedInputStream, T> reader, Action<CodedOutputStream, T> writer, int fixedSize, uint tag)
|
||||
: this(reader, writer, (T _) => fixedSize, tag)
|
||||
{
|
||||
this.FixedSize = fixedSize;
|
||||
}
|
||||
|
||||
// Token: 0x060000B8 RID: 184 RVA: 0x000043D8 File Offset: 0x000025D8
|
||||
internal FieldCodec(Func<CodedInputStream, T> reader, Action<CodedOutputStream, T> writer, Func<T, int> sizeCalculator, uint tag)
|
||||
: this(reader, writer, sizeCalculator, tag, FieldCodec<T>.DefaultDefault)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060000B9 RID: 185 RVA: 0x000043EC File Offset: 0x000025EC
|
||||
internal FieldCodec(Func<CodedInputStream, T> reader, Action<CodedOutputStream, T> writer, Func<T, int> sizeCalculator, uint tag, T defaultValue)
|
||||
{
|
||||
this.ValueReader = reader;
|
||||
this.ValueWriter = writer;
|
||||
this.ValueSizeCalculator = sizeCalculator;
|
||||
this.FixedSize = 0;
|
||||
this.Tag = tag;
|
||||
this.DefaultValue = defaultValue;
|
||||
this.tagSize = CodedOutputStream.ComputeRawVarint32Size(tag);
|
||||
this.PackedRepeatedField = FieldCodec<T>.IsPackedRepeatedField(tag);
|
||||
}
|
||||
|
||||
// Token: 0x060000BA RID: 186 RVA: 0x00004445 File Offset: 0x00002645
|
||||
public void WriteTagAndValue(CodedOutputStream output, T value)
|
||||
{
|
||||
if (!this.IsDefault(value))
|
||||
{
|
||||
output.WriteTag(this.Tag);
|
||||
this.ValueWriter(output, value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060000BB RID: 187 RVA: 0x00004469 File Offset: 0x00002669
|
||||
public T Read(CodedInputStream input)
|
||||
{
|
||||
return this.ValueReader(input);
|
||||
}
|
||||
|
||||
// Token: 0x060000BC RID: 188 RVA: 0x00004477 File Offset: 0x00002677
|
||||
public int CalculateSizeWithTag(T value)
|
||||
{
|
||||
if (!this.IsDefault(value))
|
||||
{
|
||||
return this.ValueSizeCalculator(value) + this.tagSize;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Token: 0x060000BD RID: 189 RVA: 0x00004497 File Offset: 0x00002697
|
||||
private bool IsDefault(T value)
|
||||
{
|
||||
return EqualityComparer<T>.Default.Equals(value, this.DefaultValue);
|
||||
}
|
||||
|
||||
// Token: 0x0400001E RID: 30
|
||||
private static readonly T DefaultDefault;
|
||||
|
||||
// Token: 0x0400001F RID: 31
|
||||
private static readonly bool TypeSupportsPacking = default(T) != null;
|
||||
|
||||
// Token: 0x04000027 RID: 39
|
||||
private readonly int tagSize;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,287 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Google.Protobuf
|
||||
{
|
||||
// Token: 0x02000006 RID: 6
|
||||
public static class FieldCodec
|
||||
{
|
||||
// Token: 0x0600009B RID: 155 RVA: 0x00003C14 File Offset: 0x00001E14
|
||||
public static FieldCodec<string> ForString(uint tag)
|
||||
{
|
||||
return new FieldCodec<string>((CodedInputStream input) => input.ReadString(), delegate(CodedOutputStream output, string value)
|
||||
{
|
||||
output.WriteString(value);
|
||||
}, new Func<string, int>(CodedOutputStream.ComputeStringSize), tag);
|
||||
}
|
||||
|
||||
// Token: 0x0600009C RID: 156 RVA: 0x00003C74 File Offset: 0x00001E74
|
||||
public static FieldCodec<ByteString> ForBytes(uint tag)
|
||||
{
|
||||
return new FieldCodec<ByteString>((CodedInputStream input) => input.ReadBytes(), delegate(CodedOutputStream output, ByteString value)
|
||||
{
|
||||
output.WriteBytes(value);
|
||||
}, new Func<ByteString, int>(CodedOutputStream.ComputeBytesSize), tag);
|
||||
}
|
||||
|
||||
// Token: 0x0600009D RID: 157 RVA: 0x00003CD4 File Offset: 0x00001ED4
|
||||
public static FieldCodec<bool> ForBool(uint tag)
|
||||
{
|
||||
return new FieldCodec<bool>((CodedInputStream input) => input.ReadBool(), delegate(CodedOutputStream output, bool value)
|
||||
{
|
||||
output.WriteBool(value);
|
||||
}, new Func<bool, int>(CodedOutputStream.ComputeBoolSize), tag);
|
||||
}
|
||||
|
||||
// Token: 0x0600009E RID: 158 RVA: 0x00003D34 File Offset: 0x00001F34
|
||||
public static FieldCodec<int> ForInt32(uint tag)
|
||||
{
|
||||
return new FieldCodec<int>((CodedInputStream input) => input.ReadInt32(), delegate(CodedOutputStream output, int value)
|
||||
{
|
||||
output.WriteInt32(value);
|
||||
}, new Func<int, int>(CodedOutputStream.ComputeInt32Size), tag);
|
||||
}
|
||||
|
||||
// Token: 0x0600009F RID: 159 RVA: 0x00003D94 File Offset: 0x00001F94
|
||||
public static FieldCodec<int> ForSInt32(uint tag)
|
||||
{
|
||||
return new FieldCodec<int>((CodedInputStream input) => input.ReadSInt32(), delegate(CodedOutputStream output, int value)
|
||||
{
|
||||
output.WriteSInt32(value);
|
||||
}, new Func<int, int>(CodedOutputStream.ComputeSInt32Size), tag);
|
||||
}
|
||||
|
||||
// Token: 0x060000A0 RID: 160 RVA: 0x00003DF4 File Offset: 0x00001FF4
|
||||
public static FieldCodec<uint> ForFixed32(uint tag)
|
||||
{
|
||||
return new FieldCodec<uint>((CodedInputStream input) => input.ReadFixed32(), delegate(CodedOutputStream output, uint value)
|
||||
{
|
||||
output.WriteFixed32(value);
|
||||
}, 4, tag);
|
||||
}
|
||||
|
||||
// Token: 0x060000A1 RID: 161 RVA: 0x00003E48 File Offset: 0x00002048
|
||||
public static FieldCodec<int> ForSFixed32(uint tag)
|
||||
{
|
||||
return new FieldCodec<int>((CodedInputStream input) => input.ReadSFixed32(), delegate(CodedOutputStream output, int value)
|
||||
{
|
||||
output.WriteSFixed32(value);
|
||||
}, 4, tag);
|
||||
}
|
||||
|
||||
// Token: 0x060000A2 RID: 162 RVA: 0x00003E9C File Offset: 0x0000209C
|
||||
public static FieldCodec<uint> ForUInt32(uint tag)
|
||||
{
|
||||
return new FieldCodec<uint>((CodedInputStream input) => input.ReadUInt32(), delegate(CodedOutputStream output, uint value)
|
||||
{
|
||||
output.WriteUInt32(value);
|
||||
}, new Func<uint, int>(CodedOutputStream.ComputeUInt32Size), tag);
|
||||
}
|
||||
|
||||
// Token: 0x060000A3 RID: 163 RVA: 0x00003EFC File Offset: 0x000020FC
|
||||
public static FieldCodec<long> ForInt64(uint tag)
|
||||
{
|
||||
return new FieldCodec<long>((CodedInputStream input) => input.ReadInt64(), delegate(CodedOutputStream output, long value)
|
||||
{
|
||||
output.WriteInt64(value);
|
||||
}, new Func<long, int>(CodedOutputStream.ComputeInt64Size), tag);
|
||||
}
|
||||
|
||||
// Token: 0x060000A4 RID: 164 RVA: 0x00003F5C File Offset: 0x0000215C
|
||||
public static FieldCodec<long> ForSInt64(uint tag)
|
||||
{
|
||||
return new FieldCodec<long>((CodedInputStream input) => input.ReadSInt64(), delegate(CodedOutputStream output, long value)
|
||||
{
|
||||
output.WriteSInt64(value);
|
||||
}, new Func<long, int>(CodedOutputStream.ComputeSInt64Size), tag);
|
||||
}
|
||||
|
||||
// Token: 0x060000A5 RID: 165 RVA: 0x00003FBC File Offset: 0x000021BC
|
||||
public static FieldCodec<ulong> ForFixed64(uint tag)
|
||||
{
|
||||
return new FieldCodec<ulong>((CodedInputStream input) => input.ReadFixed64(), delegate(CodedOutputStream output, ulong value)
|
||||
{
|
||||
output.WriteFixed64(value);
|
||||
}, 8, tag);
|
||||
}
|
||||
|
||||
// Token: 0x060000A6 RID: 166 RVA: 0x00004010 File Offset: 0x00002210
|
||||
public static FieldCodec<long> ForSFixed64(uint tag)
|
||||
{
|
||||
return new FieldCodec<long>((CodedInputStream input) => input.ReadSFixed64(), delegate(CodedOutputStream output, long value)
|
||||
{
|
||||
output.WriteSFixed64(value);
|
||||
}, 8, tag);
|
||||
}
|
||||
|
||||
// Token: 0x060000A7 RID: 167 RVA: 0x00004064 File Offset: 0x00002264
|
||||
public static FieldCodec<ulong> ForUInt64(uint tag)
|
||||
{
|
||||
return new FieldCodec<ulong>((CodedInputStream input) => input.ReadUInt64(), delegate(CodedOutputStream output, ulong value)
|
||||
{
|
||||
output.WriteUInt64(value);
|
||||
}, new Func<ulong, int>(CodedOutputStream.ComputeUInt64Size), tag);
|
||||
}
|
||||
|
||||
// Token: 0x060000A8 RID: 168 RVA: 0x000040C4 File Offset: 0x000022C4
|
||||
public static FieldCodec<float> ForFloat(uint tag)
|
||||
{
|
||||
return new FieldCodec<float>((CodedInputStream input) => input.ReadFloat(), delegate(CodedOutputStream output, float value)
|
||||
{
|
||||
output.WriteFloat(value);
|
||||
}, new Func<float, int>(CodedOutputStream.ComputeFloatSize), tag);
|
||||
}
|
||||
|
||||
// Token: 0x060000A9 RID: 169 RVA: 0x00004124 File Offset: 0x00002324
|
||||
public static FieldCodec<double> ForDouble(uint tag)
|
||||
{
|
||||
return new FieldCodec<double>((CodedInputStream input) => input.ReadDouble(), delegate(CodedOutputStream output, double value)
|
||||
{
|
||||
output.WriteDouble(value);
|
||||
}, new Func<double, int>(CodedOutputStream.ComputeDoubleSize), tag);
|
||||
}
|
||||
|
||||
// Token: 0x060000AA RID: 170 RVA: 0x00004184 File Offset: 0x00002384
|
||||
public static FieldCodec<T> ForEnum<T>(uint tag, Func<T, int> toInt32, Func<int, T> fromInt32)
|
||||
{
|
||||
return new FieldCodec<T>((CodedInputStream input) => fromInt32(input.ReadEnum()), delegate(CodedOutputStream output, T value)
|
||||
{
|
||||
output.WriteEnum(toInt32(value));
|
||||
}, (T value) => CodedOutputStream.ComputeEnumSize(toInt32(value)), tag);
|
||||
}
|
||||
|
||||
// Token: 0x060000AB RID: 171 RVA: 0x000041D0 File Offset: 0x000023D0
|
||||
public static FieldCodec<T> ForMessage<T>(uint tag, MessageParser<T> parser) where T : IMessage<T>
|
||||
{
|
||||
return new FieldCodec<T>(delegate(CodedInputStream input)
|
||||
{
|
||||
T t = parser.CreateTemplate();
|
||||
input.ReadMessage(t);
|
||||
return t;
|
||||
}, delegate(CodedOutputStream output, T value)
|
||||
{
|
||||
output.WriteMessage(value);
|
||||
}, (T message) => CodedOutputStream.ComputeMessageSize(message), tag);
|
||||
}
|
||||
|
||||
// Token: 0x060000AC RID: 172 RVA: 0x00004238 File Offset: 0x00002438
|
||||
public static FieldCodec<T> ForClassWrapper<T>(uint tag) where T : class
|
||||
{
|
||||
FieldCodec<T> nestedCodec = FieldCodec.WrapperCodecs.GetCodec<T>();
|
||||
return new FieldCodec<T>((CodedInputStream input) => FieldCodec.WrapperCodecs.Read<T>(input, nestedCodec), delegate(CodedOutputStream output, T value)
|
||||
{
|
||||
FieldCodec.WrapperCodecs.Write<T>(output, value, nestedCodec);
|
||||
}, (T value) => FieldCodec.WrapperCodecs.CalculateSize<T>(value, nestedCodec), tag, default(T));
|
||||
}
|
||||
|
||||
// Token: 0x060000AD RID: 173 RVA: 0x0000428C File Offset: 0x0000248C
|
||||
public static FieldCodec<T?> ForStructWrapper<T>(uint tag) where T : struct
|
||||
{
|
||||
FieldCodec<T> nestedCodec = FieldCodec.WrapperCodecs.GetCodec<T>();
|
||||
return new FieldCodec<T?>((CodedInputStream input) => new T?(FieldCodec.WrapperCodecs.Read<T>(input, nestedCodec)), delegate(CodedOutputStream output, T? value)
|
||||
{
|
||||
FieldCodec.WrapperCodecs.Write<T>(output, value.Value, nestedCodec);
|
||||
}, delegate(T? value)
|
||||
{
|
||||
if (value != null)
|
||||
{
|
||||
return FieldCodec.WrapperCodecs.CalculateSize<T>(value.Value, nestedCodec);
|
||||
}
|
||||
return 0;
|
||||
}, tag, null);
|
||||
}
|
||||
|
||||
// Token: 0x02000075 RID: 117
|
||||
private static class WrapperCodecs
|
||||
{
|
||||
// Token: 0x06000672 RID: 1650 RVA: 0x00016278 File Offset: 0x00014478
|
||||
internal static FieldCodec<T> GetCodec<T>()
|
||||
{
|
||||
object obj;
|
||||
if (!FieldCodec.WrapperCodecs.Codecs.TryGetValue(typeof(T), out obj))
|
||||
{
|
||||
throw new InvalidOperationException("Invalid type argument requested for wrapper codec: " + typeof(T));
|
||||
}
|
||||
return (FieldCodec<T>)obj;
|
||||
}
|
||||
|
||||
// Token: 0x06000673 RID: 1651 RVA: 0x000162C0 File Offset: 0x000144C0
|
||||
internal static T Read<T>(CodedInputStream input, FieldCodec<T> codec)
|
||||
{
|
||||
int num = input.ReadLength();
|
||||
int num2 = input.PushLimit(num);
|
||||
T t = codec.DefaultValue;
|
||||
uint num3;
|
||||
while ((num3 = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num3 == codec.Tag)
|
||||
{
|
||||
t = codec.Read(input);
|
||||
}
|
||||
else
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
}
|
||||
input.CheckReadEndOfStreamTag();
|
||||
input.PopLimit(num2);
|
||||
return t;
|
||||
}
|
||||
|
||||
// Token: 0x06000674 RID: 1652 RVA: 0x00016316 File Offset: 0x00014516
|
||||
internal static void Write<T>(CodedOutputStream output, T value, FieldCodec<T> codec)
|
||||
{
|
||||
output.WriteLength(codec.CalculateSizeWithTag(value));
|
||||
codec.WriteTagAndValue(output, value);
|
||||
}
|
||||
|
||||
// Token: 0x06000675 RID: 1653 RVA: 0x00016330 File Offset: 0x00014530
|
||||
internal static int CalculateSize<T>(T value, FieldCodec<T> codec)
|
||||
{
|
||||
int num = codec.CalculateSizeWithTag(value);
|
||||
return CodedOutputStream.ComputeLengthSize(num) + num;
|
||||
}
|
||||
|
||||
// Token: 0x0400026E RID: 622
|
||||
private static readonly Dictionary<Type, object> Codecs = new Dictionary<Type, object>
|
||||
{
|
||||
{
|
||||
typeof(bool),
|
||||
FieldCodec.ForBool(WireFormat.MakeTag(1, WireFormat.WireType.Varint))
|
||||
},
|
||||
{
|
||||
typeof(int),
|
||||
FieldCodec.ForInt32(WireFormat.MakeTag(1, WireFormat.WireType.Varint))
|
||||
},
|
||||
{
|
||||
typeof(long),
|
||||
FieldCodec.ForInt64(WireFormat.MakeTag(1, WireFormat.WireType.Varint))
|
||||
},
|
||||
{
|
||||
typeof(uint),
|
||||
FieldCodec.ForUInt32(WireFormat.MakeTag(1, WireFormat.WireType.Varint))
|
||||
},
|
||||
{
|
||||
typeof(ulong),
|
||||
FieldCodec.ForUInt64(WireFormat.MakeTag(1, WireFormat.WireType.Varint))
|
||||
},
|
||||
{
|
||||
typeof(float),
|
||||
FieldCodec.ForFloat(WireFormat.MakeTag(1, WireFormat.WireType.Fixed32))
|
||||
},
|
||||
{
|
||||
typeof(double),
|
||||
FieldCodec.ForDouble(WireFormat.MakeTag(1, WireFormat.WireType.Fixed64))
|
||||
},
|
||||
{
|
||||
typeof(string),
|
||||
FieldCodec.ForString(WireFormat.MakeTag(1, WireFormat.WireType.LengthDelimited))
|
||||
},
|
||||
{
|
||||
typeof(ByteString),
|
||||
FieldCodec.ForBytes(WireFormat.MakeTag(1, WireFormat.WireType.LengthDelimited))
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Google.Protobuf
|
||||
{
|
||||
// Token: 0x02000008 RID: 8
|
||||
internal static class FrameworkPortability
|
||||
{
|
||||
// Token: 0x04000028 RID: 40
|
||||
internal static readonly RegexOptions CompiledRegexWhereAvailable = (Enum.IsDefined(typeof(RegexOptions), 8) ? ((RegexOptions)8) : RegexOptions.None);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace Google.Protobuf
|
||||
{
|
||||
// Token: 0x02000009 RID: 9
|
||||
public interface ICustomDiagnosticMessage : IMessage
|
||||
{
|
||||
// Token: 0x060000BF RID: 191
|
||||
string ToDiagnosticString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace Google.Protobuf
|
||||
{
|
||||
// Token: 0x0200000A RID: 10
|
||||
public interface IDeepCloneable<T>
|
||||
{
|
||||
// Token: 0x060000C0 RID: 192
|
||||
T Clone();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace Google.Protobuf
|
||||
{
|
||||
// Token: 0x0200000C RID: 12
|
||||
public interface IMessage<T> : IMessage, IEquatable<T>, IDeepCloneable<T> where T : IMessage<T>
|
||||
{
|
||||
// Token: 0x060000C5 RID: 197
|
||||
void MergeFrom(T message);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf
|
||||
{
|
||||
// Token: 0x0200000B RID: 11
|
||||
public interface IMessage
|
||||
{
|
||||
// Token: 0x060000C1 RID: 193
|
||||
void MergeFrom(CodedInputStream input);
|
||||
|
||||
// Token: 0x060000C2 RID: 194
|
||||
void WriteTo(CodedOutputStream output);
|
||||
|
||||
// Token: 0x060000C3 RID: 195
|
||||
int CalculateSize();
|
||||
|
||||
// Token: 0x17000014 RID: 20
|
||||
// (get) Token: 0x060000C4 RID: 196
|
||||
MessageDescriptor Descriptor { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Google.Protobuf
|
||||
{
|
||||
// Token: 0x0200000D RID: 13
|
||||
public sealed class InvalidJsonException : IOException
|
||||
{
|
||||
// Token: 0x060000C6 RID: 198 RVA: 0x000044CC File Offset: 0x000026CC
|
||||
internal InvalidJsonException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Google.Protobuf
|
||||
{
|
||||
// Token: 0x0200000E RID: 14
|
||||
public sealed class InvalidProtocolBufferException : IOException
|
||||
{
|
||||
// Token: 0x060000C7 RID: 199 RVA: 0x000044CC File Offset: 0x000026CC
|
||||
internal InvalidProtocolBufferException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060000C8 RID: 200 RVA: 0x000044D5 File Offset: 0x000026D5
|
||||
internal InvalidProtocolBufferException(string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060000C9 RID: 201 RVA: 0x000044DF File Offset: 0x000026DF
|
||||
internal static InvalidProtocolBufferException MoreDataAvailable()
|
||||
{
|
||||
return new InvalidProtocolBufferException("Completed reading a message while more data was available in the stream.");
|
||||
}
|
||||
|
||||
// Token: 0x060000CA RID: 202 RVA: 0x000044EB File Offset: 0x000026EB
|
||||
internal static InvalidProtocolBufferException TruncatedMessage()
|
||||
{
|
||||
return new InvalidProtocolBufferException("While parsing a protocol message, the input ended unexpectedly in the middle of a field. This could mean either than the input has been truncated or that an embedded message misreported its own length.");
|
||||
}
|
||||
|
||||
// Token: 0x060000CB RID: 203 RVA: 0x000044F7 File Offset: 0x000026F7
|
||||
internal static InvalidProtocolBufferException NegativeSize()
|
||||
{
|
||||
return new InvalidProtocolBufferException("CodedInputStream encountered an embedded string or message which claimed to have negative size.");
|
||||
}
|
||||
|
||||
// Token: 0x060000CC RID: 204 RVA: 0x00004503 File Offset: 0x00002703
|
||||
internal static InvalidProtocolBufferException MalformedVarint()
|
||||
{
|
||||
return new InvalidProtocolBufferException("CodedInputStream encountered a malformed varint.");
|
||||
}
|
||||
|
||||
// Token: 0x060000CD RID: 205 RVA: 0x0000450F File Offset: 0x0000270F
|
||||
internal static InvalidProtocolBufferException InvalidTag()
|
||||
{
|
||||
return new InvalidProtocolBufferException("Protocol message contained an invalid tag (zero).");
|
||||
}
|
||||
|
||||
// Token: 0x060000CE RID: 206 RVA: 0x0000451B File Offset: 0x0000271B
|
||||
internal static InvalidProtocolBufferException InvalidBase64(Exception innerException)
|
||||
{
|
||||
return new InvalidProtocolBufferException("Invalid base64 data", innerException);
|
||||
}
|
||||
|
||||
// Token: 0x060000CF RID: 207 RVA: 0x00004528 File Offset: 0x00002728
|
||||
internal static InvalidProtocolBufferException InvalidEndTag()
|
||||
{
|
||||
return new InvalidProtocolBufferException("Protocol message end-group tag did not match expected tag.");
|
||||
}
|
||||
|
||||
// Token: 0x060000D0 RID: 208 RVA: 0x00004534 File Offset: 0x00002734
|
||||
internal static InvalidProtocolBufferException RecursionLimitExceeded()
|
||||
{
|
||||
return new InvalidProtocolBufferException("Protocol message had too many levels of nesting. May be malicious. Use CodedInputStream.SetRecursionLimit() to increase the depth limit.");
|
||||
}
|
||||
|
||||
// Token: 0x060000D1 RID: 209 RVA: 0x00004540 File Offset: 0x00002740
|
||||
internal static InvalidProtocolBufferException JsonRecursionLimitExceeded()
|
||||
{
|
||||
return new InvalidProtocolBufferException("Protocol message had too many levels of nesting. May be malicious. Use JsonParser.Settings to increase the depth limit.");
|
||||
}
|
||||
|
||||
// Token: 0x060000D2 RID: 210 RVA: 0x0000454C File Offset: 0x0000274C
|
||||
internal static InvalidProtocolBufferException SizeLimitExceeded()
|
||||
{
|
||||
return new InvalidProtocolBufferException("Protocol message was too large. May be malicious. Use CodedInputStream.SetSizeLimit() to increase the size limit.");
|
||||
}
|
||||
|
||||
// Token: 0x060000D3 RID: 211 RVA: 0x00004558 File Offset: 0x00002758
|
||||
internal static InvalidProtocolBufferException InvalidMessageStreamTag()
|
||||
{
|
||||
return new InvalidProtocolBufferException("Stream of protocol messages had invalid tag. Expected tag is length-delimited field 1.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,764 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using Google.Protobuf.Reflection;
|
||||
using Google.Protobuf.WellKnownTypes;
|
||||
|
||||
namespace Google.Protobuf
|
||||
{
|
||||
// Token: 0x0200000F RID: 15
|
||||
public sealed class JsonFormatter
|
||||
{
|
||||
// Token: 0x17000015 RID: 21
|
||||
// (get) Token: 0x060000D4 RID: 212 RVA: 0x00004564 File Offset: 0x00002764
|
||||
public static JsonFormatter Default { get; } = new JsonFormatter(JsonFormatter.Settings.Default);
|
||||
|
||||
// Token: 0x060000D5 RID: 213 RVA: 0x0000456C File Offset: 0x0000276C
|
||||
static JsonFormatter()
|
||||
{
|
||||
for (int i = 0; i < JsonFormatter.CommonRepresentations.Length; i++)
|
||||
{
|
||||
if (JsonFormatter.CommonRepresentations[i] == "")
|
||||
{
|
||||
JsonFormatter.CommonRepresentations[i] = ((char)i).ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000016 RID: 22
|
||||
// (get) Token: 0x060000D6 RID: 214 RVA: 0x00004BD3 File Offset: 0x00002DD3
|
||||
private bool DiagnosticOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this == JsonFormatter.diagnosticFormatter;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060000D7 RID: 215 RVA: 0x00004BDD File Offset: 0x00002DDD
|
||||
public JsonFormatter(JsonFormatter.Settings settings)
|
||||
{
|
||||
this.settings = settings;
|
||||
}
|
||||
|
||||
// Token: 0x060000D8 RID: 216 RVA: 0x00004BEC File Offset: 0x00002DEC
|
||||
public string Format(IMessage message)
|
||||
{
|
||||
StringWriter stringWriter = new StringWriter();
|
||||
this.Format(message, stringWriter);
|
||||
return stringWriter.ToString();
|
||||
}
|
||||
|
||||
// Token: 0x060000D9 RID: 217 RVA: 0x00004C0D File Offset: 0x00002E0D
|
||||
public void Format(IMessage message, TextWriter writer)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<IMessage>(message, "message");
|
||||
ProtoPreconditions.CheckNotNull<TextWriter>(writer, "writer");
|
||||
if (message.Descriptor.IsWellKnownType)
|
||||
{
|
||||
this.WriteWellKnownTypeValue(writer, message.Descriptor, message);
|
||||
return;
|
||||
}
|
||||
this.WriteMessage(writer, message);
|
||||
}
|
||||
|
||||
// Token: 0x060000DA RID: 218 RVA: 0x00004C4B File Offset: 0x00002E4B
|
||||
public static string ToDiagnosticString(IMessage message)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<IMessage>(message, "message");
|
||||
return JsonFormatter.diagnosticFormatter.Format(message);
|
||||
}
|
||||
|
||||
// Token: 0x060000DB RID: 219 RVA: 0x00004C64 File Offset: 0x00002E64
|
||||
private void WriteMessage(TextWriter writer, IMessage message)
|
||||
{
|
||||
if (message == null)
|
||||
{
|
||||
JsonFormatter.WriteNull(writer);
|
||||
return;
|
||||
}
|
||||
if (this.DiagnosticOnly)
|
||||
{
|
||||
ICustomDiagnosticMessage customDiagnosticMessage = message as ICustomDiagnosticMessage;
|
||||
if (customDiagnosticMessage != null)
|
||||
{
|
||||
writer.Write(customDiagnosticMessage.ToDiagnosticString());
|
||||
return;
|
||||
}
|
||||
}
|
||||
writer.Write("{ ");
|
||||
writer.Write(this.WriteMessageFields(writer, message, false) ? " }" : "}");
|
||||
}
|
||||
|
||||
// Token: 0x060000DC RID: 220 RVA: 0x00004CC4 File Offset: 0x00002EC4
|
||||
private bool WriteMessageFields(TextWriter writer, IMessage message, bool assumeFirstFieldWritten)
|
||||
{
|
||||
MessageDescriptor.FieldCollection fields = message.Descriptor.Fields;
|
||||
bool flag = !assumeFirstFieldWritten;
|
||||
foreach (FieldDescriptor fieldDescriptor in fields.InFieldNumberOrder())
|
||||
{
|
||||
IFieldAccessor accessor = fieldDescriptor.Accessor;
|
||||
if (fieldDescriptor.ContainingOneof == null || fieldDescriptor.ContainingOneof.Accessor.GetCaseFieldDescriptor(message) == fieldDescriptor)
|
||||
{
|
||||
object value = accessor.GetValue(message);
|
||||
if (fieldDescriptor.ContainingOneof != null || this.settings.FormatDefaultValues || !JsonFormatter.IsDefaultValue(accessor, value))
|
||||
{
|
||||
if (!flag)
|
||||
{
|
||||
writer.Write(", ");
|
||||
}
|
||||
JsonFormatter.WriteString(writer, accessor.Descriptor.JsonName);
|
||||
writer.Write(": ");
|
||||
this.WriteValue(writer, value);
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return !flag;
|
||||
}
|
||||
|
||||
// Token: 0x060000DD RID: 221 RVA: 0x00004DA4 File Offset: 0x00002FA4
|
||||
private static string ToCamelCaseForFieldMask(string input)
|
||||
{
|
||||
for (int i = 0; i < input.Length; i++)
|
||||
{
|
||||
char c = input[i];
|
||||
if (c >= 'A' && c <= 'Z')
|
||||
{
|
||||
throw new InvalidOperationException(string.Format("Invalid field mask to be converted to JSON: {0}", input));
|
||||
}
|
||||
if (c == '_' && i < input.Length - 1)
|
||||
{
|
||||
char c2 = input[i + 1];
|
||||
if (c2 < 'a' || c2 > 'z')
|
||||
{
|
||||
throw new InvalidOperationException(string.Format("Invalid field mask to be converted to JSON: {0}", input));
|
||||
}
|
||||
}
|
||||
}
|
||||
return JsonFormatter.ToCamelCase(input);
|
||||
}
|
||||
|
||||
// Token: 0x060000DE RID: 222 RVA: 0x00004E20 File Offset: 0x00003020
|
||||
internal static string ToCamelCase(string input)
|
||||
{
|
||||
bool flag = false;
|
||||
bool flag2 = true;
|
||||
bool flag3 = true;
|
||||
StringBuilder stringBuilder = new StringBuilder(input.Length);
|
||||
int i = 0;
|
||||
while (i < input.Length)
|
||||
{
|
||||
bool flag4 = char.IsUpper(input[i]);
|
||||
if (input[i] == '_')
|
||||
{
|
||||
flag = true;
|
||||
if (stringBuilder.Length != 0)
|
||||
{
|
||||
flag3 = false;
|
||||
}
|
||||
}
|
||||
else if (flag3)
|
||||
{
|
||||
if (stringBuilder.Length != 0 && flag4 && (!flag2 || (i + 1 < input.Length && char.IsLower(input[i + 1]))))
|
||||
{
|
||||
flag3 = false;
|
||||
stringBuilder.Append(input[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
stringBuilder.Append(char.ToLowerInvariant(input[i]));
|
||||
}
|
||||
}
|
||||
else if (flag)
|
||||
{
|
||||
flag = false;
|
||||
if (char.IsLower(input[i]))
|
||||
{
|
||||
stringBuilder.Append(char.ToUpperInvariant(input[i]));
|
||||
}
|
||||
else
|
||||
{
|
||||
stringBuilder.Append(input[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
stringBuilder.Append(char.ToLowerInvariant(input[i]));
|
||||
}
|
||||
i++;
|
||||
flag2 = flag4;
|
||||
}
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
// Token: 0x060000DF RID: 223 RVA: 0x00004F43 File Offset: 0x00003143
|
||||
private static void WriteNull(TextWriter writer)
|
||||
{
|
||||
writer.Write("null");
|
||||
}
|
||||
|
||||
// Token: 0x060000E0 RID: 224 RVA: 0x00004F50 File Offset: 0x00003150
|
||||
private static bool IsDefaultValue(IFieldAccessor accessor, object value)
|
||||
{
|
||||
if (accessor.Descriptor.IsMap)
|
||||
{
|
||||
return ((IDictionary)value).Count == 0;
|
||||
}
|
||||
if (accessor.Descriptor.IsRepeated)
|
||||
{
|
||||
return ((IList)value).Count == 0;
|
||||
}
|
||||
switch (accessor.Descriptor.FieldType)
|
||||
{
|
||||
case FieldType.Double:
|
||||
return (double)value == 0.0;
|
||||
case FieldType.Float:
|
||||
return (float)value == 0f;
|
||||
case FieldType.Int64:
|
||||
case FieldType.SFixed64:
|
||||
case FieldType.SInt64:
|
||||
return (long)value == 0L;
|
||||
case FieldType.UInt64:
|
||||
case FieldType.Fixed64:
|
||||
return (ulong)value == 0UL;
|
||||
case FieldType.Int32:
|
||||
case FieldType.SFixed32:
|
||||
case FieldType.SInt32:
|
||||
case FieldType.Enum:
|
||||
return (int)value == 0;
|
||||
case FieldType.Fixed32:
|
||||
case FieldType.UInt32:
|
||||
return (uint)value == 0U;
|
||||
case FieldType.Bool:
|
||||
return !(bool)value;
|
||||
case FieldType.String:
|
||||
return (string)value == "";
|
||||
case FieldType.Group:
|
||||
case FieldType.Message:
|
||||
return value == null;
|
||||
case FieldType.Bytes:
|
||||
return (ByteString)value == ByteString.Empty;
|
||||
default:
|
||||
throw new ArgumentException("Invalid field type");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060000E1 RID: 225 RVA: 0x00005078 File Offset: 0x00003278
|
||||
public void WriteValue(TextWriter writer, object value)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
JsonFormatter.WriteNull(writer);
|
||||
return;
|
||||
}
|
||||
if (value is bool)
|
||||
{
|
||||
writer.Write(((bool)value) ? "true" : "false");
|
||||
return;
|
||||
}
|
||||
if (value is ByteString)
|
||||
{
|
||||
writer.Write('"');
|
||||
writer.Write(((ByteString)value).ToBase64());
|
||||
writer.Write('"');
|
||||
return;
|
||||
}
|
||||
if (value is string)
|
||||
{
|
||||
JsonFormatter.WriteString(writer, (string)value);
|
||||
return;
|
||||
}
|
||||
if (value is IDictionary)
|
||||
{
|
||||
this.WriteDictionary(writer, (IDictionary)value);
|
||||
return;
|
||||
}
|
||||
if (value is IList)
|
||||
{
|
||||
this.WriteList(writer, (IList)value);
|
||||
return;
|
||||
}
|
||||
if (value is int || value is uint)
|
||||
{
|
||||
IFormattable formattable = (IFormattable)value;
|
||||
writer.Write(formattable.ToString("d", CultureInfo.InvariantCulture));
|
||||
return;
|
||||
}
|
||||
if (value is long || value is ulong)
|
||||
{
|
||||
writer.Write('"');
|
||||
IFormattable formattable2 = (IFormattable)value;
|
||||
writer.Write(formattable2.ToString("d", CultureInfo.InvariantCulture));
|
||||
writer.Write('"');
|
||||
return;
|
||||
}
|
||||
if (value is global::System.Enum)
|
||||
{
|
||||
string originalName = JsonFormatter.OriginalEnumValueHelper.GetOriginalName(value);
|
||||
if (originalName != null)
|
||||
{
|
||||
JsonFormatter.WriteString(writer, originalName);
|
||||
return;
|
||||
}
|
||||
this.WriteValue(writer, (int)value);
|
||||
return;
|
||||
}
|
||||
else if (value is float || value is double)
|
||||
{
|
||||
string text = ((IFormattable)value).ToString("r", CultureInfo.InvariantCulture);
|
||||
if (text == "NaN" || text == "Infinity" || text == "-Infinity")
|
||||
{
|
||||
writer.Write('"');
|
||||
writer.Write(text);
|
||||
writer.Write('"');
|
||||
return;
|
||||
}
|
||||
writer.Write(text);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (value is IMessage)
|
||||
{
|
||||
this.Format((IMessage)value, writer);
|
||||
return;
|
||||
}
|
||||
throw new ArgumentException("Unable to format value of type " + value.GetType());
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060000E2 RID: 226 RVA: 0x00005250 File Offset: 0x00003450
|
||||
private void WriteWellKnownTypeValue(TextWriter writer, MessageDescriptor descriptor, object value)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
JsonFormatter.WriteNull(writer);
|
||||
return;
|
||||
}
|
||||
if (descriptor.IsWrapperType)
|
||||
{
|
||||
if (value is IMessage)
|
||||
{
|
||||
IMessage message = (IMessage)value;
|
||||
value = message.Descriptor.Fields[1].Accessor.GetValue(message);
|
||||
}
|
||||
this.WriteValue(writer, value);
|
||||
return;
|
||||
}
|
||||
if (descriptor.FullName == Timestamp.Descriptor.FullName)
|
||||
{
|
||||
this.WriteTimestamp(writer, (IMessage)value);
|
||||
return;
|
||||
}
|
||||
if (descriptor.FullName == Duration.Descriptor.FullName)
|
||||
{
|
||||
this.WriteDuration(writer, (IMessage)value);
|
||||
return;
|
||||
}
|
||||
if (descriptor.FullName == FieldMask.Descriptor.FullName)
|
||||
{
|
||||
this.WriteFieldMask(writer, (IMessage)value);
|
||||
return;
|
||||
}
|
||||
if (descriptor.FullName == Struct.Descriptor.FullName)
|
||||
{
|
||||
this.WriteStruct(writer, (IMessage)value);
|
||||
return;
|
||||
}
|
||||
if (descriptor.FullName == ListValue.Descriptor.FullName)
|
||||
{
|
||||
IFieldAccessor accessor = descriptor.Fields[1].Accessor;
|
||||
this.WriteList(writer, (IList)accessor.GetValue((IMessage)value));
|
||||
return;
|
||||
}
|
||||
if (descriptor.FullName == Value.Descriptor.FullName)
|
||||
{
|
||||
this.WriteStructFieldValue(writer, (IMessage)value);
|
||||
return;
|
||||
}
|
||||
if (descriptor.FullName == Any.Descriptor.FullName)
|
||||
{
|
||||
this.WriteAny(writer, (IMessage)value);
|
||||
return;
|
||||
}
|
||||
this.WriteMessage(writer, (IMessage)value);
|
||||
}
|
||||
|
||||
// Token: 0x060000E3 RID: 227 RVA: 0x000053D4 File Offset: 0x000035D4
|
||||
private void WriteTimestamp(TextWriter writer, IMessage value)
|
||||
{
|
||||
int num = (int)value.Descriptor.Fields[2].Accessor.GetValue(value);
|
||||
long num2 = (long)value.Descriptor.Fields[1].Accessor.GetValue(value);
|
||||
writer.Write(Timestamp.ToJson(num2, num, this.DiagnosticOnly));
|
||||
}
|
||||
|
||||
// Token: 0x060000E4 RID: 228 RVA: 0x00005438 File Offset: 0x00003638
|
||||
private void WriteDuration(TextWriter writer, IMessage value)
|
||||
{
|
||||
int num = (int)value.Descriptor.Fields[2].Accessor.GetValue(value);
|
||||
long num2 = (long)value.Descriptor.Fields[1].Accessor.GetValue(value);
|
||||
writer.Write(Duration.ToJson(num2, num, this.DiagnosticOnly));
|
||||
}
|
||||
|
||||
// Token: 0x060000E5 RID: 229 RVA: 0x0000549C File Offset: 0x0000369C
|
||||
private void WriteFieldMask(TextWriter writer, IMessage value)
|
||||
{
|
||||
IList<string> list = (IList<string>)value.Descriptor.Fields[1].Accessor.GetValue(value);
|
||||
writer.Write(FieldMask.ToJson(list, this.DiagnosticOnly));
|
||||
}
|
||||
|
||||
// Token: 0x060000E6 RID: 230 RVA: 0x000054E0 File Offset: 0x000036E0
|
||||
private void WriteAny(TextWriter writer, IMessage value)
|
||||
{
|
||||
if (this.DiagnosticOnly)
|
||||
{
|
||||
this.WriteDiagnosticOnlyAny(writer, value);
|
||||
return;
|
||||
}
|
||||
string text = (string)value.Descriptor.Fields[1].Accessor.GetValue(value);
|
||||
ByteString byteString = (ByteString)value.Descriptor.Fields[2].Accessor.GetValue(value);
|
||||
string typeName = Any.GetTypeName(text);
|
||||
MessageDescriptor messageDescriptor = this.settings.TypeRegistry.Find(typeName);
|
||||
if (messageDescriptor == null)
|
||||
{
|
||||
throw new InvalidOperationException(string.Format("Type registry has no descriptor for type name '{0}'", typeName));
|
||||
}
|
||||
IMessage message = messageDescriptor.Parser.ParseFrom(byteString);
|
||||
writer.Write("{ ");
|
||||
JsonFormatter.WriteString(writer, "@type");
|
||||
writer.Write(": ");
|
||||
JsonFormatter.WriteString(writer, text);
|
||||
if (messageDescriptor.IsWellKnownType)
|
||||
{
|
||||
writer.Write(", ");
|
||||
JsonFormatter.WriteString(writer, "value");
|
||||
writer.Write(": ");
|
||||
this.WriteWellKnownTypeValue(writer, messageDescriptor, message);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.WriteMessageFields(writer, message, true);
|
||||
}
|
||||
writer.Write(" }");
|
||||
}
|
||||
|
||||
// Token: 0x060000E7 RID: 231 RVA: 0x000055F0 File Offset: 0x000037F0
|
||||
private void WriteDiagnosticOnlyAny(TextWriter writer, IMessage value)
|
||||
{
|
||||
string text = (string)value.Descriptor.Fields[1].Accessor.GetValue(value);
|
||||
ByteString byteString = (ByteString)value.Descriptor.Fields[2].Accessor.GetValue(value);
|
||||
writer.Write("{ ");
|
||||
JsonFormatter.WriteString(writer, "@type");
|
||||
writer.Write(": ");
|
||||
JsonFormatter.WriteString(writer, text);
|
||||
writer.Write(", ");
|
||||
JsonFormatter.WriteString(writer, "@value");
|
||||
writer.Write(": ");
|
||||
writer.Write('"');
|
||||
writer.Write(byteString.ToBase64());
|
||||
writer.Write('"');
|
||||
writer.Write(" }");
|
||||
}
|
||||
|
||||
// Token: 0x060000E8 RID: 232 RVA: 0x000056B4 File Offset: 0x000038B4
|
||||
private void WriteStruct(TextWriter writer, IMessage message)
|
||||
{
|
||||
writer.Write("{ ");
|
||||
IDictionary dictionary = (IDictionary)message.Descriptor.Fields[1].Accessor.GetValue(message);
|
||||
bool flag = true;
|
||||
foreach (object obj in dictionary)
|
||||
{
|
||||
DictionaryEntry dictionaryEntry = (DictionaryEntry)obj;
|
||||
string text = (string)dictionaryEntry.Key;
|
||||
IMessage message2 = (IMessage)dictionaryEntry.Value;
|
||||
if (string.IsNullOrEmpty(text) || message2 == null)
|
||||
{
|
||||
throw new InvalidOperationException("Struct fields cannot have an empty key or a null value.");
|
||||
}
|
||||
if (!flag)
|
||||
{
|
||||
writer.Write(", ");
|
||||
}
|
||||
JsonFormatter.WriteString(writer, text);
|
||||
writer.Write(": ");
|
||||
this.WriteStructFieldValue(writer, message2);
|
||||
flag = false;
|
||||
}
|
||||
writer.Write(flag ? "}" : " }");
|
||||
}
|
||||
|
||||
// Token: 0x060000E9 RID: 233 RVA: 0x000057A4 File Offset: 0x000039A4
|
||||
private void WriteStructFieldValue(TextWriter writer, IMessage message)
|
||||
{
|
||||
FieldDescriptor caseFieldDescriptor = message.Descriptor.Oneofs[0].Accessor.GetCaseFieldDescriptor(message);
|
||||
if (caseFieldDescriptor == null)
|
||||
{
|
||||
throw new InvalidOperationException("Value message must contain a value for the oneof.");
|
||||
}
|
||||
object value = caseFieldDescriptor.Accessor.GetValue(message);
|
||||
switch (caseFieldDescriptor.FieldNumber)
|
||||
{
|
||||
case 1:
|
||||
JsonFormatter.WriteNull(writer);
|
||||
return;
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
this.WriteValue(writer, value);
|
||||
return;
|
||||
case 5:
|
||||
case 6:
|
||||
{
|
||||
IMessage message2 = (IMessage)caseFieldDescriptor.Accessor.GetValue(message);
|
||||
this.WriteWellKnownTypeValue(writer, message2.Descriptor, message2);
|
||||
return;
|
||||
}
|
||||
default:
|
||||
throw new InvalidOperationException("Unexpected case in struct field: " + caseFieldDescriptor.FieldNumber);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060000EA RID: 234 RVA: 0x00005860 File Offset: 0x00003A60
|
||||
internal void WriteList(TextWriter writer, IList list)
|
||||
{
|
||||
writer.Write("[ ");
|
||||
bool flag = true;
|
||||
foreach (object obj in list)
|
||||
{
|
||||
if (!flag)
|
||||
{
|
||||
writer.Write(", ");
|
||||
}
|
||||
this.WriteValue(writer, obj);
|
||||
flag = false;
|
||||
}
|
||||
writer.Write(flag ? "]" : " ]");
|
||||
}
|
||||
|
||||
// Token: 0x060000EB RID: 235 RVA: 0x000058E4 File Offset: 0x00003AE4
|
||||
internal void WriteDictionary(TextWriter writer, IDictionary dictionary)
|
||||
{
|
||||
writer.Write("{ ");
|
||||
bool flag = true;
|
||||
foreach (object obj in dictionary)
|
||||
{
|
||||
DictionaryEntry dictionaryEntry = (DictionaryEntry)obj;
|
||||
if (!flag)
|
||||
{
|
||||
writer.Write(", ");
|
||||
}
|
||||
string text;
|
||||
if (dictionaryEntry.Key is string)
|
||||
{
|
||||
text = (string)dictionaryEntry.Key;
|
||||
}
|
||||
else if (dictionaryEntry.Key is bool)
|
||||
{
|
||||
text = (((bool)dictionaryEntry.Key) ? "true" : "false");
|
||||
}
|
||||
else if (dictionaryEntry.Key is int || ((dictionaryEntry.Key is uint) | (dictionaryEntry.Key is long)) || dictionaryEntry.Key is ulong)
|
||||
{
|
||||
text = ((IFormattable)dictionaryEntry.Key).ToString("d", CultureInfo.InvariantCulture);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dictionaryEntry.Key == null)
|
||||
{
|
||||
throw new ArgumentException("Dictionary has entry with null key");
|
||||
}
|
||||
throw new ArgumentException("Unhandled dictionary key type: " + dictionaryEntry.Key.GetType());
|
||||
}
|
||||
JsonFormatter.WriteString(writer, text);
|
||||
writer.Write(": ");
|
||||
this.WriteValue(writer, dictionaryEntry.Value);
|
||||
flag = false;
|
||||
}
|
||||
writer.Write(flag ? "}" : " }");
|
||||
}
|
||||
|
||||
// Token: 0x060000EC RID: 236 RVA: 0x00005A74 File Offset: 0x00003C74
|
||||
internal static void WriteString(TextWriter writer, string text)
|
||||
{
|
||||
writer.Write('"');
|
||||
for (int i = 0; i < text.Length; i++)
|
||||
{
|
||||
char c = text[i];
|
||||
if (c < '\u00a0')
|
||||
{
|
||||
writer.Write(JsonFormatter.CommonRepresentations[(int)c]);
|
||||
}
|
||||
else if (char.IsHighSurrogate(c))
|
||||
{
|
||||
i++;
|
||||
if (i == text.Length || !char.IsLowSurrogate(text[i]))
|
||||
{
|
||||
throw new ArgumentException("String contains low surrogate not followed by high surrogate");
|
||||
}
|
||||
JsonFormatter.HexEncodeUtf16CodeUnit(writer, c);
|
||||
JsonFormatter.HexEncodeUtf16CodeUnit(writer, text[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (char.IsLowSurrogate(c))
|
||||
{
|
||||
throw new ArgumentException("String contains high surrogate not preceded by low surrogate");
|
||||
}
|
||||
uint num = (uint)c;
|
||||
if (num <= 1807U)
|
||||
{
|
||||
if (num != 173U && num != 1757U && num != 1807U)
|
||||
{
|
||||
goto IL_D4;
|
||||
}
|
||||
}
|
||||
else if (num - 6068U > 1U && num != 65279U && num - 65529U > 2U)
|
||||
{
|
||||
goto IL_D4;
|
||||
}
|
||||
JsonFormatter.HexEncodeUtf16CodeUnit(writer, c);
|
||||
goto IL_134;
|
||||
IL_D4:
|
||||
if ((c >= '\u0600' && c <= '\u0603') || (c >= '\u200b' && c <= '\u200f') || (c >= '\u2028' && c <= '\u202e') || (c >= '\u2060' && c <= '\u2064') || (c >= '\u206a' && c <= '\u206f'))
|
||||
{
|
||||
JsonFormatter.HexEncodeUtf16CodeUnit(writer, c);
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.Write(c);
|
||||
}
|
||||
}
|
||||
IL_134:;
|
||||
}
|
||||
writer.Write('"');
|
||||
}
|
||||
|
||||
// Token: 0x060000ED RID: 237 RVA: 0x00005BD0 File Offset: 0x00003DD0
|
||||
private static void HexEncodeUtf16CodeUnit(TextWriter writer, char c)
|
||||
{
|
||||
writer.Write("\\u");
|
||||
writer.Write("0123456789abcdef"[(int)((c >> 12) & '\u000f')]);
|
||||
writer.Write("0123456789abcdef"[(int)((c >> 8) & '\u000f')]);
|
||||
writer.Write("0123456789abcdef"[(int)((c >> 4) & '\u000f')]);
|
||||
writer.Write("0123456789abcdef"[(int)(c & '\u000f')]);
|
||||
}
|
||||
|
||||
// Token: 0x04000029 RID: 41
|
||||
internal const string AnyTypeUrlField = "@type";
|
||||
|
||||
// Token: 0x0400002A RID: 42
|
||||
internal const string AnyDiagnosticValueField = "@value";
|
||||
|
||||
// Token: 0x0400002B RID: 43
|
||||
internal const string AnyWellKnownTypeValueField = "value";
|
||||
|
||||
// Token: 0x0400002C RID: 44
|
||||
private const string TypeUrlPrefix = "type.googleapis.com";
|
||||
|
||||
// Token: 0x0400002D RID: 45
|
||||
private const string NameValueSeparator = ": ";
|
||||
|
||||
// Token: 0x0400002E RID: 46
|
||||
private const string PropertySeparator = ", ";
|
||||
|
||||
// Token: 0x04000030 RID: 48
|
||||
private static readonly JsonFormatter diagnosticFormatter = new JsonFormatter(JsonFormatter.Settings.Default);
|
||||
|
||||
// Token: 0x04000031 RID: 49
|
||||
private static readonly string[] CommonRepresentations = new string[]
|
||||
{
|
||||
"\\u0000", "\\u0001", "\\u0002", "\\u0003", "\\u0004", "\\u0005", "\\u0006", "\\u0007", "\\b", "\\t",
|
||||
"\\n", "\\u000b", "\\f", "\\r", "\\u000e", "\\u000f", "\\u0010", "\\u0011", "\\u0012", "\\u0013",
|
||||
"\\u0014", "\\u0015", "\\u0016", "\\u0017", "\\u0018", "\\u0019", "\\u001a", "\\u001b", "\\u001c", "\\u001d",
|
||||
"\\u001e", "\\u001f", "", "", "\\\"", "", "", "", "", "",
|
||||
"", "", "", "", "", "", "", "", "", "",
|
||||
"", "", "", "", "", "", "", "", "", "",
|
||||
"\\u003c", "", "\\u003e", "", "", "", "", "", "", "",
|
||||
"", "", "", "", "", "", "", "", "", "",
|
||||
"", "", "", "", "", "", "", "", "", "",
|
||||
"", "", "\\\\", "", "", "", "", "", "", "",
|
||||
"", "", "", "", "", "", "", "", "", "",
|
||||
"", "", "", "", "", "", "", "", "", "",
|
||||
"", "", "", "", "", "", "", "\\u007f", "\\u0080", "\\u0081",
|
||||
"\\u0082", "\\u0083", "\\u0084", "\\u0085", "\\u0086", "\\u0087", "\\u0088", "\\u0089", "\\u008a", "\\u008b",
|
||||
"\\u008c", "\\u008d", "\\u008e", "\\u008f", "\\u0090", "\\u0091", "\\u0092", "\\u0093", "\\u0094", "\\u0095",
|
||||
"\\u0096", "\\u0097", "\\u0098", "\\u0099", "\\u009a", "\\u009b", "\\u009c", "\\u009d", "\\u009e", "\\u009f"
|
||||
};
|
||||
|
||||
// Token: 0x04000032 RID: 50
|
||||
private readonly JsonFormatter.Settings settings;
|
||||
|
||||
// Token: 0x04000033 RID: 51
|
||||
private const string Hex = "0123456789abcdef";
|
||||
|
||||
// Token: 0x0200007D RID: 125
|
||||
public sealed class Settings
|
||||
{
|
||||
// Token: 0x170001CC RID: 460
|
||||
// (get) Token: 0x060006AB RID: 1707 RVA: 0x0001666F File Offset: 0x0001486F
|
||||
public static JsonFormatter.Settings Default { get; } = new JsonFormatter.Settings(false);
|
||||
|
||||
// Token: 0x170001CD RID: 461
|
||||
// (get) Token: 0x060006AD RID: 1709 RVA: 0x00016683 File Offset: 0x00014883
|
||||
public bool FormatDefaultValues { get; }
|
||||
|
||||
// Token: 0x170001CE RID: 462
|
||||
// (get) Token: 0x060006AE RID: 1710 RVA: 0x0001668B File Offset: 0x0001488B
|
||||
public TypeRegistry TypeRegistry { get; }
|
||||
|
||||
// Token: 0x060006AF RID: 1711 RVA: 0x00016693 File Offset: 0x00014893
|
||||
public Settings(bool formatDefaultValues)
|
||||
: this(formatDefaultValues, TypeRegistry.Empty)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060006B0 RID: 1712 RVA: 0x000166A1 File Offset: 0x000148A1
|
||||
public Settings(bool formatDefaultValues, TypeRegistry typeRegistry)
|
||||
{
|
||||
this.FormatDefaultValues = formatDefaultValues;
|
||||
this.TypeRegistry = ProtoPreconditions.CheckNotNull<TypeRegistry>(typeRegistry, "typeRegistry");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0200007E RID: 126
|
||||
private static class OriginalEnumValueHelper
|
||||
{
|
||||
// Token: 0x060006B1 RID: 1713 RVA: 0x000166C4 File Offset: 0x000148C4
|
||||
internal static string GetOriginalName(object value)
|
||||
{
|
||||
global::System.Type type = value.GetType();
|
||||
Dictionary<global::System.Type, Dictionary<object, string>> dictionary = JsonFormatter.OriginalEnumValueHelper.dictionaries;
|
||||
Dictionary<object, string> nameMapping;
|
||||
lock (dictionary)
|
||||
{
|
||||
if (!JsonFormatter.OriginalEnumValueHelper.dictionaries.TryGetValue(type, out nameMapping))
|
||||
{
|
||||
nameMapping = JsonFormatter.OriginalEnumValueHelper.GetNameMapping(type);
|
||||
JsonFormatter.OriginalEnumValueHelper.dictionaries[type] = nameMapping;
|
||||
}
|
||||
}
|
||||
string text;
|
||||
nameMapping.TryGetValue(value, out text);
|
||||
return text;
|
||||
}
|
||||
|
||||
// Token: 0x060006B2 RID: 1714 RVA: 0x0001672C File Offset: 0x0001492C
|
||||
private static Dictionary<object, string> GetNameMapping(global::System.Type enumType)
|
||||
{
|
||||
return enumType.GetFields(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic).ToDictionary((FieldInfo f) => f.GetValue(null), delegate(FieldInfo f)
|
||||
{
|
||||
OriginalNameAttribute originalNameAttribute = f.GetCustomAttributes(typeof(OriginalNameAttribute), false).FirstOrDefault<object>() as OriginalNameAttribute;
|
||||
return ((originalNameAttribute != null) ? originalNameAttribute.Name : null) ?? f.Name;
|
||||
});
|
||||
}
|
||||
|
||||
// Token: 0x0400029A RID: 666
|
||||
private static readonly Dictionary<global::System.Type, Dictionary<object, string>> dictionaries = new Dictionary<global::System.Type, Dictionary<object, string>>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,925 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Google.Protobuf.Reflection;
|
||||
using Google.Protobuf.WellKnownTypes;
|
||||
|
||||
namespace Google.Protobuf
|
||||
{
|
||||
// Token: 0x02000010 RID: 16
|
||||
public sealed class JsonParser
|
||||
{
|
||||
// Token: 0x060000EE RID: 238 RVA: 0x00005C3F File Offset: 0x00003E3F
|
||||
private static void MergeWrapperField(JsonParser parser, IMessage message, JsonTokenizer tokenizer)
|
||||
{
|
||||
parser.MergeField(message, message.Descriptor.Fields[1], tokenizer);
|
||||
}
|
||||
|
||||
// Token: 0x17000017 RID: 23
|
||||
// (get) Token: 0x060000EF RID: 239 RVA: 0x00005C5A File Offset: 0x00003E5A
|
||||
public static JsonParser Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return JsonParser.defaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060000F0 RID: 240 RVA: 0x00005C61 File Offset: 0x00003E61
|
||||
public JsonParser(JsonParser.Settings settings)
|
||||
{
|
||||
this.settings = settings;
|
||||
}
|
||||
|
||||
// Token: 0x060000F1 RID: 241 RVA: 0x00005C70 File Offset: 0x00003E70
|
||||
internal void Merge(IMessage message, string json)
|
||||
{
|
||||
this.Merge(message, new StringReader(json));
|
||||
}
|
||||
|
||||
// Token: 0x060000F2 RID: 242 RVA: 0x00005C80 File Offset: 0x00003E80
|
||||
internal void Merge(IMessage message, TextReader jsonReader)
|
||||
{
|
||||
JsonTokenizer jsonTokenizer = JsonTokenizer.FromTextReader(jsonReader);
|
||||
this.Merge(message, jsonTokenizer);
|
||||
if (jsonTokenizer.Next() != JsonToken.EndDocument)
|
||||
{
|
||||
throw new InvalidProtocolBufferException("Expected end of JSON after object");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060000F3 RID: 243 RVA: 0x00005CB4 File Offset: 0x00003EB4
|
||||
private void Merge(IMessage message, JsonTokenizer tokenizer)
|
||||
{
|
||||
if (tokenizer.ObjectDepth > this.settings.RecursionLimit)
|
||||
{
|
||||
throw InvalidProtocolBufferException.JsonRecursionLimitExceeded();
|
||||
}
|
||||
Action<JsonParser, IMessage, JsonTokenizer> action;
|
||||
if (message.Descriptor.IsWellKnownType && JsonParser.WellKnownTypeHandlers.TryGetValue(message.Descriptor.FullName, out action))
|
||||
{
|
||||
action(this, message, tokenizer);
|
||||
return;
|
||||
}
|
||||
JsonToken jsonToken = tokenizer.Next();
|
||||
if (jsonToken.Type != JsonToken.TokenType.StartObject)
|
||||
{
|
||||
throw new InvalidProtocolBufferException("Expected an object");
|
||||
}
|
||||
IDictionary<string, FieldDescriptor> dictionary = message.Descriptor.Fields.ByJsonName();
|
||||
HashSet<OneofDescriptor> hashSet = null;
|
||||
string stringValue;
|
||||
FieldDescriptor fieldDescriptor;
|
||||
for (;;)
|
||||
{
|
||||
jsonToken = tokenizer.Next();
|
||||
if (jsonToken.Type == JsonToken.TokenType.EndObject)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (jsonToken.Type != JsonToken.TokenType.Name)
|
||||
{
|
||||
goto Block_6;
|
||||
}
|
||||
stringValue = jsonToken.StringValue;
|
||||
if (!dictionary.TryGetValue(stringValue, out fieldDescriptor))
|
||||
{
|
||||
goto IL_10C;
|
||||
}
|
||||
if (fieldDescriptor.ContainingOneof != null)
|
||||
{
|
||||
if (hashSet == null)
|
||||
{
|
||||
hashSet = new HashSet<OneofDescriptor>();
|
||||
}
|
||||
if (!hashSet.Add(fieldDescriptor.ContainingOneof))
|
||||
{
|
||||
goto Block_10;
|
||||
}
|
||||
}
|
||||
this.MergeField(message, fieldDescriptor, tokenizer);
|
||||
}
|
||||
return;
|
||||
Block_6:
|
||||
throw new InvalidOperationException("Unexpected token type " + jsonToken.Type);
|
||||
Block_10:
|
||||
throw new InvalidProtocolBufferException(string.Format("Multiple values specified for oneof {0}", fieldDescriptor.ContainingOneof.Name));
|
||||
IL_10C:
|
||||
throw new InvalidProtocolBufferException("Unknown field: " + stringValue);
|
||||
}
|
||||
|
||||
// Token: 0x060000F4 RID: 244 RVA: 0x00005DE0 File Offset: 0x00003FE0
|
||||
private void MergeField(IMessage message, FieldDescriptor field, JsonTokenizer tokenizer)
|
||||
{
|
||||
JsonToken jsonToken = tokenizer.Next();
|
||||
if (jsonToken.Type == JsonToken.TokenType.Null && (field.IsMap || field.IsRepeated || !JsonParser.IsGoogleProtobufValueField(field)))
|
||||
{
|
||||
field.Accessor.Clear(message);
|
||||
return;
|
||||
}
|
||||
tokenizer.PushBack(jsonToken);
|
||||
if (field.IsMap)
|
||||
{
|
||||
this.MergeMapField(message, field, tokenizer);
|
||||
return;
|
||||
}
|
||||
if (field.IsRepeated)
|
||||
{
|
||||
this.MergeRepeatedField(message, field, tokenizer);
|
||||
return;
|
||||
}
|
||||
object obj = this.ParseSingleValue(field, tokenizer);
|
||||
field.Accessor.SetValue(message, obj);
|
||||
}
|
||||
|
||||
// Token: 0x060000F5 RID: 245 RVA: 0x00005E64 File Offset: 0x00004064
|
||||
private void MergeRepeatedField(IMessage message, FieldDescriptor field, JsonTokenizer tokenizer)
|
||||
{
|
||||
JsonToken jsonToken = tokenizer.Next();
|
||||
if (jsonToken.Type != JsonToken.TokenType.StartArray)
|
||||
{
|
||||
throw new InvalidProtocolBufferException("Repeated field value was not an array. Token type: " + jsonToken.Type);
|
||||
}
|
||||
IList list = (IList)field.Accessor.GetValue(message);
|
||||
for (;;)
|
||||
{
|
||||
jsonToken = tokenizer.Next();
|
||||
if (jsonToken.Type == JsonToken.TokenType.EndArray)
|
||||
{
|
||||
break;
|
||||
}
|
||||
tokenizer.PushBack(jsonToken);
|
||||
if (jsonToken.Type == JsonToken.TokenType.Null)
|
||||
{
|
||||
goto Block_3;
|
||||
}
|
||||
list.Add(this.ParseSingleValue(field, tokenizer));
|
||||
}
|
||||
return;
|
||||
Block_3:
|
||||
throw new InvalidProtocolBufferException("Repeated field elements cannot be null");
|
||||
}
|
||||
|
||||
// Token: 0x060000F6 RID: 246 RVA: 0x00005EEC File Offset: 0x000040EC
|
||||
private void MergeMapField(IMessage message, FieldDescriptor field, JsonTokenizer tokenizer)
|
||||
{
|
||||
JsonToken jsonToken = tokenizer.Next();
|
||||
if (jsonToken.Type != JsonToken.TokenType.StartObject)
|
||||
{
|
||||
throw new InvalidProtocolBufferException("Expected an object to populate a map");
|
||||
}
|
||||
MessageDescriptor messageType = field.MessageType;
|
||||
FieldDescriptor fieldDescriptor = messageType.FindFieldByNumber(1);
|
||||
FieldDescriptor fieldDescriptor2 = messageType.FindFieldByNumber(2);
|
||||
if (fieldDescriptor == null || fieldDescriptor2 == null)
|
||||
{
|
||||
throw new InvalidProtocolBufferException("Invalid map field: " + field.FullName);
|
||||
}
|
||||
IDictionary dictionary = (IDictionary)field.Accessor.GetValue(message);
|
||||
for (;;)
|
||||
{
|
||||
jsonToken = tokenizer.Next();
|
||||
if (jsonToken.Type == JsonToken.TokenType.EndObject)
|
||||
{
|
||||
break;
|
||||
}
|
||||
object obj = JsonParser.ParseMapKey(fieldDescriptor, jsonToken.StringValue);
|
||||
object obj2 = this.ParseSingleValue(fieldDescriptor2, tokenizer);
|
||||
if (obj2 == null)
|
||||
{
|
||||
goto Block_4;
|
||||
}
|
||||
dictionary[obj] = obj2;
|
||||
}
|
||||
return;
|
||||
Block_4:
|
||||
throw new InvalidProtocolBufferException("Map values must not be null");
|
||||
}
|
||||
|
||||
// Token: 0x060000F7 RID: 247 RVA: 0x00005F9A File Offset: 0x0000419A
|
||||
private static bool IsGoogleProtobufValueField(FieldDescriptor field)
|
||||
{
|
||||
return field.FieldType == FieldType.Message && field.MessageType.FullName == Value.Descriptor.FullName;
|
||||
}
|
||||
|
||||
// Token: 0x060000F8 RID: 248 RVA: 0x00005FC4 File Offset: 0x000041C4
|
||||
private object ParseSingleValue(FieldDescriptor field, JsonTokenizer tokenizer)
|
||||
{
|
||||
JsonToken jsonToken = tokenizer.Next();
|
||||
if (jsonToken.Type != JsonToken.TokenType.Null)
|
||||
{
|
||||
FieldType fieldType = field.FieldType;
|
||||
if (fieldType == FieldType.Message)
|
||||
{
|
||||
if (!field.MessageType.IsWrapperType)
|
||||
{
|
||||
tokenizer.PushBack(jsonToken);
|
||||
IMessage message = JsonParser.NewMessageForField(field);
|
||||
this.Merge(message, tokenizer);
|
||||
return message;
|
||||
}
|
||||
field = field.MessageType.Fields[1];
|
||||
fieldType = field.FieldType;
|
||||
}
|
||||
switch (jsonToken.Type)
|
||||
{
|
||||
case JsonToken.TokenType.Null:
|
||||
throw new NotImplementedException("Haven't worked out what to do for null yet");
|
||||
case JsonToken.TokenType.False:
|
||||
case JsonToken.TokenType.True:
|
||||
if (fieldType == FieldType.Bool)
|
||||
{
|
||||
return jsonToken.Type == JsonToken.TokenType.True;
|
||||
}
|
||||
break;
|
||||
case JsonToken.TokenType.StringValue:
|
||||
return JsonParser.ParseSingleStringValue(field, jsonToken.StringValue);
|
||||
case JsonToken.TokenType.Number:
|
||||
return JsonParser.ParseSingleNumberValue(field, jsonToken);
|
||||
}
|
||||
throw new InvalidProtocolBufferException(string.Concat(new object[] { "Unsupported JSON token type ", jsonToken.Type, " for field type ", fieldType }));
|
||||
}
|
||||
if (JsonParser.IsGoogleProtobufValueField(field))
|
||||
{
|
||||
return Value.ForNull();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// Token: 0x060000F9 RID: 249 RVA: 0x000060CA File Offset: 0x000042CA
|
||||
public T Parse<T>(string json) where T : IMessage, new()
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<string>(json, "json");
|
||||
return this.Parse<T>(new StringReader(json));
|
||||
}
|
||||
|
||||
// Token: 0x060000FA RID: 250 RVA: 0x000060E4 File Offset: 0x000042E4
|
||||
public T Parse<T>(TextReader jsonReader) where T : IMessage, new()
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<TextReader>(jsonReader, "jsonReader");
|
||||
T t = new T();
|
||||
this.Merge(t, jsonReader);
|
||||
return t;
|
||||
}
|
||||
|
||||
// Token: 0x060000FB RID: 251 RVA: 0x00006111 File Offset: 0x00004311
|
||||
public IMessage Parse(string json, MessageDescriptor descriptor)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<string>(json, "json");
|
||||
ProtoPreconditions.CheckNotNull<MessageDescriptor>(descriptor, "descriptor");
|
||||
return this.Parse(new StringReader(json), descriptor);
|
||||
}
|
||||
|
||||
// Token: 0x060000FC RID: 252 RVA: 0x00006138 File Offset: 0x00004338
|
||||
public IMessage Parse(TextReader jsonReader, MessageDescriptor descriptor)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<TextReader>(jsonReader, "jsonReader");
|
||||
ProtoPreconditions.CheckNotNull<MessageDescriptor>(descriptor, "descriptor");
|
||||
IMessage message = descriptor.Parser.CreateTemplate();
|
||||
this.Merge(message, jsonReader);
|
||||
return message;
|
||||
}
|
||||
|
||||
// Token: 0x060000FD RID: 253 RVA: 0x00006174 File Offset: 0x00004374
|
||||
private void MergeStructValue(IMessage message, JsonTokenizer tokenizer)
|
||||
{
|
||||
JsonToken jsonToken = tokenizer.Next();
|
||||
MessageDescriptor.FieldCollection fields = message.Descriptor.Fields;
|
||||
switch (jsonToken.Type)
|
||||
{
|
||||
case JsonToken.TokenType.Null:
|
||||
fields[1].Accessor.SetValue(message, 0);
|
||||
return;
|
||||
case JsonToken.TokenType.False:
|
||||
case JsonToken.TokenType.True:
|
||||
fields[4].Accessor.SetValue(message, jsonToken.Type == JsonToken.TokenType.True);
|
||||
return;
|
||||
case JsonToken.TokenType.StringValue:
|
||||
fields[3].Accessor.SetValue(message, jsonToken.StringValue);
|
||||
return;
|
||||
case JsonToken.TokenType.Number:
|
||||
fields[2].Accessor.SetValue(message, jsonToken.NumberValue);
|
||||
return;
|
||||
case JsonToken.TokenType.StartObject:
|
||||
{
|
||||
FieldDescriptor fieldDescriptor = fields[5];
|
||||
IMessage message2 = JsonParser.NewMessageForField(fieldDescriptor);
|
||||
tokenizer.PushBack(jsonToken);
|
||||
this.Merge(message2, tokenizer);
|
||||
fieldDescriptor.Accessor.SetValue(message, message2);
|
||||
return;
|
||||
}
|
||||
case JsonToken.TokenType.StartArray:
|
||||
{
|
||||
FieldDescriptor fieldDescriptor2 = fields[6];
|
||||
IMessage message3 = JsonParser.NewMessageForField(fieldDescriptor2);
|
||||
tokenizer.PushBack(jsonToken);
|
||||
this.Merge(message3, tokenizer);
|
||||
fieldDescriptor2.Accessor.SetValue(message, message3);
|
||||
return;
|
||||
}
|
||||
}
|
||||
throw new InvalidOperationException("Unexpected token type: " + jsonToken.Type);
|
||||
}
|
||||
|
||||
// Token: 0x060000FE RID: 254 RVA: 0x000062AC File Offset: 0x000044AC
|
||||
private void MergeStruct(IMessage message, JsonTokenizer tokenizer)
|
||||
{
|
||||
JsonToken jsonToken = tokenizer.Next();
|
||||
if (jsonToken.Type != JsonToken.TokenType.StartObject)
|
||||
{
|
||||
throw new InvalidProtocolBufferException("Expected object value for Struct");
|
||||
}
|
||||
tokenizer.PushBack(jsonToken);
|
||||
FieldDescriptor fieldDescriptor = message.Descriptor.Fields[1];
|
||||
this.MergeMapField(message, fieldDescriptor, tokenizer);
|
||||
}
|
||||
|
||||
// Token: 0x060000FF RID: 255 RVA: 0x000062F8 File Offset: 0x000044F8
|
||||
private void MergeAny(IMessage message, JsonTokenizer tokenizer)
|
||||
{
|
||||
List<JsonToken> list = new List<JsonToken>();
|
||||
JsonToken jsonToken = tokenizer.Next();
|
||||
if (jsonToken.Type != JsonToken.TokenType.StartObject)
|
||||
{
|
||||
throw new InvalidProtocolBufferException("Expected object value for Any");
|
||||
}
|
||||
int objectDepth = tokenizer.ObjectDepth;
|
||||
while (jsonToken.Type != JsonToken.TokenType.Name || jsonToken.StringValue != "@type" || tokenizer.ObjectDepth != objectDepth)
|
||||
{
|
||||
list.Add(jsonToken);
|
||||
jsonToken = tokenizer.Next();
|
||||
if (tokenizer.ObjectDepth < objectDepth)
|
||||
{
|
||||
throw new InvalidProtocolBufferException("Any message with no @type");
|
||||
}
|
||||
}
|
||||
jsonToken = tokenizer.Next();
|
||||
if (jsonToken.Type != JsonToken.TokenType.StringValue)
|
||||
{
|
||||
throw new InvalidProtocolBufferException("Expected string value for Any.@type");
|
||||
}
|
||||
string stringValue = jsonToken.StringValue;
|
||||
string typeName = Any.GetTypeName(stringValue);
|
||||
MessageDescriptor messageDescriptor = this.settings.TypeRegistry.Find(typeName);
|
||||
if (messageDescriptor == null)
|
||||
{
|
||||
throw new InvalidOperationException(string.Format("Type registry has no descriptor for type name '{0}'", typeName));
|
||||
}
|
||||
JsonTokenizer jsonTokenizer = JsonTokenizer.FromReplayedTokens(list, tokenizer);
|
||||
IMessage message2 = messageDescriptor.Parser.CreateTemplate();
|
||||
if (messageDescriptor.IsWellKnownType)
|
||||
{
|
||||
this.MergeWellKnownTypeAnyBody(message2, jsonTokenizer);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Merge(message2, jsonTokenizer);
|
||||
}
|
||||
ByteString byteString = message2.ToByteString();
|
||||
message.Descriptor.Fields[1].Accessor.SetValue(message, stringValue);
|
||||
message.Descriptor.Fields[2].Accessor.SetValue(message, byteString);
|
||||
}
|
||||
|
||||
// Token: 0x06000100 RID: 256 RVA: 0x00006440 File Offset: 0x00004640
|
||||
private void MergeWellKnownTypeAnyBody(IMessage body, JsonTokenizer tokenizer)
|
||||
{
|
||||
JsonToken jsonToken = tokenizer.Next();
|
||||
jsonToken = tokenizer.Next();
|
||||
if (jsonToken.Type != JsonToken.TokenType.Name || jsonToken.StringValue != "value")
|
||||
{
|
||||
throw new InvalidProtocolBufferException(string.Format("Expected '{0}' property for well-known type Any body", "value"));
|
||||
}
|
||||
this.Merge(body, tokenizer);
|
||||
jsonToken = tokenizer.Next();
|
||||
if (jsonToken.Type != JsonToken.TokenType.EndObject)
|
||||
{
|
||||
throw new InvalidProtocolBufferException("Expected end-object token after @type/value for well-known type");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000101 RID: 257 RVA: 0x000064B0 File Offset: 0x000046B0
|
||||
private static object ParseMapKey(FieldDescriptor field, string keyText)
|
||||
{
|
||||
switch (field.FieldType)
|
||||
{
|
||||
case FieldType.Int64:
|
||||
case FieldType.SFixed64:
|
||||
case FieldType.SInt64:
|
||||
return JsonParser.ParseNumericString<long>(keyText, new Func<string, NumberStyles, IFormatProvider, long>(long.Parse));
|
||||
case FieldType.UInt64:
|
||||
case FieldType.Fixed64:
|
||||
return JsonParser.ParseNumericString<ulong>(keyText, new Func<string, NumberStyles, IFormatProvider, ulong>(ulong.Parse));
|
||||
case FieldType.Int32:
|
||||
case FieldType.SFixed32:
|
||||
case FieldType.SInt32:
|
||||
return JsonParser.ParseNumericString<int>(keyText, new Func<string, NumberStyles, IFormatProvider, int>(int.Parse));
|
||||
case FieldType.Fixed32:
|
||||
case FieldType.UInt32:
|
||||
return JsonParser.ParseNumericString<uint>(keyText, new Func<string, NumberStyles, IFormatProvider, uint>(uint.Parse));
|
||||
case FieldType.Bool:
|
||||
if (keyText == "true")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (keyText == "false")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
throw new InvalidProtocolBufferException("Invalid string for bool map key: " + keyText);
|
||||
case FieldType.String:
|
||||
return keyText;
|
||||
}
|
||||
throw new InvalidProtocolBufferException("Invalid field type for map: " + field.FieldType);
|
||||
}
|
||||
|
||||
// Token: 0x06000102 RID: 258 RVA: 0x000065C4 File Offset: 0x000047C4
|
||||
private static object ParseSingleNumberValue(FieldDescriptor field, JsonToken token)
|
||||
{
|
||||
double numberValue = token.NumberValue;
|
||||
checked
|
||||
{
|
||||
try
|
||||
{
|
||||
switch (field.FieldType)
|
||||
{
|
||||
case FieldType.Double:
|
||||
return numberValue;
|
||||
case FieldType.Float:
|
||||
if (double.IsNaN(numberValue))
|
||||
{
|
||||
return float.NaN;
|
||||
}
|
||||
if (numberValue <= 3.4028234663852886E+38 && numberValue >= -3.4028234663852886E+38)
|
||||
{
|
||||
return (float)numberValue;
|
||||
}
|
||||
if (double.IsPositiveInfinity(numberValue))
|
||||
{
|
||||
return float.PositiveInfinity;
|
||||
}
|
||||
if (double.IsNegativeInfinity(numberValue))
|
||||
{
|
||||
return float.NegativeInfinity;
|
||||
}
|
||||
throw new InvalidProtocolBufferException(string.Format("Value out of range: {0}", numberValue));
|
||||
case FieldType.Int64:
|
||||
case FieldType.SFixed64:
|
||||
case FieldType.SInt64:
|
||||
JsonParser.CheckInteger(numberValue);
|
||||
return (long)numberValue;
|
||||
case FieldType.UInt64:
|
||||
case FieldType.Fixed64:
|
||||
JsonParser.CheckInteger(numberValue);
|
||||
return (ulong)numberValue;
|
||||
case FieldType.Int32:
|
||||
case FieldType.SFixed32:
|
||||
case FieldType.SInt32:
|
||||
JsonParser.CheckInteger(numberValue);
|
||||
return (int)numberValue;
|
||||
case FieldType.Fixed32:
|
||||
case FieldType.UInt32:
|
||||
JsonParser.CheckInteger(numberValue);
|
||||
return (uint)numberValue;
|
||||
case FieldType.Enum:
|
||||
JsonParser.CheckInteger(numberValue);
|
||||
return (int)numberValue;
|
||||
}
|
||||
throw new InvalidProtocolBufferException(string.Format("Unsupported conversion from JSON number for field type {0}", field.FieldType));
|
||||
}
|
||||
catch (OverflowException)
|
||||
{
|
||||
throw new InvalidProtocolBufferException(string.Format("Value out of range: {0}", numberValue));
|
||||
}
|
||||
object obj;
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000103 RID: 259 RVA: 0x00006764 File Offset: 0x00004964
|
||||
private static void CheckInteger(double value)
|
||||
{
|
||||
if (double.IsInfinity(value) || double.IsNaN(value))
|
||||
{
|
||||
throw new InvalidProtocolBufferException(string.Format("Value not an integer: {0}", value));
|
||||
}
|
||||
if (value != Math.Floor(value))
|
||||
{
|
||||
throw new InvalidProtocolBufferException(string.Format("Value not an integer: {0}", value));
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000104 RID: 260 RVA: 0x000067B8 File Offset: 0x000049B8
|
||||
private static object ParseSingleStringValue(FieldDescriptor field, string text)
|
||||
{
|
||||
switch (field.FieldType)
|
||||
{
|
||||
case FieldType.Double:
|
||||
{
|
||||
double num = JsonParser.ParseNumericString<double>(text, new Func<string, NumberStyles, IFormatProvider, double>(double.Parse));
|
||||
JsonParser.ValidateInfinityAndNan(text, double.IsPositiveInfinity(num), double.IsNegativeInfinity(num), double.IsNaN(num));
|
||||
return num;
|
||||
}
|
||||
case FieldType.Float:
|
||||
{
|
||||
float num2 = JsonParser.ParseNumericString<float>(text, new Func<string, NumberStyles, IFormatProvider, float>(float.Parse));
|
||||
JsonParser.ValidateInfinityAndNan(text, float.IsPositiveInfinity(num2), float.IsNegativeInfinity(num2), float.IsNaN(num2));
|
||||
return num2;
|
||||
}
|
||||
case FieldType.Int64:
|
||||
case FieldType.SFixed64:
|
||||
case FieldType.SInt64:
|
||||
return JsonParser.ParseNumericString<long>(text, new Func<string, NumberStyles, IFormatProvider, long>(long.Parse));
|
||||
case FieldType.UInt64:
|
||||
case FieldType.Fixed64:
|
||||
return JsonParser.ParseNumericString<ulong>(text, new Func<string, NumberStyles, IFormatProvider, ulong>(ulong.Parse));
|
||||
case FieldType.Int32:
|
||||
case FieldType.SFixed32:
|
||||
case FieldType.SInt32:
|
||||
break;
|
||||
case FieldType.Fixed32:
|
||||
case FieldType.UInt32:
|
||||
return JsonParser.ParseNumericString<uint>(text, new Func<string, NumberStyles, IFormatProvider, uint>(uint.Parse));
|
||||
case FieldType.Bool:
|
||||
case FieldType.Group:
|
||||
case FieldType.Message:
|
||||
goto IL_169;
|
||||
case FieldType.String:
|
||||
return text;
|
||||
case FieldType.Bytes:
|
||||
try
|
||||
{
|
||||
return ByteString.FromBase64(text);
|
||||
}
|
||||
catch (FormatException ex)
|
||||
{
|
||||
throw InvalidProtocolBufferException.InvalidBase64(ex);
|
||||
}
|
||||
break;
|
||||
case FieldType.Enum:
|
||||
{
|
||||
EnumValueDescriptor enumValueDescriptor = field.EnumType.FindValueByName(text);
|
||||
if (enumValueDescriptor == null)
|
||||
{
|
||||
throw new InvalidProtocolBufferException(string.Format("Invalid enum value: {0} for enum type: {1}", text, field.EnumType.FullName));
|
||||
}
|
||||
return enumValueDescriptor.Number;
|
||||
}
|
||||
default:
|
||||
goto IL_169;
|
||||
}
|
||||
return JsonParser.ParseNumericString<int>(text, new Func<string, NumberStyles, IFormatProvider, int>(int.Parse));
|
||||
IL_169:
|
||||
throw new InvalidProtocolBufferException(string.Format("Unsupported conversion from JSON string for field type {0}", field.FieldType));
|
||||
}
|
||||
|
||||
// Token: 0x06000105 RID: 261 RVA: 0x0000695C File Offset: 0x00004B5C
|
||||
private static IMessage NewMessageForField(FieldDescriptor field)
|
||||
{
|
||||
return field.MessageType.Parser.CreateTemplate();
|
||||
}
|
||||
|
||||
// Token: 0x06000106 RID: 262 RVA: 0x00006970 File Offset: 0x00004B70
|
||||
private static T ParseNumericString<T>(string text, Func<string, NumberStyles, IFormatProvider, T> parser)
|
||||
{
|
||||
if (text.StartsWith("+"))
|
||||
{
|
||||
throw new InvalidProtocolBufferException(string.Format("Invalid numeric value: {0}", text));
|
||||
}
|
||||
if (text.StartsWith("0") && text.Length > 1)
|
||||
{
|
||||
if (text[1] >= '0' && text[1] <= '9')
|
||||
{
|
||||
throw new InvalidProtocolBufferException(string.Format("Invalid numeric value: {0}", text));
|
||||
}
|
||||
}
|
||||
else if (text.StartsWith("-0") && text.Length > 2 && text[2] >= '0' && text[2] <= '9')
|
||||
{
|
||||
throw new InvalidProtocolBufferException(string.Format("Invalid numeric value: {0}", text));
|
||||
}
|
||||
T t;
|
||||
try
|
||||
{
|
||||
t = parser(text, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent, CultureInfo.InvariantCulture);
|
||||
}
|
||||
catch (FormatException)
|
||||
{
|
||||
throw new InvalidProtocolBufferException(string.Format("Invalid numeric value for type: {0}", text));
|
||||
}
|
||||
catch (OverflowException)
|
||||
{
|
||||
throw new InvalidProtocolBufferException(string.Format("Value out of range: {0}", text));
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
// Token: 0x06000107 RID: 263 RVA: 0x00006A6C File Offset: 0x00004C6C
|
||||
private static void ValidateInfinityAndNan(string text, bool isPositiveInfinity, bool isNegativeInfinity, bool isNaN)
|
||||
{
|
||||
if ((isPositiveInfinity && text != "Infinity") || (isNegativeInfinity && text != "-Infinity") || (isNaN && text != "NaN"))
|
||||
{
|
||||
throw new InvalidProtocolBufferException(string.Format("Invalid numeric value: {0}", text));
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000108 RID: 264 RVA: 0x00006ABC File Offset: 0x00004CBC
|
||||
private static void MergeTimestamp(IMessage message, JsonToken token)
|
||||
{
|
||||
if (token.Type != JsonToken.TokenType.StringValue)
|
||||
{
|
||||
throw new InvalidProtocolBufferException("Expected string value for Timestamp");
|
||||
}
|
||||
Match match = JsonParser.TimestampRegex.Match(token.StringValue);
|
||||
if (!match.Success)
|
||||
{
|
||||
throw new InvalidProtocolBufferException(string.Format("Invalid Timestamp value: {0}", token.StringValue));
|
||||
}
|
||||
string value = match.Groups["datetime"].Value;
|
||||
string value2 = match.Groups["subseconds"].Value;
|
||||
string value3 = match.Groups["offset"].Value;
|
||||
try
|
||||
{
|
||||
Timestamp timestamp = Timestamp.FromDateTime(DateTime.ParseExact(value, "yyyy-MM-dd'T'HH:mm:ss", CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal));
|
||||
int num = 0;
|
||||
if (value2 != "")
|
||||
{
|
||||
num = int.Parse(value2.Substring(1), CultureInfo.InvariantCulture) * JsonParser.SubsecondScalingFactors[value2.Length];
|
||||
}
|
||||
int num2 = 0;
|
||||
if (value3 != "Z")
|
||||
{
|
||||
int num3 = ((value3[0] == '-') ? 1 : (-1));
|
||||
int num4 = int.Parse(value3.Substring(1, 2), CultureInfo.InvariantCulture);
|
||||
int num5 = int.Parse(value3.Substring(4, 2));
|
||||
int num6 = num4 * 60 + num5;
|
||||
if (num6 > 1080)
|
||||
{
|
||||
throw new InvalidProtocolBufferException("Invalid Timestamp value: " + token.StringValue);
|
||||
}
|
||||
if (num6 == 0 && num3 == 1)
|
||||
{
|
||||
throw new InvalidProtocolBufferException("Invalid Timestamp value: " + token.StringValue);
|
||||
}
|
||||
num2 = num3 * num6 * 60;
|
||||
}
|
||||
if (num2 < 0 && num > 0)
|
||||
{
|
||||
num2++;
|
||||
num -= 1000000000;
|
||||
}
|
||||
if (num2 != 0 || num != 0)
|
||||
{
|
||||
timestamp += new Duration
|
||||
{
|
||||
Nanos = num,
|
||||
Seconds = (long)num2
|
||||
};
|
||||
if (timestamp.Seconds < -62135596800L || timestamp.Seconds > 253402300799L)
|
||||
{
|
||||
throw new InvalidProtocolBufferException("Invalid Timestamp value: " + token.StringValue);
|
||||
}
|
||||
}
|
||||
message.Descriptor.Fields[1].Accessor.SetValue(message, timestamp.Seconds);
|
||||
message.Descriptor.Fields[2].Accessor.SetValue(message, timestamp.Nanos);
|
||||
}
|
||||
catch (FormatException)
|
||||
{
|
||||
throw new InvalidProtocolBufferException("Invalid Timestamp value: " + token.StringValue);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000109 RID: 265 RVA: 0x00006D24 File Offset: 0x00004F24
|
||||
private static void MergeDuration(IMessage message, JsonToken token)
|
||||
{
|
||||
if (token.Type != JsonToken.TokenType.StringValue)
|
||||
{
|
||||
throw new InvalidProtocolBufferException("Expected string value for Duration");
|
||||
}
|
||||
Match match = JsonParser.DurationRegex.Match(token.StringValue);
|
||||
if (!match.Success)
|
||||
{
|
||||
throw new InvalidProtocolBufferException("Invalid Duration value: " + token.StringValue);
|
||||
}
|
||||
string value = match.Groups["sign"].Value;
|
||||
string value2 = match.Groups["int"].Value;
|
||||
if (value2[0] == '0' && value2.Length > 1)
|
||||
{
|
||||
throw new InvalidProtocolBufferException("Invalid Duration value: " + token.StringValue);
|
||||
}
|
||||
string value3 = match.Groups["subseconds"].Value;
|
||||
int num = ((value == "-") ? (-1) : 1);
|
||||
try
|
||||
{
|
||||
long num2 = long.Parse(value2, CultureInfo.InvariantCulture) * (long)num;
|
||||
int num3 = 0;
|
||||
if (value3 != "")
|
||||
{
|
||||
num3 = int.Parse(value3.Substring(1)) * JsonParser.SubsecondScalingFactors[value3.Length] * num;
|
||||
}
|
||||
if (!Duration.IsNormalized(num2, num3))
|
||||
{
|
||||
throw new InvalidProtocolBufferException(string.Format("Invalid Duration value: {0}", token.StringValue));
|
||||
}
|
||||
message.Descriptor.Fields[1].Accessor.SetValue(message, num2);
|
||||
message.Descriptor.Fields[2].Accessor.SetValue(message, num3);
|
||||
}
|
||||
catch (FormatException)
|
||||
{
|
||||
throw new InvalidProtocolBufferException(string.Format("Invalid Duration value: {0}", token.StringValue));
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600010A RID: 266 RVA: 0x00006EC0 File Offset: 0x000050C0
|
||||
private static void MergeFieldMask(IMessage message, JsonToken token)
|
||||
{
|
||||
if (token.Type != JsonToken.TokenType.StringValue)
|
||||
{
|
||||
throw new InvalidProtocolBufferException("Expected string value for FieldMask");
|
||||
}
|
||||
string[] array = token.StringValue.Split(JsonParser.FieldMaskPathSeparators, StringSplitOptions.RemoveEmptyEntries);
|
||||
IList list = (IList)message.Descriptor.Fields[1].Accessor.GetValue(message);
|
||||
foreach (string text in array)
|
||||
{
|
||||
list.Add(JsonParser.ToSnakeCase(text));
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600010B RID: 267 RVA: 0x00006F34 File Offset: 0x00005134
|
||||
private static string ToSnakeCase(string text)
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder(text.Length * 2);
|
||||
bool flag = false;
|
||||
bool flag2 = false;
|
||||
for (int i = 0; i < text.Length; i++)
|
||||
{
|
||||
char c = text[i];
|
||||
if (c >= 'A' && c <= 'Z')
|
||||
{
|
||||
if (flag && (flag2 || (i + 1 < text.Length && text[i + 1] >= 'a' && text[i + 1] <= 'z')))
|
||||
{
|
||||
stringBuilder.Append('_');
|
||||
}
|
||||
stringBuilder.Append(c + 'a' - 'A');
|
||||
flag = true;
|
||||
flag2 = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
stringBuilder.Append(c);
|
||||
if (c == '_')
|
||||
{
|
||||
throw new InvalidProtocolBufferException(string.Format("Invalid field mask: {0}", text));
|
||||
}
|
||||
flag = true;
|
||||
flag2 = true;
|
||||
}
|
||||
}
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
// Token: 0x04000034 RID: 52
|
||||
private static readonly Regex TimestampRegex = new Regex("^(?<datetime>[0-9]{4}-[01][0-9]-[0-3][0-9]T[012][0-9]:[0-5][0-9]:[0-5][0-9])(?<subseconds>\\.[0-9]{1,9})?(?<offset>(Z|[+-][0-1][0-9]:[0-5][0-9]))$", FrameworkPortability.CompiledRegexWhereAvailable);
|
||||
|
||||
// Token: 0x04000035 RID: 53
|
||||
private static readonly Regex DurationRegex = new Regex("^(?<sign>-)?(?<int>[0-9]{1,12})(?<subseconds>\\.[0-9]{1,9})?s$", FrameworkPortability.CompiledRegexWhereAvailable);
|
||||
|
||||
// Token: 0x04000036 RID: 54
|
||||
private static readonly int[] SubsecondScalingFactors = new int[]
|
||||
{
|
||||
0, 100000000, 100000000, 10000000, 1000000, 100000, 10000, 1000, 100, 10,
|
||||
1
|
||||
};
|
||||
|
||||
// Token: 0x04000037 RID: 55
|
||||
private static readonly char[] FieldMaskPathSeparators = new char[] { ',' };
|
||||
|
||||
// Token: 0x04000038 RID: 56
|
||||
private static readonly JsonParser defaultInstance = new JsonParser(JsonParser.Settings.Default);
|
||||
|
||||
// Token: 0x04000039 RID: 57
|
||||
private static readonly Dictionary<string, Action<JsonParser, IMessage, JsonTokenizer>> WellKnownTypeHandlers = new Dictionary<string, Action<JsonParser, IMessage, JsonTokenizer>>
|
||||
{
|
||||
{
|
||||
Timestamp.Descriptor.FullName,
|
||||
delegate(JsonParser parser, IMessage message, JsonTokenizer tokenizer)
|
||||
{
|
||||
JsonParser.MergeTimestamp(message, tokenizer.Next());
|
||||
}
|
||||
},
|
||||
{
|
||||
Duration.Descriptor.FullName,
|
||||
delegate(JsonParser parser, IMessage message, JsonTokenizer tokenizer)
|
||||
{
|
||||
JsonParser.MergeDuration(message, tokenizer.Next());
|
||||
}
|
||||
},
|
||||
{
|
||||
Value.Descriptor.FullName,
|
||||
delegate(JsonParser parser, IMessage message, JsonTokenizer tokenizer)
|
||||
{
|
||||
parser.MergeStructValue(message, tokenizer);
|
||||
}
|
||||
},
|
||||
{
|
||||
ListValue.Descriptor.FullName,
|
||||
delegate(JsonParser parser, IMessage message, JsonTokenizer tokenizer)
|
||||
{
|
||||
parser.MergeRepeatedField(message, message.Descriptor.Fields[1], tokenizer);
|
||||
}
|
||||
},
|
||||
{
|
||||
Struct.Descriptor.FullName,
|
||||
delegate(JsonParser parser, IMessage message, JsonTokenizer tokenizer)
|
||||
{
|
||||
parser.MergeStruct(message, tokenizer);
|
||||
}
|
||||
},
|
||||
{
|
||||
Any.Descriptor.FullName,
|
||||
delegate(JsonParser parser, IMessage message, JsonTokenizer tokenizer)
|
||||
{
|
||||
parser.MergeAny(message, tokenizer);
|
||||
}
|
||||
},
|
||||
{
|
||||
FieldMask.Descriptor.FullName,
|
||||
delegate(JsonParser parser, IMessage message, JsonTokenizer tokenizer)
|
||||
{
|
||||
JsonParser.MergeFieldMask(message, tokenizer.Next());
|
||||
}
|
||||
},
|
||||
{
|
||||
Int32Value.Descriptor.FullName,
|
||||
new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.MergeWrapperField)
|
||||
},
|
||||
{
|
||||
Int64Value.Descriptor.FullName,
|
||||
new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.MergeWrapperField)
|
||||
},
|
||||
{
|
||||
UInt32Value.Descriptor.FullName,
|
||||
new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.MergeWrapperField)
|
||||
},
|
||||
{
|
||||
UInt64Value.Descriptor.FullName,
|
||||
new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.MergeWrapperField)
|
||||
},
|
||||
{
|
||||
FloatValue.Descriptor.FullName,
|
||||
new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.MergeWrapperField)
|
||||
},
|
||||
{
|
||||
DoubleValue.Descriptor.FullName,
|
||||
new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.MergeWrapperField)
|
||||
},
|
||||
{
|
||||
BytesValue.Descriptor.FullName,
|
||||
new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.MergeWrapperField)
|
||||
},
|
||||
{
|
||||
StringValue.Descriptor.FullName,
|
||||
new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.MergeWrapperField)
|
||||
},
|
||||
{
|
||||
BoolValue.Descriptor.FullName,
|
||||
new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.MergeWrapperField)
|
||||
}
|
||||
};
|
||||
|
||||
// Token: 0x0400003A RID: 58
|
||||
private readonly JsonParser.Settings settings;
|
||||
|
||||
// Token: 0x0200007F RID: 127
|
||||
public sealed class Settings
|
||||
{
|
||||
// Token: 0x170001CF RID: 463
|
||||
// (get) Token: 0x060006B4 RID: 1716 RVA: 0x00016790 File Offset: 0x00014990
|
||||
public static JsonParser.Settings Default { get; } = new JsonParser.Settings(64);
|
||||
|
||||
// Token: 0x170001D0 RID: 464
|
||||
// (get) Token: 0x060006B6 RID: 1718 RVA: 0x000167A5 File Offset: 0x000149A5
|
||||
public int RecursionLimit { get; }
|
||||
|
||||
// Token: 0x170001D1 RID: 465
|
||||
// (get) Token: 0x060006B7 RID: 1719 RVA: 0x000167AD File Offset: 0x000149AD
|
||||
public TypeRegistry TypeRegistry { get; }
|
||||
|
||||
// Token: 0x060006B8 RID: 1720 RVA: 0x000167B5 File Offset: 0x000149B5
|
||||
public Settings(int recursionLimit)
|
||||
: this(recursionLimit, TypeRegistry.Empty)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060006B9 RID: 1721 RVA: 0x000167C3 File Offset: 0x000149C3
|
||||
public Settings(int recursionLimit, TypeRegistry typeRegistry)
|
||||
{
|
||||
this.RecursionLimit = recursionLimit;
|
||||
this.TypeRegistry = ProtoPreconditions.CheckNotNull<TypeRegistry>(typeRegistry, "typeRegistry");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,254 @@
|
||||
using System;
|
||||
|
||||
namespace Google.Protobuf
|
||||
{
|
||||
// Token: 0x02000011 RID: 17
|
||||
internal sealed class JsonToken : IEquatable<JsonToken>
|
||||
{
|
||||
// Token: 0x17000018 RID: 24
|
||||
// (get) Token: 0x0600010D RID: 269 RVA: 0x00007245 File Offset: 0x00005445
|
||||
internal static JsonToken Null
|
||||
{
|
||||
get
|
||||
{
|
||||
return JsonToken._null;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000019 RID: 25
|
||||
// (get) Token: 0x0600010E RID: 270 RVA: 0x0000724C File Offset: 0x0000544C
|
||||
internal static JsonToken False
|
||||
{
|
||||
get
|
||||
{
|
||||
return JsonToken._false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700001A RID: 26
|
||||
// (get) Token: 0x0600010F RID: 271 RVA: 0x00007253 File Offset: 0x00005453
|
||||
internal static JsonToken True
|
||||
{
|
||||
get
|
||||
{
|
||||
return JsonToken._true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700001B RID: 27
|
||||
// (get) Token: 0x06000110 RID: 272 RVA: 0x0000725A File Offset: 0x0000545A
|
||||
internal static JsonToken StartObject
|
||||
{
|
||||
get
|
||||
{
|
||||
return JsonToken.startObject;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700001C RID: 28
|
||||
// (get) Token: 0x06000111 RID: 273 RVA: 0x00007261 File Offset: 0x00005461
|
||||
internal static JsonToken EndObject
|
||||
{
|
||||
get
|
||||
{
|
||||
return JsonToken.endObject;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700001D RID: 29
|
||||
// (get) Token: 0x06000112 RID: 274 RVA: 0x00007268 File Offset: 0x00005468
|
||||
internal static JsonToken StartArray
|
||||
{
|
||||
get
|
||||
{
|
||||
return JsonToken.startArray;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700001E RID: 30
|
||||
// (get) Token: 0x06000113 RID: 275 RVA: 0x0000726F File Offset: 0x0000546F
|
||||
internal static JsonToken EndArray
|
||||
{
|
||||
get
|
||||
{
|
||||
return JsonToken.endArray;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700001F RID: 31
|
||||
// (get) Token: 0x06000114 RID: 276 RVA: 0x00007276 File Offset: 0x00005476
|
||||
internal static JsonToken EndDocument
|
||||
{
|
||||
get
|
||||
{
|
||||
return JsonToken.endDocument;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000115 RID: 277 RVA: 0x0000727D File Offset: 0x0000547D
|
||||
internal static JsonToken Name(string name)
|
||||
{
|
||||
return new JsonToken(JsonToken.TokenType.Name, name, 0.0);
|
||||
}
|
||||
|
||||
// Token: 0x06000116 RID: 278 RVA: 0x0000728F File Offset: 0x0000548F
|
||||
internal static JsonToken Value(string value)
|
||||
{
|
||||
return new JsonToken(JsonToken.TokenType.StringValue, value, 0.0);
|
||||
}
|
||||
|
||||
// Token: 0x06000117 RID: 279 RVA: 0x000072A1 File Offset: 0x000054A1
|
||||
internal static JsonToken Value(double value)
|
||||
{
|
||||
return new JsonToken(JsonToken.TokenType.Number, null, value);
|
||||
}
|
||||
|
||||
// Token: 0x17000020 RID: 32
|
||||
// (get) Token: 0x06000118 RID: 280 RVA: 0x000072AB File Offset: 0x000054AB
|
||||
internal JsonToken.TokenType Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.type;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000021 RID: 33
|
||||
// (get) Token: 0x06000119 RID: 281 RVA: 0x000072B3 File Offset: 0x000054B3
|
||||
internal string StringValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.stringValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000022 RID: 34
|
||||
// (get) Token: 0x0600011A RID: 282 RVA: 0x000072BB File Offset: 0x000054BB
|
||||
internal double NumberValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.numberValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600011B RID: 283 RVA: 0x000072C3 File Offset: 0x000054C3
|
||||
private JsonToken(JsonToken.TokenType type, string stringValue = null, double numberValue = 0.0)
|
||||
{
|
||||
this.type = type;
|
||||
this.stringValue = stringValue;
|
||||
this.numberValue = numberValue;
|
||||
}
|
||||
|
||||
// Token: 0x0600011C RID: 284 RVA: 0x000072E0 File Offset: 0x000054E0
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return this.Equals(obj as JsonToken);
|
||||
}
|
||||
|
||||
// Token: 0x0600011D RID: 285 RVA: 0x000072F0 File Offset: 0x000054F0
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return (((int)(((JsonToken.TokenType)17 * (JsonToken.TokenType)31 + (int)this.type) * (JsonToken.TokenType)31) + this.stringValue == null) ? 0 : this.stringValue.GetHashCode()) * 31 + this.numberValue.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x0600011E RID: 286 RVA: 0x00007340 File Offset: 0x00005540
|
||||
public override string ToString()
|
||||
{
|
||||
switch (this.type)
|
||||
{
|
||||
case JsonToken.TokenType.Null:
|
||||
return "null";
|
||||
case JsonToken.TokenType.False:
|
||||
return "false";
|
||||
case JsonToken.TokenType.True:
|
||||
return "true";
|
||||
case JsonToken.TokenType.StringValue:
|
||||
return "value (" + this.stringValue + ")";
|
||||
case JsonToken.TokenType.Number:
|
||||
return "number (" + this.numberValue + ")";
|
||||
case JsonToken.TokenType.Name:
|
||||
return "name (" + this.stringValue + ")";
|
||||
case JsonToken.TokenType.StartObject:
|
||||
return "start-object";
|
||||
case JsonToken.TokenType.EndObject:
|
||||
return "end-object";
|
||||
case JsonToken.TokenType.StartArray:
|
||||
return "start-array";
|
||||
case JsonToken.TokenType.EndArray:
|
||||
return "end-array";
|
||||
case JsonToken.TokenType.EndDocument:
|
||||
return "end-document";
|
||||
default:
|
||||
throw new InvalidOperationException("Token is of unknown type " + this.type);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600011F RID: 287 RVA: 0x0000741C File Offset: 0x0000561C
|
||||
public bool Equals(JsonToken other)
|
||||
{
|
||||
return other != null && (other.type == this.type && other.stringValue == this.stringValue) && other.numberValue.Equals(this.numberValue);
|
||||
}
|
||||
|
||||
// Token: 0x0400003B RID: 59
|
||||
private static readonly JsonToken _true = new JsonToken(JsonToken.TokenType.True, null, 0.0);
|
||||
|
||||
// Token: 0x0400003C RID: 60
|
||||
private static readonly JsonToken _false = new JsonToken(JsonToken.TokenType.False, null, 0.0);
|
||||
|
||||
// Token: 0x0400003D RID: 61
|
||||
private static readonly JsonToken _null = new JsonToken(JsonToken.TokenType.Null, null, 0.0);
|
||||
|
||||
// Token: 0x0400003E RID: 62
|
||||
private static readonly JsonToken startObject = new JsonToken(JsonToken.TokenType.StartObject, null, 0.0);
|
||||
|
||||
// Token: 0x0400003F RID: 63
|
||||
private static readonly JsonToken endObject = new JsonToken(JsonToken.TokenType.EndObject, null, 0.0);
|
||||
|
||||
// Token: 0x04000040 RID: 64
|
||||
private static readonly JsonToken startArray = new JsonToken(JsonToken.TokenType.StartArray, null, 0.0);
|
||||
|
||||
// Token: 0x04000041 RID: 65
|
||||
private static readonly JsonToken endArray = new JsonToken(JsonToken.TokenType.EndArray, null, 0.0);
|
||||
|
||||
// Token: 0x04000042 RID: 66
|
||||
private static readonly JsonToken endDocument = new JsonToken(JsonToken.TokenType.EndDocument, null, 0.0);
|
||||
|
||||
// Token: 0x04000043 RID: 67
|
||||
private readonly JsonToken.TokenType type;
|
||||
|
||||
// Token: 0x04000044 RID: 68
|
||||
private readonly string stringValue;
|
||||
|
||||
// Token: 0x04000045 RID: 69
|
||||
private readonly double numberValue;
|
||||
|
||||
// Token: 0x02000081 RID: 129
|
||||
internal enum TokenType
|
||||
{
|
||||
// Token: 0x040002A0 RID: 672
|
||||
Null,
|
||||
// Token: 0x040002A1 RID: 673
|
||||
False,
|
||||
// Token: 0x040002A2 RID: 674
|
||||
True,
|
||||
// Token: 0x040002A3 RID: 675
|
||||
StringValue,
|
||||
// Token: 0x040002A4 RID: 676
|
||||
Number,
|
||||
// Token: 0x040002A5 RID: 677
|
||||
Name,
|
||||
// Token: 0x040002A6 RID: 678
|
||||
StartObject,
|
||||
// Token: 0x040002A7 RID: 679
|
||||
EndObject,
|
||||
// Token: 0x040002A8 RID: 680
|
||||
StartArray,
|
||||
// Token: 0x040002A9 RID: 681
|
||||
EndArray,
|
||||
// Token: 0x040002AA RID: 682
|
||||
EndDocument
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,694 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace Google.Protobuf
|
||||
{
|
||||
// Token: 0x02000012 RID: 18
|
||||
internal abstract class JsonTokenizer
|
||||
{
|
||||
// Token: 0x06000121 RID: 289 RVA: 0x0000751F File Offset: 0x0000571F
|
||||
internal static JsonTokenizer FromTextReader(TextReader reader)
|
||||
{
|
||||
return new JsonTokenizer.JsonTextTokenizer(reader);
|
||||
}
|
||||
|
||||
// Token: 0x06000122 RID: 290 RVA: 0x00007527 File Offset: 0x00005727
|
||||
internal static JsonTokenizer FromReplayedTokens(IList<JsonToken> tokens, JsonTokenizer continuation)
|
||||
{
|
||||
return new JsonTokenizer.JsonReplayTokenizer(tokens, continuation);
|
||||
}
|
||||
|
||||
// Token: 0x17000023 RID: 35
|
||||
// (get) Token: 0x06000123 RID: 291 RVA: 0x00007530 File Offset: 0x00005730
|
||||
// (set) Token: 0x06000124 RID: 292 RVA: 0x00007538 File Offset: 0x00005738
|
||||
internal int ObjectDepth { get; private set; }
|
||||
|
||||
// Token: 0x06000125 RID: 293 RVA: 0x00007544 File Offset: 0x00005744
|
||||
internal void PushBack(JsonToken token)
|
||||
{
|
||||
if (this.bufferedToken != null)
|
||||
{
|
||||
throw new InvalidOperationException("Can't push back twice");
|
||||
}
|
||||
this.bufferedToken = token;
|
||||
if (token.Type == JsonToken.TokenType.StartObject)
|
||||
{
|
||||
int num = this.ObjectDepth;
|
||||
this.ObjectDepth = num - 1;
|
||||
return;
|
||||
}
|
||||
if (token.Type == JsonToken.TokenType.EndObject)
|
||||
{
|
||||
int num = this.ObjectDepth;
|
||||
this.ObjectDepth = num + 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000126 RID: 294 RVA: 0x000075A0 File Offset: 0x000057A0
|
||||
internal JsonToken Next()
|
||||
{
|
||||
JsonToken jsonToken;
|
||||
if (this.bufferedToken != null)
|
||||
{
|
||||
jsonToken = this.bufferedToken;
|
||||
this.bufferedToken = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
jsonToken = this.NextImpl();
|
||||
}
|
||||
if (jsonToken.Type == JsonToken.TokenType.StartObject)
|
||||
{
|
||||
int num = this.ObjectDepth;
|
||||
this.ObjectDepth = num + 1;
|
||||
}
|
||||
else if (jsonToken.Type == JsonToken.TokenType.EndObject)
|
||||
{
|
||||
int num = this.ObjectDepth;
|
||||
this.ObjectDepth = num - 1;
|
||||
}
|
||||
return jsonToken;
|
||||
}
|
||||
|
||||
// Token: 0x06000127 RID: 295
|
||||
protected abstract JsonToken NextImpl();
|
||||
|
||||
// Token: 0x04000046 RID: 70
|
||||
private JsonToken bufferedToken;
|
||||
|
||||
// Token: 0x02000082 RID: 130
|
||||
private class JsonReplayTokenizer : JsonTokenizer
|
||||
{
|
||||
// Token: 0x060006C3 RID: 1731 RVA: 0x00016852 File Offset: 0x00014A52
|
||||
internal JsonReplayTokenizer(IList<JsonToken> tokens, JsonTokenizer nextTokenizer)
|
||||
{
|
||||
this.tokens = tokens;
|
||||
this.nextTokenizer = nextTokenizer;
|
||||
}
|
||||
|
||||
// Token: 0x060006C4 RID: 1732 RVA: 0x00016868 File Offset: 0x00014A68
|
||||
protected override JsonToken NextImpl()
|
||||
{
|
||||
if (this.nextTokenIndex >= this.tokens.Count)
|
||||
{
|
||||
return this.nextTokenizer.Next();
|
||||
}
|
||||
IList<JsonToken> list = this.tokens;
|
||||
int num = this.nextTokenIndex;
|
||||
this.nextTokenIndex = num + 1;
|
||||
return list[num];
|
||||
}
|
||||
|
||||
// Token: 0x040002AB RID: 683
|
||||
private readonly IList<JsonToken> tokens;
|
||||
|
||||
// Token: 0x040002AC RID: 684
|
||||
private readonly JsonTokenizer nextTokenizer;
|
||||
|
||||
// Token: 0x040002AD RID: 685
|
||||
private int nextTokenIndex;
|
||||
}
|
||||
|
||||
// Token: 0x02000083 RID: 131
|
||||
private sealed class JsonTextTokenizer : JsonTokenizer
|
||||
{
|
||||
// Token: 0x060006C5 RID: 1733 RVA: 0x000168B0 File Offset: 0x00014AB0
|
||||
internal JsonTextTokenizer(TextReader reader)
|
||||
{
|
||||
this.reader = new JsonTokenizer.JsonTextTokenizer.PushBackReader(reader);
|
||||
this.state = JsonTokenizer.JsonTextTokenizer.State.StartOfDocument;
|
||||
this.containerStack.Push(JsonTokenizer.JsonTextTokenizer.ContainerType.Document);
|
||||
}
|
||||
|
||||
// Token: 0x060006C6 RID: 1734 RVA: 0x000168E4 File Offset: 0x00014AE4
|
||||
protected override JsonToken NextImpl()
|
||||
{
|
||||
if (this.state == JsonTokenizer.JsonTextTokenizer.State.ReaderExhausted)
|
||||
{
|
||||
throw new InvalidOperationException("Next() called after end of document");
|
||||
}
|
||||
char? c;
|
||||
char value;
|
||||
for (;;)
|
||||
{
|
||||
c = this.reader.Read();
|
||||
if (c == null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
value = c.Value;
|
||||
if (value > ']')
|
||||
{
|
||||
goto IL_106;
|
||||
}
|
||||
if (value > ':')
|
||||
{
|
||||
goto IL_F1;
|
||||
}
|
||||
switch (value)
|
||||
{
|
||||
case '\t':
|
||||
case '\n':
|
||||
case '\r':
|
||||
break;
|
||||
case '\v':
|
||||
case '\f':
|
||||
goto IL_2BB;
|
||||
default:
|
||||
switch (value)
|
||||
{
|
||||
case ' ':
|
||||
continue;
|
||||
case '"':
|
||||
goto IL_188;
|
||||
case ',':
|
||||
this.ValidateState(JsonTokenizer.JsonTextTokenizer.State.ObjectAfterProperty | JsonTokenizer.JsonTextTokenizer.State.ArrayAfterValue, "Invalid state to read a colon: ");
|
||||
this.state = ((this.state == JsonTokenizer.JsonTextTokenizer.State.ObjectAfterProperty) ? JsonTokenizer.JsonTextTokenizer.State.ObjectAfterComma : JsonTokenizer.JsonTextTokenizer.State.ArrayAfterComma);
|
||||
continue;
|
||||
case '-':
|
||||
case '0':
|
||||
case '1':
|
||||
case '2':
|
||||
case '3':
|
||||
case '4':
|
||||
case '5':
|
||||
case '6':
|
||||
case '7':
|
||||
case '8':
|
||||
case '9':
|
||||
goto IL_29D;
|
||||
case ':':
|
||||
this.ValidateState(JsonTokenizer.JsonTextTokenizer.State.ObjectBeforeColon, "Invalid state to read a colon: ");
|
||||
this.state = JsonTokenizer.JsonTextTokenizer.State.ObjectAfterColon;
|
||||
continue;
|
||||
}
|
||||
goto Block_6;
|
||||
}
|
||||
}
|
||||
this.ValidateState(JsonTokenizer.JsonTextTokenizer.State.ExpectedEndOfDocument, "Unexpected end of document in state: ");
|
||||
this.state = JsonTokenizer.JsonTextTokenizer.State.ReaderExhausted;
|
||||
return JsonToken.EndDocument;
|
||||
Block_6:
|
||||
goto IL_2BB;
|
||||
IL_F1:
|
||||
if (value == '[')
|
||||
{
|
||||
this.ValidateState(JsonTokenizer.JsonTextTokenizer.ValueStates, "Invalid state to read an open square bracket: ");
|
||||
this.state = JsonTokenizer.JsonTextTokenizer.State.ArrayStart;
|
||||
this.containerStack.Push(JsonTokenizer.JsonTextTokenizer.ContainerType.Array);
|
||||
return JsonToken.StartArray;
|
||||
}
|
||||
if (value != ']')
|
||||
{
|
||||
goto IL_2BB;
|
||||
}
|
||||
this.ValidateState(JsonTokenizer.JsonTextTokenizer.State.ArrayStart | JsonTokenizer.JsonTextTokenizer.State.ArrayAfterValue, "Invalid state to read a close square bracket: ");
|
||||
this.PopContainer();
|
||||
return JsonToken.EndArray;
|
||||
IL_106:
|
||||
if (value <= 'n')
|
||||
{
|
||||
if (value == 'f')
|
||||
{
|
||||
this.ConsumeLiteral("false");
|
||||
this.ValidateAndModifyStateForValue("Invalid state to read a false literal: ");
|
||||
return JsonToken.False;
|
||||
}
|
||||
if (value != 'n')
|
||||
{
|
||||
goto IL_2BB;
|
||||
}
|
||||
this.ConsumeLiteral("null");
|
||||
this.ValidateAndModifyStateForValue("Invalid state to read a null literal: ");
|
||||
return JsonToken.Null;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (value == 't')
|
||||
{
|
||||
this.ConsumeLiteral("true");
|
||||
this.ValidateAndModifyStateForValue("Invalid state to read a true literal: ");
|
||||
return JsonToken.True;
|
||||
}
|
||||
if (value == '{')
|
||||
{
|
||||
this.ValidateState(JsonTokenizer.JsonTextTokenizer.ValueStates, "Invalid state to read an open brace: ");
|
||||
this.state = JsonTokenizer.JsonTextTokenizer.State.ObjectStart;
|
||||
this.containerStack.Push(JsonTokenizer.JsonTextTokenizer.ContainerType.Object);
|
||||
return JsonToken.StartObject;
|
||||
}
|
||||
if (value != '}')
|
||||
{
|
||||
goto IL_2BB;
|
||||
}
|
||||
this.ValidateState(JsonTokenizer.JsonTextTokenizer.State.ObjectStart | JsonTokenizer.JsonTextTokenizer.State.ObjectAfterProperty, "Invalid state to read a close brace: ");
|
||||
this.PopContainer();
|
||||
return JsonToken.EndObject;
|
||||
}
|
||||
IL_188:
|
||||
string text = this.ReadString();
|
||||
if ((this.state & (JsonTokenizer.JsonTextTokenizer.State.ObjectStart | JsonTokenizer.JsonTextTokenizer.State.ObjectAfterComma)) != (JsonTokenizer.JsonTextTokenizer.State)0)
|
||||
{
|
||||
this.state = JsonTokenizer.JsonTextTokenizer.State.ObjectBeforeColon;
|
||||
return JsonToken.Name(text);
|
||||
}
|
||||
this.ValidateAndModifyStateForValue("Invalid state to read a double quote: ");
|
||||
return JsonToken.Value(text);
|
||||
IL_29D:
|
||||
double num = this.ReadNumber(c.Value);
|
||||
this.ValidateAndModifyStateForValue("Invalid state to read a number token: ");
|
||||
return JsonToken.Value(num);
|
||||
IL_2BB:
|
||||
throw new InvalidJsonException("Invalid first character of token: " + c.Value.ToString());
|
||||
}
|
||||
|
||||
// Token: 0x060006C7 RID: 1735 RVA: 0x00016BCA File Offset: 0x00014DCA
|
||||
private void ValidateState(JsonTokenizer.JsonTextTokenizer.State validStates, string errorPrefix)
|
||||
{
|
||||
if ((validStates & this.state) == (JsonTokenizer.JsonTextTokenizer.State)0)
|
||||
{
|
||||
throw this.reader.CreateException(errorPrefix + this.state);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060006C8 RID: 1736 RVA: 0x00016BF4 File Offset: 0x00014DF4
|
||||
private string ReadString()
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
bool flag = false;
|
||||
char c;
|
||||
for (;;)
|
||||
{
|
||||
c = this.reader.ReadOrFail("Unexpected end of text while reading string");
|
||||
if (c < ' ')
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (c == '"')
|
||||
{
|
||||
goto Block_2;
|
||||
}
|
||||
if (c == '\\')
|
||||
{
|
||||
c = this.ReadEscapedCharacter();
|
||||
}
|
||||
if (flag != char.IsLowSurrogate(c))
|
||||
{
|
||||
goto Block_5;
|
||||
}
|
||||
flag = char.IsHighSurrogate(c);
|
||||
stringBuilder.Append(c);
|
||||
}
|
||||
throw this.reader.CreateException(string.Format(CultureInfo.InvariantCulture, "Invalid character in string literal: U+{0:x4}", new object[] { (int)c }));
|
||||
Block_2:
|
||||
if (flag)
|
||||
{
|
||||
throw this.reader.CreateException("Invalid use of surrogate pair code units");
|
||||
}
|
||||
return stringBuilder.ToString();
|
||||
Block_5:
|
||||
throw this.reader.CreateException("Invalid use of surrogate pair code units");
|
||||
}
|
||||
|
||||
// Token: 0x060006C9 RID: 1737 RVA: 0x00016CA4 File Offset: 0x00014EA4
|
||||
private char ReadEscapedCharacter()
|
||||
{
|
||||
char c = this.reader.ReadOrFail("Unexpected end of text while reading character escape sequence");
|
||||
if (c <= '\\')
|
||||
{
|
||||
if (c == '"')
|
||||
{
|
||||
return '"';
|
||||
}
|
||||
if (c == '/')
|
||||
{
|
||||
return '/';
|
||||
}
|
||||
if (c == '\\')
|
||||
{
|
||||
return '\\';
|
||||
}
|
||||
}
|
||||
else if (c <= 'f')
|
||||
{
|
||||
if (c == 'b')
|
||||
{
|
||||
return '\b';
|
||||
}
|
||||
if (c == 'f')
|
||||
{
|
||||
return '\f';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (c == 'n')
|
||||
{
|
||||
return '\n';
|
||||
}
|
||||
switch (c)
|
||||
{
|
||||
case 'r':
|
||||
return '\r';
|
||||
case 't':
|
||||
return '\t';
|
||||
case 'u':
|
||||
return this.ReadUnicodeEscape();
|
||||
}
|
||||
}
|
||||
throw this.reader.CreateException(string.Format(CultureInfo.InvariantCulture, "Invalid character in character escape sequence: U+{0:x4}", new object[] { (int)c }));
|
||||
}
|
||||
|
||||
// Token: 0x060006CA RID: 1738 RVA: 0x00016D50 File Offset: 0x00014F50
|
||||
private char ReadUnicodeEscape()
|
||||
{
|
||||
int num = 0;
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
char c = this.reader.ReadOrFail("Unexpected end of text while reading Unicode escape sequence");
|
||||
int num2;
|
||||
if (c >= '0' && c <= '9')
|
||||
{
|
||||
num2 = (int)(c - '0');
|
||||
}
|
||||
else if (c >= 'a' && c <= 'f')
|
||||
{
|
||||
num2 = (int)(c - 'a' + '\n');
|
||||
}
|
||||
else
|
||||
{
|
||||
if (c < 'A' || c > 'F')
|
||||
{
|
||||
throw this.reader.CreateException(string.Format(CultureInfo.InvariantCulture, "Invalid character in character escape sequence: U+{0:x4}", new object[] { (int)c }));
|
||||
}
|
||||
num2 = (int)(c - 'A' + '\n');
|
||||
}
|
||||
num = (num << 4) + num2;
|
||||
}
|
||||
return (char)num;
|
||||
}
|
||||
|
||||
// Token: 0x060006CB RID: 1739 RVA: 0x00016DEC File Offset: 0x00014FEC
|
||||
private void ConsumeLiteral(string text)
|
||||
{
|
||||
for (int i = 1; i < text.Length; i++)
|
||||
{
|
||||
char? c = this.reader.Read();
|
||||
if (c == null)
|
||||
{
|
||||
throw this.reader.CreateException("Unexpected end of text while reading literal token " + text);
|
||||
}
|
||||
if (c.Value != text[i])
|
||||
{
|
||||
throw this.reader.CreateException("Unexpected character while reading literal token " + text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060006CC RID: 1740 RVA: 0x00016E60 File Offset: 0x00015060
|
||||
private double ReadNumber(char initialCharacter)
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
if (initialCharacter == '-')
|
||||
{
|
||||
stringBuilder.Append("-");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.reader.PushBack(initialCharacter);
|
||||
}
|
||||
char? c = this.ReadInt(stringBuilder);
|
||||
char? c2 = c;
|
||||
if (((c2 != null) ? new int?((int)c2.GetValueOrDefault()) : null) == 46)
|
||||
{
|
||||
c = this.ReadFrac(stringBuilder);
|
||||
}
|
||||
c2 = c;
|
||||
if (!(((c2 != null) ? new int?((int)c2.GetValueOrDefault()) : null) == 101))
|
||||
{
|
||||
c2 = c;
|
||||
if (!(((c2 != null) ? new int?((int)c2.GetValueOrDefault()) : null) == 69))
|
||||
{
|
||||
goto IL_F7;
|
||||
}
|
||||
}
|
||||
c = this.ReadExp(stringBuilder);
|
||||
IL_F7:
|
||||
if (c != null)
|
||||
{
|
||||
this.reader.PushBack(c.Value);
|
||||
}
|
||||
double num;
|
||||
try
|
||||
{
|
||||
num = double.Parse(stringBuilder.ToString(), NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent, CultureInfo.InvariantCulture);
|
||||
}
|
||||
catch (OverflowException)
|
||||
{
|
||||
throw this.reader.CreateException("Numeric value out of range: " + stringBuilder);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x060006CD RID: 1741 RVA: 0x00016FC4 File Offset: 0x000151C4
|
||||
private char? ReadInt(StringBuilder builder)
|
||||
{
|
||||
char c = this.reader.ReadOrFail("Invalid numeric literal");
|
||||
if (c < '0' || c > '9')
|
||||
{
|
||||
throw this.reader.CreateException("Invalid numeric literal");
|
||||
}
|
||||
builder.Append(c);
|
||||
int num;
|
||||
char? c2 = this.ConsumeDigits(builder, out num);
|
||||
if (c == '0' && num != 0)
|
||||
{
|
||||
throw this.reader.CreateException("Invalid numeric literal: leading 0 for non-zero value.");
|
||||
}
|
||||
return c2;
|
||||
}
|
||||
|
||||
// Token: 0x060006CE RID: 1742 RVA: 0x00017028 File Offset: 0x00015228
|
||||
private char? ReadFrac(StringBuilder builder)
|
||||
{
|
||||
builder.Append('.');
|
||||
int num;
|
||||
char? c = this.ConsumeDigits(builder, out num);
|
||||
if (num == 0)
|
||||
{
|
||||
throw this.reader.CreateException("Invalid numeric literal: fraction with no trailing digits");
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
// Token: 0x060006CF RID: 1743 RVA: 0x0001705C File Offset: 0x0001525C
|
||||
private char? ReadExp(StringBuilder builder)
|
||||
{
|
||||
builder.Append('E');
|
||||
char? c = this.reader.Read();
|
||||
if (c == null)
|
||||
{
|
||||
throw this.reader.CreateException("Invalid numeric literal: exponent with no trailing digits");
|
||||
}
|
||||
char? c2 = c;
|
||||
if (!(((c2 != null) ? new int?((int)c2.GetValueOrDefault()) : null) == 45))
|
||||
{
|
||||
c2 = c;
|
||||
if (!(((c2 != null) ? new int?((int)c2.GetValueOrDefault()) : null) == 43))
|
||||
{
|
||||
this.reader.PushBack(c.Value);
|
||||
goto IL_CD;
|
||||
}
|
||||
}
|
||||
builder.Append(c.Value);
|
||||
IL_CD:
|
||||
int num;
|
||||
c = this.ConsumeDigits(builder, out num);
|
||||
if (num == 0)
|
||||
{
|
||||
throw this.reader.CreateException("Invalid numeric literal: exponent without value");
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
// Token: 0x060006D0 RID: 1744 RVA: 0x00017158 File Offset: 0x00015358
|
||||
private char? ConsumeDigits(StringBuilder builder, out int count)
|
||||
{
|
||||
count = 0;
|
||||
char? c;
|
||||
for (;;)
|
||||
{
|
||||
c = this.reader.Read();
|
||||
if (c == null || c.Value < '0' || c.Value > '9')
|
||||
{
|
||||
break;
|
||||
}
|
||||
count++;
|
||||
builder.Append(c.Value);
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
// Token: 0x060006D1 RID: 1745 RVA: 0x000171AC File Offset: 0x000153AC
|
||||
private void ValidateAndModifyStateForValue(string errorPrefix)
|
||||
{
|
||||
this.ValidateState(JsonTokenizer.JsonTextTokenizer.ValueStates, errorPrefix);
|
||||
JsonTokenizer.JsonTextTokenizer.State state = this.state;
|
||||
if (state <= JsonTokenizer.JsonTextTokenizer.State.ObjectAfterColon)
|
||||
{
|
||||
if (state == JsonTokenizer.JsonTextTokenizer.State.StartOfDocument)
|
||||
{
|
||||
this.state = JsonTokenizer.JsonTextTokenizer.State.ExpectedEndOfDocument;
|
||||
return;
|
||||
}
|
||||
if (state == JsonTokenizer.JsonTextTokenizer.State.ObjectAfterColon)
|
||||
{
|
||||
this.state = JsonTokenizer.JsonTextTokenizer.State.ObjectAfterProperty;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (state == JsonTokenizer.JsonTextTokenizer.State.ArrayStart || state == JsonTokenizer.JsonTextTokenizer.State.ArrayAfterComma)
|
||||
{
|
||||
this.state = JsonTokenizer.JsonTextTokenizer.State.ArrayAfterValue;
|
||||
return;
|
||||
}
|
||||
throw new InvalidOperationException("ValidateAndModifyStateForValue does not handle all value states (and should)");
|
||||
}
|
||||
|
||||
// Token: 0x060006D2 RID: 1746 RVA: 0x00017218 File Offset: 0x00015418
|
||||
private void PopContainer()
|
||||
{
|
||||
this.containerStack.Pop();
|
||||
JsonTokenizer.JsonTextTokenizer.ContainerType containerType = this.containerStack.Peek();
|
||||
switch (containerType)
|
||||
{
|
||||
case JsonTokenizer.JsonTextTokenizer.ContainerType.Document:
|
||||
this.state = JsonTokenizer.JsonTextTokenizer.State.ExpectedEndOfDocument;
|
||||
return;
|
||||
case JsonTokenizer.JsonTextTokenizer.ContainerType.Object:
|
||||
this.state = JsonTokenizer.JsonTextTokenizer.State.ObjectAfterProperty;
|
||||
return;
|
||||
case JsonTokenizer.JsonTextTokenizer.ContainerType.Array:
|
||||
this.state = JsonTokenizer.JsonTextTokenizer.State.ArrayAfterValue;
|
||||
return;
|
||||
default:
|
||||
throw new InvalidOperationException("Unexpected container type: " + containerType);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040002AE RID: 686
|
||||
private static readonly JsonTokenizer.JsonTextTokenizer.State ValueStates = JsonTokenizer.JsonTextTokenizer.State.StartOfDocument | JsonTokenizer.JsonTextTokenizer.State.ObjectAfterColon | JsonTokenizer.JsonTextTokenizer.State.ArrayStart | JsonTokenizer.JsonTextTokenizer.State.ArrayAfterComma;
|
||||
|
||||
// Token: 0x040002AF RID: 687
|
||||
private readonly Stack<JsonTokenizer.JsonTextTokenizer.ContainerType> containerStack = new Stack<JsonTokenizer.JsonTextTokenizer.ContainerType>();
|
||||
|
||||
// Token: 0x040002B0 RID: 688
|
||||
private readonly JsonTokenizer.JsonTextTokenizer.PushBackReader reader;
|
||||
|
||||
// Token: 0x040002B1 RID: 689
|
||||
private JsonTokenizer.JsonTextTokenizer.State state;
|
||||
|
||||
// Token: 0x020000D0 RID: 208
|
||||
private enum ContainerType
|
||||
{
|
||||
// Token: 0x0400031A RID: 794
|
||||
Document,
|
||||
// Token: 0x0400031B RID: 795
|
||||
Object,
|
||||
// Token: 0x0400031C RID: 796
|
||||
Array
|
||||
}
|
||||
|
||||
// Token: 0x020000D1 RID: 209
|
||||
[Flags]
|
||||
private enum State
|
||||
{
|
||||
// Token: 0x0400031E RID: 798
|
||||
StartOfDocument = 1,
|
||||
// Token: 0x0400031F RID: 799
|
||||
ExpectedEndOfDocument = 2,
|
||||
// Token: 0x04000320 RID: 800
|
||||
ReaderExhausted = 4,
|
||||
// Token: 0x04000321 RID: 801
|
||||
ObjectStart = 8,
|
||||
// Token: 0x04000322 RID: 802
|
||||
ObjectBeforeColon = 16,
|
||||
// Token: 0x04000323 RID: 803
|
||||
ObjectAfterColon = 32,
|
||||
// Token: 0x04000324 RID: 804
|
||||
ObjectAfterProperty = 64,
|
||||
// Token: 0x04000325 RID: 805
|
||||
ObjectAfterComma = 128,
|
||||
// Token: 0x04000326 RID: 806
|
||||
ArrayStart = 256,
|
||||
// Token: 0x04000327 RID: 807
|
||||
ArrayAfterValue = 512,
|
||||
// Token: 0x04000328 RID: 808
|
||||
ArrayAfterComma = 1024
|
||||
}
|
||||
|
||||
// Token: 0x020000D2 RID: 210
|
||||
private class PushBackReader
|
||||
{
|
||||
// Token: 0x060007AE RID: 1966 RVA: 0x00017CA7 File Offset: 0x00015EA7
|
||||
internal PushBackReader(TextReader reader)
|
||||
{
|
||||
this.reader = reader;
|
||||
}
|
||||
|
||||
// Token: 0x060007AF RID: 1967 RVA: 0x00017CB8 File Offset: 0x00015EB8
|
||||
internal char? Read()
|
||||
{
|
||||
if (this.nextChar != null)
|
||||
{
|
||||
char? c = this.nextChar;
|
||||
this.nextChar = null;
|
||||
return c;
|
||||
}
|
||||
int num = this.reader.Read();
|
||||
if (num != -1)
|
||||
{
|
||||
return new char?((char)num);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// Token: 0x060007B0 RID: 1968 RVA: 0x00017D08 File Offset: 0x00015F08
|
||||
internal char ReadOrFail(string messageOnFailure)
|
||||
{
|
||||
char? c = this.Read();
|
||||
if (c == null)
|
||||
{
|
||||
throw this.CreateException(messageOnFailure);
|
||||
}
|
||||
return c.Value;
|
||||
}
|
||||
|
||||
// Token: 0x060007B1 RID: 1969 RVA: 0x00017D34 File Offset: 0x00015F34
|
||||
internal void PushBack(char c)
|
||||
{
|
||||
if (this.nextChar != null)
|
||||
{
|
||||
throw new InvalidOperationException("Cannot push back when already buffering a character");
|
||||
}
|
||||
this.nextChar = new char?(c);
|
||||
}
|
||||
|
||||
// Token: 0x060007B2 RID: 1970 RVA: 0x00017D5A File Offset: 0x00015F5A
|
||||
internal InvalidJsonException CreateException(string message)
|
||||
{
|
||||
return new InvalidJsonException(message);
|
||||
}
|
||||
|
||||
// Token: 0x04000329 RID: 809
|
||||
private readonly TextReader reader;
|
||||
|
||||
// Token: 0x0400032A RID: 810
|
||||
private char? nextChar;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Google.Protobuf
|
||||
{
|
||||
// Token: 0x02000013 RID: 19
|
||||
internal sealed class LimitedInputStream : Stream
|
||||
{
|
||||
// Token: 0x06000129 RID: 297 RVA: 0x00007609 File Offset: 0x00005809
|
||||
internal LimitedInputStream(Stream proxied, int size)
|
||||
{
|
||||
this.proxied = proxied;
|
||||
this.bytesLeft = size;
|
||||
}
|
||||
|
||||
// Token: 0x17000024 RID: 36
|
||||
// (get) Token: 0x0600012A RID: 298 RVA: 0x0000324B File Offset: 0x0000144B
|
||||
public override bool CanRead
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000025 RID: 37
|
||||
// (get) Token: 0x0600012B RID: 299 RVA: 0x0000761F File Offset: 0x0000581F
|
||||
public override bool CanSeek
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000026 RID: 38
|
||||
// (get) Token: 0x0600012C RID: 300 RVA: 0x0000761F File Offset: 0x0000581F
|
||||
public override bool CanWrite
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600012D RID: 301 RVA: 0x00007622 File Offset: 0x00005822
|
||||
public override void Flush()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x17000027 RID: 39
|
||||
// (get) Token: 0x0600012E RID: 302 RVA: 0x00007624 File Offset: 0x00005824
|
||||
public override long Length
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000028 RID: 40
|
||||
// (get) Token: 0x0600012F RID: 303 RVA: 0x00007624 File Offset: 0x00005824
|
||||
// (set) Token: 0x06000130 RID: 304 RVA: 0x00007624 File Offset: 0x00005824
|
||||
public override long Position
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000131 RID: 305 RVA: 0x0000762C File Offset: 0x0000582C
|
||||
public override int Read(byte[] buffer, int offset, int count)
|
||||
{
|
||||
if (this.bytesLeft > 0)
|
||||
{
|
||||
int num = this.proxied.Read(buffer, offset, Math.Min(this.bytesLeft, count));
|
||||
this.bytesLeft -= num;
|
||||
return num;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Token: 0x06000132 RID: 306 RVA: 0x00007624 File Offset: 0x00005824
|
||||
public override long Seek(long offset, SeekOrigin origin)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x06000133 RID: 307 RVA: 0x00007624 File Offset: 0x00005824
|
||||
public override void SetLength(long value)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x06000134 RID: 308 RVA: 0x00007624 File Offset: 0x00005824
|
||||
public override void Write(byte[] buffer, int offset, int count)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x04000048 RID: 72
|
||||
private readonly Stream proxied;
|
||||
|
||||
// Token: 0x04000049 RID: 73
|
||||
private int bytesLeft;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Google.Protobuf
|
||||
{
|
||||
// Token: 0x02000014 RID: 20
|
||||
public static class MessageExtensions
|
||||
{
|
||||
// Token: 0x06000135 RID: 309 RVA: 0x00007670 File Offset: 0x00005870
|
||||
public static void MergeFrom(this IMessage message, byte[] data)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<IMessage>(message, "message");
|
||||
ProtoPreconditions.CheckNotNull<byte[]>(data, "data");
|
||||
CodedInputStream codedInputStream = new CodedInputStream(data);
|
||||
message.MergeFrom(codedInputStream);
|
||||
codedInputStream.CheckReadEndOfStreamTag();
|
||||
}
|
||||
|
||||
// Token: 0x06000136 RID: 310 RVA: 0x000076AC File Offset: 0x000058AC
|
||||
public static void MergeFrom(this IMessage message, ByteString data)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<IMessage>(message, "message");
|
||||
ProtoPreconditions.CheckNotNull<ByteString>(data, "data");
|
||||
CodedInputStream codedInputStream = data.CreateCodedInput();
|
||||
message.MergeFrom(codedInputStream);
|
||||
codedInputStream.CheckReadEndOfStreamTag();
|
||||
}
|
||||
|
||||
// Token: 0x06000137 RID: 311 RVA: 0x000076E8 File Offset: 0x000058E8
|
||||
public static void MergeFrom(this IMessage message, Stream input)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<IMessage>(message, "message");
|
||||
ProtoPreconditions.CheckNotNull<Stream>(input, "input");
|
||||
CodedInputStream codedInputStream = new CodedInputStream(input);
|
||||
message.MergeFrom(codedInputStream);
|
||||
codedInputStream.CheckReadEndOfStreamTag();
|
||||
}
|
||||
|
||||
// Token: 0x06000138 RID: 312 RVA: 0x00007724 File Offset: 0x00005924
|
||||
public static void MergeDelimitedFrom(this IMessage message, Stream input)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<IMessage>(message, "message");
|
||||
ProtoPreconditions.CheckNotNull<Stream>(input, "input");
|
||||
int num = (int)CodedInputStream.ReadRawVarint32(input);
|
||||
Stream stream = new LimitedInputStream(input, num);
|
||||
message.MergeFrom(stream);
|
||||
}
|
||||
|
||||
// Token: 0x06000139 RID: 313 RVA: 0x00007760 File Offset: 0x00005960
|
||||
public static byte[] ToByteArray(this IMessage message)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<IMessage>(message, "message");
|
||||
byte[] array = new byte[message.CalculateSize()];
|
||||
CodedOutputStream codedOutputStream = new CodedOutputStream(array);
|
||||
message.WriteTo(codedOutputStream);
|
||||
codedOutputStream.CheckNoSpaceLeft();
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600013A RID: 314 RVA: 0x00007798 File Offset: 0x00005998
|
||||
public static void WriteTo(this IMessage message, Stream output)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<IMessage>(message, "message");
|
||||
ProtoPreconditions.CheckNotNull<Stream>(output, "output");
|
||||
CodedOutputStream codedOutputStream = new CodedOutputStream(output);
|
||||
message.WriteTo(codedOutputStream);
|
||||
codedOutputStream.Flush();
|
||||
}
|
||||
|
||||
// Token: 0x0600013B RID: 315 RVA: 0x000077D4 File Offset: 0x000059D4
|
||||
public static void WriteDelimitedTo(this IMessage message, Stream output)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<IMessage>(message, "message");
|
||||
ProtoPreconditions.CheckNotNull<Stream>(output, "output");
|
||||
CodedOutputStream codedOutputStream = new CodedOutputStream(output);
|
||||
codedOutputStream.WriteRawVarint32((uint)message.CalculateSize());
|
||||
message.WriteTo(codedOutputStream);
|
||||
codedOutputStream.Flush();
|
||||
}
|
||||
|
||||
// Token: 0x0600013C RID: 316 RVA: 0x00007819 File Offset: 0x00005A19
|
||||
public static ByteString ToByteString(this IMessage message)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<IMessage>(message, "message");
|
||||
return ByteString.AttachBytes(message.ToByteArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Google.Protobuf
|
||||
{
|
||||
// Token: 0x02000016 RID: 22
|
||||
public sealed class MessageParser<T> : MessageParser where T : IMessage<T>
|
||||
{
|
||||
// Token: 0x06000145 RID: 325 RVA: 0x000078F4 File Offset: 0x00005AF4
|
||||
public MessageParser(Func<T> factory)
|
||||
: base(() => factory())
|
||||
{
|
||||
this.factory = factory;
|
||||
}
|
||||
|
||||
// Token: 0x06000146 RID: 326 RVA: 0x0000792C File Offset: 0x00005B2C
|
||||
internal new T CreateTemplate()
|
||||
{
|
||||
return this.factory();
|
||||
}
|
||||
|
||||
// Token: 0x06000147 RID: 327 RVA: 0x00007939 File Offset: 0x00005B39
|
||||
public new T ParseFrom(byte[] data)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<byte[]>(data, "data");
|
||||
T t = this.factory();
|
||||
t.MergeFrom(data);
|
||||
return t;
|
||||
}
|
||||
|
||||
// Token: 0x06000148 RID: 328 RVA: 0x0000795E File Offset: 0x00005B5E
|
||||
public new T ParseFrom(ByteString data)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<ByteString>(data, "data");
|
||||
T t = this.factory();
|
||||
t.MergeFrom(data);
|
||||
return t;
|
||||
}
|
||||
|
||||
// Token: 0x06000149 RID: 329 RVA: 0x00007983 File Offset: 0x00005B83
|
||||
public new T ParseFrom(Stream input)
|
||||
{
|
||||
T t = this.factory();
|
||||
t.MergeFrom(input);
|
||||
return t;
|
||||
}
|
||||
|
||||
// Token: 0x0600014A RID: 330 RVA: 0x0000799C File Offset: 0x00005B9C
|
||||
public new T ParseDelimitedFrom(Stream input)
|
||||
{
|
||||
T t = this.factory();
|
||||
t.MergeDelimitedFrom(input);
|
||||
return t;
|
||||
}
|
||||
|
||||
// Token: 0x0600014B RID: 331 RVA: 0x000079B8 File Offset: 0x00005BB8
|
||||
public new T ParseFrom(CodedInputStream input)
|
||||
{
|
||||
T t = this.factory();
|
||||
t.MergeFrom(input);
|
||||
return t;
|
||||
}
|
||||
|
||||
// Token: 0x0600014C RID: 332 RVA: 0x000079E0 File Offset: 0x00005BE0
|
||||
public new T ParseJson(string json)
|
||||
{
|
||||
T t = this.factory();
|
||||
JsonParser.Default.Merge(t, json);
|
||||
return t;
|
||||
}
|
||||
|
||||
// Token: 0x0400004B RID: 75
|
||||
private readonly Func<T> factory;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Google.Protobuf
|
||||
{
|
||||
// Token: 0x02000015 RID: 21
|
||||
public class MessageParser
|
||||
{
|
||||
// Token: 0x0600013D RID: 317 RVA: 0x00007832 File Offset: 0x00005A32
|
||||
internal MessageParser(Func<IMessage> factory)
|
||||
{
|
||||
this.factory = factory;
|
||||
}
|
||||
|
||||
// Token: 0x0600013E RID: 318 RVA: 0x00007841 File Offset: 0x00005A41
|
||||
internal IMessage CreateTemplate()
|
||||
{
|
||||
return this.factory();
|
||||
}
|
||||
|
||||
// Token: 0x0600013F RID: 319 RVA: 0x0000784E File Offset: 0x00005A4E
|
||||
public IMessage ParseFrom(byte[] data)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<byte[]>(data, "data");
|
||||
IMessage message = this.factory();
|
||||
message.MergeFrom(data);
|
||||
return message;
|
||||
}
|
||||
|
||||
// Token: 0x06000140 RID: 320 RVA: 0x0000786E File Offset: 0x00005A6E
|
||||
public IMessage ParseFrom(ByteString data)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<ByteString>(data, "data");
|
||||
IMessage message = this.factory();
|
||||
message.MergeFrom(data);
|
||||
return message;
|
||||
}
|
||||
|
||||
// Token: 0x06000141 RID: 321 RVA: 0x0000788E File Offset: 0x00005A8E
|
||||
public IMessage ParseFrom(Stream input)
|
||||
{
|
||||
IMessage message = this.factory();
|
||||
message.MergeFrom(input);
|
||||
return message;
|
||||
}
|
||||
|
||||
// Token: 0x06000142 RID: 322 RVA: 0x000078A2 File Offset: 0x00005AA2
|
||||
public IMessage ParseDelimitedFrom(Stream input)
|
||||
{
|
||||
IMessage message = this.factory();
|
||||
message.MergeDelimitedFrom(input);
|
||||
return message;
|
||||
}
|
||||
|
||||
// Token: 0x06000143 RID: 323 RVA: 0x000078B6 File Offset: 0x00005AB6
|
||||
public IMessage ParseFrom(CodedInputStream input)
|
||||
{
|
||||
IMessage message = this.factory();
|
||||
message.MergeFrom(input);
|
||||
return message;
|
||||
}
|
||||
|
||||
// Token: 0x06000144 RID: 324 RVA: 0x000078CC File Offset: 0x00005ACC
|
||||
public IMessage ParseJson(string json)
|
||||
{
|
||||
IMessage message = this.factory();
|
||||
JsonParser.Default.Merge(message, json);
|
||||
return message;
|
||||
}
|
||||
|
||||
// Token: 0x0400004A RID: 74
|
||||
private Func<IMessage> factory;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyVersion("3.1.0.0")]
|
||||
[assembly: AssemblyTitle("protobuf3")]
|
||||
[assembly: AssemblyDescription("Protocol Buffers 3 implementation for C#")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Google")]
|
||||
[assembly: AssemblyProduct("Google.Protobuf")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: Guid("9f9d77b8-fa5e-4f1a-b3e7-03442b8ea892")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
|
||||
namespace Google.Protobuf
|
||||
{
|
||||
// Token: 0x02000017 RID: 23
|
||||
public static class ProtoPreconditions
|
||||
{
|
||||
// Token: 0x0600014D RID: 333 RVA: 0x00007A0B File Offset: 0x00005C0B
|
||||
public static T CheckNotNull<T>(T value, string name) where T : class
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
throw new ArgumentNullException(name);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
// Token: 0x0600014E RID: 334 RVA: 0x00007A1D File Offset: 0x00005C1D
|
||||
internal static T CheckNotNullUnconstrained<T>(T value, string name)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
throw new ArgumentNullException(name);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000055 RID: 85
|
||||
public abstract class DescriptorBase : IDescriptor
|
||||
{
|
||||
// Token: 0x0600055F RID: 1375 RVA: 0x00013384 File Offset: 0x00011584
|
||||
internal DescriptorBase(FileDescriptor file, string fullName, int index)
|
||||
{
|
||||
this.file = file;
|
||||
this.fullName = fullName;
|
||||
this.index = index;
|
||||
}
|
||||
|
||||
// Token: 0x17000162 RID: 354
|
||||
// (get) Token: 0x06000560 RID: 1376 RVA: 0x000133A1 File Offset: 0x000115A1
|
||||
public int Index
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.index;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000163 RID: 355
|
||||
// (get) Token: 0x06000561 RID: 1377
|
||||
public abstract string Name { get; }
|
||||
|
||||
// Token: 0x17000164 RID: 356
|
||||
// (get) Token: 0x06000562 RID: 1378 RVA: 0x000133A9 File Offset: 0x000115A9
|
||||
public string FullName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.fullName;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000165 RID: 357
|
||||
// (get) Token: 0x06000563 RID: 1379 RVA: 0x000133B1 File Offset: 0x000115B1
|
||||
public FileDescriptor File
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.file;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000206 RID: 518
|
||||
private readonly FileDescriptor file;
|
||||
|
||||
// Token: 0x04000207 RID: 519
|
||||
private readonly string fullName;
|
||||
|
||||
// Token: 0x04000208 RID: 520
|
||||
private readonly int index;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,291 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000056 RID: 86
|
||||
internal sealed class DescriptorPool
|
||||
{
|
||||
// Token: 0x06000564 RID: 1380 RVA: 0x000133BC File Offset: 0x000115BC
|
||||
internal DescriptorPool(FileDescriptor[] dependencyFiles)
|
||||
{
|
||||
this.dependencies = new HashSet<FileDescriptor>();
|
||||
for (int i = 0; i < dependencyFiles.Length; i++)
|
||||
{
|
||||
this.dependencies.Add(dependencyFiles[i]);
|
||||
this.ImportPublicDependencies(dependencyFiles[i]);
|
||||
}
|
||||
foreach (FileDescriptor fileDescriptor in dependencyFiles)
|
||||
{
|
||||
this.AddPackage(fileDescriptor.Package, fileDescriptor);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000565 RID: 1381 RVA: 0x00013444 File Offset: 0x00011644
|
||||
private void ImportPublicDependencies(FileDescriptor file)
|
||||
{
|
||||
foreach (FileDescriptor fileDescriptor in file.PublicDependencies)
|
||||
{
|
||||
if (this.dependencies.Add(fileDescriptor))
|
||||
{
|
||||
this.ImportPublicDependencies(fileDescriptor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000566 RID: 1382 RVA: 0x000134A0 File Offset: 0x000116A0
|
||||
internal T FindSymbol<T>(string fullName) where T : class
|
||||
{
|
||||
IDescriptor descriptor;
|
||||
this.descriptorsByName.TryGetValue(fullName, out descriptor);
|
||||
T t = descriptor as T;
|
||||
if (t != null)
|
||||
{
|
||||
return t;
|
||||
}
|
||||
foreach (FileDescriptor fileDescriptor in this.dependencies)
|
||||
{
|
||||
fileDescriptor.DescriptorPool.descriptorsByName.TryGetValue(fullName, out descriptor);
|
||||
t = descriptor as T;
|
||||
if (t != null)
|
||||
{
|
||||
return t;
|
||||
}
|
||||
}
|
||||
return default(T);
|
||||
}
|
||||
|
||||
// Token: 0x06000567 RID: 1383 RVA: 0x00013548 File Offset: 0x00011748
|
||||
internal void AddPackage(string fullName, FileDescriptor file)
|
||||
{
|
||||
int num = fullName.LastIndexOf('.');
|
||||
string text;
|
||||
if (num != -1)
|
||||
{
|
||||
this.AddPackage(fullName.Substring(0, num), file);
|
||||
text = fullName.Substring(num + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
text = fullName;
|
||||
}
|
||||
IDescriptor descriptor;
|
||||
if (this.descriptorsByName.TryGetValue(fullName, out descriptor) && !(descriptor is PackageDescriptor))
|
||||
{
|
||||
throw new DescriptorValidationException(file, string.Concat(new string[]
|
||||
{
|
||||
"\"",
|
||||
text,
|
||||
"\" is already defined (as something other than a package) in file \"",
|
||||
descriptor.File.Name,
|
||||
"\"."
|
||||
}));
|
||||
}
|
||||
this.descriptorsByName[fullName] = new PackageDescriptor(text, fullName, file);
|
||||
}
|
||||
|
||||
// Token: 0x06000568 RID: 1384 RVA: 0x000135E8 File Offset: 0x000117E8
|
||||
internal void AddSymbol(IDescriptor descriptor)
|
||||
{
|
||||
DescriptorPool.ValidateSymbolName(descriptor);
|
||||
string fullName = descriptor.FullName;
|
||||
IDescriptor descriptor2;
|
||||
if (this.descriptorsByName.TryGetValue(fullName, out descriptor2))
|
||||
{
|
||||
int num = fullName.LastIndexOf('.');
|
||||
string text;
|
||||
if (descriptor.File == descriptor2.File)
|
||||
{
|
||||
if (num == -1)
|
||||
{
|
||||
text = "\"" + fullName + "\" is already defined.";
|
||||
}
|
||||
else
|
||||
{
|
||||
text = string.Concat(new string[]
|
||||
{
|
||||
"\"",
|
||||
fullName.Substring(num + 1),
|
||||
"\" is already defined in \"",
|
||||
fullName.Substring(0, num),
|
||||
"\"."
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
text = string.Concat(new string[]
|
||||
{
|
||||
"\"",
|
||||
fullName,
|
||||
"\" is already defined in file \"",
|
||||
descriptor2.File.Name,
|
||||
"\"."
|
||||
});
|
||||
}
|
||||
throw new DescriptorValidationException(descriptor, text);
|
||||
}
|
||||
this.descriptorsByName[fullName] = descriptor;
|
||||
}
|
||||
|
||||
// Token: 0x06000569 RID: 1385 RVA: 0x000136CC File Offset: 0x000118CC
|
||||
private static void ValidateSymbolName(IDescriptor descriptor)
|
||||
{
|
||||
if (descriptor.Name == "")
|
||||
{
|
||||
throw new DescriptorValidationException(descriptor, "Missing name.");
|
||||
}
|
||||
if (!DescriptorPool.ValidationRegex.IsMatch(descriptor.Name))
|
||||
{
|
||||
throw new DescriptorValidationException(descriptor, "\"" + descriptor.Name + "\" is not a valid identifier.");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600056A RID: 1386 RVA: 0x00013728 File Offset: 0x00011928
|
||||
internal FieldDescriptor FindFieldByNumber(MessageDescriptor messageDescriptor, int number)
|
||||
{
|
||||
FieldDescriptor fieldDescriptor;
|
||||
this.fieldsByNumber.TryGetValue(new DescriptorPool.DescriptorIntPair(messageDescriptor, number), out fieldDescriptor);
|
||||
return fieldDescriptor;
|
||||
}
|
||||
|
||||
// Token: 0x0600056B RID: 1387 RVA: 0x0001374C File Offset: 0x0001194C
|
||||
internal EnumValueDescriptor FindEnumValueByNumber(EnumDescriptor enumDescriptor, int number)
|
||||
{
|
||||
EnumValueDescriptor enumValueDescriptor;
|
||||
this.enumValuesByNumber.TryGetValue(new DescriptorPool.DescriptorIntPair(enumDescriptor, number), out enumValueDescriptor);
|
||||
return enumValueDescriptor;
|
||||
}
|
||||
|
||||
// Token: 0x0600056C RID: 1388 RVA: 0x00013770 File Offset: 0x00011970
|
||||
internal void AddFieldByNumber(FieldDescriptor field)
|
||||
{
|
||||
DescriptorPool.DescriptorIntPair descriptorIntPair = new DescriptorPool.DescriptorIntPair(field.ContainingType, field.FieldNumber);
|
||||
FieldDescriptor fieldDescriptor;
|
||||
if (this.fieldsByNumber.TryGetValue(descriptorIntPair, out fieldDescriptor))
|
||||
{
|
||||
throw new DescriptorValidationException(field, string.Concat(new object[]
|
||||
{
|
||||
"Field number ",
|
||||
field.FieldNumber,
|
||||
"has already been used in \"",
|
||||
field.ContainingType.FullName,
|
||||
"\" by field \"",
|
||||
fieldDescriptor.Name,
|
||||
"\"."
|
||||
}));
|
||||
}
|
||||
this.fieldsByNumber[descriptorIntPair] = field;
|
||||
}
|
||||
|
||||
// Token: 0x0600056D RID: 1389 RVA: 0x00013804 File Offset: 0x00011A04
|
||||
internal void AddEnumValueByNumber(EnumValueDescriptor enumValue)
|
||||
{
|
||||
DescriptorPool.DescriptorIntPair descriptorIntPair = new DescriptorPool.DescriptorIntPair(enumValue.EnumDescriptor, enumValue.Number);
|
||||
if (!this.enumValuesByNumber.ContainsKey(descriptorIntPair))
|
||||
{
|
||||
this.enumValuesByNumber[descriptorIntPair] = enumValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600056E RID: 1390 RVA: 0x00013840 File Offset: 0x00011A40
|
||||
internal IDescriptor LookupSymbol(string name, IDescriptor relativeTo)
|
||||
{
|
||||
IDescriptor descriptor;
|
||||
if (name.StartsWith("."))
|
||||
{
|
||||
descriptor = this.FindSymbol<IDescriptor>(name.Substring(1));
|
||||
}
|
||||
else
|
||||
{
|
||||
int num = name.IndexOf('.');
|
||||
string text = ((num == -1) ? name : name.Substring(0, num));
|
||||
StringBuilder stringBuilder = new StringBuilder(relativeTo.FullName);
|
||||
for (;;)
|
||||
{
|
||||
int num2 = stringBuilder.ToString().LastIndexOf(".");
|
||||
if (num2 == -1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
stringBuilder.Length = num2 + 1;
|
||||
stringBuilder.Append(text);
|
||||
descriptor = this.FindSymbol<IDescriptor>(stringBuilder.ToString());
|
||||
if (descriptor != null)
|
||||
{
|
||||
goto Block_4;
|
||||
}
|
||||
stringBuilder.Length = num2;
|
||||
}
|
||||
descriptor = this.FindSymbol<IDescriptor>(name);
|
||||
goto IL_B7;
|
||||
Block_4:
|
||||
if (num != -1)
|
||||
{
|
||||
int num2;
|
||||
stringBuilder.Length = num2 + 1;
|
||||
stringBuilder.Append(name);
|
||||
descriptor = this.FindSymbol<IDescriptor>(stringBuilder.ToString());
|
||||
}
|
||||
}
|
||||
IL_B7:
|
||||
if (descriptor == null)
|
||||
{
|
||||
throw new DescriptorValidationException(relativeTo, "\"" + name + "\" is not defined.");
|
||||
}
|
||||
return descriptor;
|
||||
}
|
||||
|
||||
// Token: 0x04000209 RID: 521
|
||||
private readonly IDictionary<string, IDescriptor> descriptorsByName = new Dictionary<string, IDescriptor>();
|
||||
|
||||
// Token: 0x0400020A RID: 522
|
||||
private readonly IDictionary<DescriptorPool.DescriptorIntPair, FieldDescriptor> fieldsByNumber = new Dictionary<DescriptorPool.DescriptorIntPair, FieldDescriptor>();
|
||||
|
||||
// Token: 0x0400020B RID: 523
|
||||
private readonly IDictionary<DescriptorPool.DescriptorIntPair, EnumValueDescriptor> enumValuesByNumber = new Dictionary<DescriptorPool.DescriptorIntPair, EnumValueDescriptor>();
|
||||
|
||||
// Token: 0x0400020C RID: 524
|
||||
private readonly HashSet<FileDescriptor> dependencies;
|
||||
|
||||
// Token: 0x0400020D RID: 525
|
||||
private static readonly Regex ValidationRegex = new Regex("^[_A-Za-z][_A-Za-z0-9]*$", FrameworkPortability.CompiledRegexWhereAvailable);
|
||||
|
||||
// Token: 0x020000BD RID: 189
|
||||
private struct DescriptorIntPair : IEquatable<DescriptorPool.DescriptorIntPair>
|
||||
{
|
||||
// Token: 0x06000761 RID: 1889 RVA: 0x00017616 File Offset: 0x00015816
|
||||
internal DescriptorIntPair(IDescriptor descriptor, int number)
|
||||
{
|
||||
this.number = number;
|
||||
this.descriptor = descriptor;
|
||||
}
|
||||
|
||||
// Token: 0x06000762 RID: 1890 RVA: 0x00017626 File Offset: 0x00015826
|
||||
public bool Equals(DescriptorPool.DescriptorIntPair other)
|
||||
{
|
||||
return this.descriptor == other.descriptor && this.number == other.number;
|
||||
}
|
||||
|
||||
// Token: 0x06000763 RID: 1891 RVA: 0x00017646 File Offset: 0x00015846
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is DescriptorPool.DescriptorIntPair && this.Equals((DescriptorPool.DescriptorIntPair)obj);
|
||||
}
|
||||
|
||||
// Token: 0x06000764 RID: 1892 RVA: 0x0001765E File Offset: 0x0001585E
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.descriptor.GetHashCode() * 65535 + this.number;
|
||||
}
|
||||
|
||||
// Token: 0x040002F1 RID: 753
|
||||
private readonly int number;
|
||||
|
||||
// Token: 0x040002F2 RID: 754
|
||||
private readonly IDescriptor descriptor;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,922 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Collections;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000043 RID: 67
|
||||
internal sealed class DescriptorProto : IMessage<DescriptorProto>, IMessage, IEquatable<DescriptorProto>, IDeepCloneable<DescriptorProto>
|
||||
{
|
||||
// Token: 0x170000D9 RID: 217
|
||||
// (get) Token: 0x060003BE RID: 958 RVA: 0x0000E9CB File Offset: 0x0000CBCB
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<DescriptorProto> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorProto._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000DA RID: 218
|
||||
// (get) Token: 0x060003BF RID: 959 RVA: 0x0000E9D2 File Offset: 0x0000CBD2
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorReflection.Descriptor.MessageTypes[2];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000DB RID: 219
|
||||
// (get) Token: 0x060003C0 RID: 960 RVA: 0x0000E9E4 File Offset: 0x0000CBE4
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorProto.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060003C1 RID: 961 RVA: 0x0000E9EC File Offset: 0x0000CBEC
|
||||
[DebuggerNonUserCode]
|
||||
public DescriptorProto()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060003C2 RID: 962 RVA: 0x0000EA64 File Offset: 0x0000CC64
|
||||
[DebuggerNonUserCode]
|
||||
public DescriptorProto(DescriptorProto other)
|
||||
: this()
|
||||
{
|
||||
this.name_ = other.name_;
|
||||
this.field_ = other.field_.Clone();
|
||||
this.extension_ = other.extension_.Clone();
|
||||
this.nestedType_ = other.nestedType_.Clone();
|
||||
this.enumType_ = other.enumType_.Clone();
|
||||
this.extensionRange_ = other.extensionRange_.Clone();
|
||||
this.oneofDecl_ = other.oneofDecl_.Clone();
|
||||
this.Options = ((other.options_ != null) ? other.Options.Clone() : null);
|
||||
this.reservedRange_ = other.reservedRange_.Clone();
|
||||
this.reservedName_ = other.reservedName_.Clone();
|
||||
}
|
||||
|
||||
// Token: 0x060003C3 RID: 963 RVA: 0x0000EB27 File Offset: 0x0000CD27
|
||||
[DebuggerNonUserCode]
|
||||
public DescriptorProto Clone()
|
||||
{
|
||||
return new DescriptorProto(this);
|
||||
}
|
||||
|
||||
// Token: 0x170000DC RID: 220
|
||||
// (get) Token: 0x060003C4 RID: 964 RVA: 0x0000EB2F File Offset: 0x0000CD2F
|
||||
// (set) Token: 0x060003C5 RID: 965 RVA: 0x0000EB37 File Offset: 0x0000CD37
|
||||
[DebuggerNonUserCode]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.name_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000DD RID: 221
|
||||
// (get) Token: 0x060003C6 RID: 966 RVA: 0x0000EB4A File Offset: 0x0000CD4A
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<FieldDescriptorProto> Field
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.field_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000DE RID: 222
|
||||
// (get) Token: 0x060003C7 RID: 967 RVA: 0x0000EB52 File Offset: 0x0000CD52
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<FieldDescriptorProto> Extension
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.extension_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000DF RID: 223
|
||||
// (get) Token: 0x060003C8 RID: 968 RVA: 0x0000EB5A File Offset: 0x0000CD5A
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<DescriptorProto> NestedType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.nestedType_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000E0 RID: 224
|
||||
// (get) Token: 0x060003C9 RID: 969 RVA: 0x0000EB62 File Offset: 0x0000CD62
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<EnumDescriptorProto> EnumType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.enumType_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000E1 RID: 225
|
||||
// (get) Token: 0x060003CA RID: 970 RVA: 0x0000EB6A File Offset: 0x0000CD6A
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<DescriptorProto.Types.ExtensionRange> ExtensionRange
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.extensionRange_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000E2 RID: 226
|
||||
// (get) Token: 0x060003CB RID: 971 RVA: 0x0000EB72 File Offset: 0x0000CD72
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<OneofDescriptorProto> OneofDecl
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.oneofDecl_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000E3 RID: 227
|
||||
// (get) Token: 0x060003CC RID: 972 RVA: 0x0000EB7A File Offset: 0x0000CD7A
|
||||
// (set) Token: 0x060003CD RID: 973 RVA: 0x0000EB82 File Offset: 0x0000CD82
|
||||
[DebuggerNonUserCode]
|
||||
public MessageOptions Options
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.options_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.options_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000E4 RID: 228
|
||||
// (get) Token: 0x060003CE RID: 974 RVA: 0x0000EB8B File Offset: 0x0000CD8B
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<DescriptorProto.Types.ReservedRange> ReservedRange
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.reservedRange_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000E5 RID: 229
|
||||
// (get) Token: 0x060003CF RID: 975 RVA: 0x0000EB93 File Offset: 0x0000CD93
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<string> ReservedName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.reservedName_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060003D0 RID: 976 RVA: 0x0000EB9B File Offset: 0x0000CD9B
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as DescriptorProto);
|
||||
}
|
||||
|
||||
// Token: 0x060003D1 RID: 977 RVA: 0x0000EBAC File Offset: 0x0000CDAC
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(DescriptorProto other)
|
||||
{
|
||||
return other != null && (other == this || (!(this.Name != other.Name) && this.field_.Equals(other.field_) && this.extension_.Equals(other.extension_) && this.nestedType_.Equals(other.nestedType_) && this.enumType_.Equals(other.enumType_) && this.extensionRange_.Equals(other.extensionRange_) && this.oneofDecl_.Equals(other.oneofDecl_) && object.Equals(this.Options, other.Options) && this.reservedRange_.Equals(other.reservedRange_) && this.reservedName_.Equals(other.reservedName_)));
|
||||
}
|
||||
|
||||
// Token: 0x060003D2 RID: 978 RVA: 0x0000EC98 File Offset: 0x0000CE98
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
num ^= this.Name.GetHashCode();
|
||||
}
|
||||
num ^= this.field_.GetHashCode();
|
||||
num ^= this.extension_.GetHashCode();
|
||||
num ^= this.nestedType_.GetHashCode();
|
||||
num ^= this.enumType_.GetHashCode();
|
||||
num ^= this.extensionRange_.GetHashCode();
|
||||
num ^= this.oneofDecl_.GetHashCode();
|
||||
if (this.options_ != null)
|
||||
{
|
||||
num ^= this.Options.GetHashCode();
|
||||
}
|
||||
num ^= this.reservedRange_.GetHashCode();
|
||||
return num ^ this.reservedName_.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x060003D3 RID: 979 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x060003D4 RID: 980 RVA: 0x0000ED4C File Offset: 0x0000CF4C
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(this.Name);
|
||||
}
|
||||
this.field_.WriteTo(output, DescriptorProto._repeated_field_codec);
|
||||
this.nestedType_.WriteTo(output, DescriptorProto._repeated_nestedType_codec);
|
||||
this.enumType_.WriteTo(output, DescriptorProto._repeated_enumType_codec);
|
||||
this.extensionRange_.WriteTo(output, DescriptorProto._repeated_extensionRange_codec);
|
||||
this.extension_.WriteTo(output, DescriptorProto._repeated_extension_codec);
|
||||
if (this.options_ != null)
|
||||
{
|
||||
output.WriteRawTag(58);
|
||||
output.WriteMessage(this.Options);
|
||||
}
|
||||
this.oneofDecl_.WriteTo(output, DescriptorProto._repeated_oneofDecl_codec);
|
||||
this.reservedRange_.WriteTo(output, DescriptorProto._repeated_reservedRange_codec);
|
||||
this.reservedName_.WriteTo(output, DescriptorProto._repeated_reservedName_codec);
|
||||
}
|
||||
|
||||
// Token: 0x060003D5 RID: 981 RVA: 0x0000EE20 File Offset: 0x0000D020
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.Name);
|
||||
}
|
||||
num += this.field_.CalculateSize(DescriptorProto._repeated_field_codec);
|
||||
num += this.extension_.CalculateSize(DescriptorProto._repeated_extension_codec);
|
||||
num += this.nestedType_.CalculateSize(DescriptorProto._repeated_nestedType_codec);
|
||||
num += this.enumType_.CalculateSize(DescriptorProto._repeated_enumType_codec);
|
||||
num += this.extensionRange_.CalculateSize(DescriptorProto._repeated_extensionRange_codec);
|
||||
num += this.oneofDecl_.CalculateSize(DescriptorProto._repeated_oneofDecl_codec);
|
||||
if (this.options_ != null)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeMessageSize(this.Options);
|
||||
}
|
||||
num += this.reservedRange_.CalculateSize(DescriptorProto._repeated_reservedRange_codec);
|
||||
return num + this.reservedName_.CalculateSize(DescriptorProto._repeated_reservedName_codec);
|
||||
}
|
||||
|
||||
// Token: 0x060003D6 RID: 982 RVA: 0x0000EF00 File Offset: 0x0000D100
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(DescriptorProto other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Name.Length != 0)
|
||||
{
|
||||
this.Name = other.Name;
|
||||
}
|
||||
this.field_.Add(other.field_);
|
||||
this.extension_.Add(other.extension_);
|
||||
this.nestedType_.Add(other.nestedType_);
|
||||
this.enumType_.Add(other.enumType_);
|
||||
this.extensionRange_.Add(other.extensionRange_);
|
||||
this.oneofDecl_.Add(other.oneofDecl_);
|
||||
if (other.options_ != null)
|
||||
{
|
||||
if (this.options_ == null)
|
||||
{
|
||||
this.options_ = new MessageOptions();
|
||||
}
|
||||
this.Options.MergeFrom(other.Options);
|
||||
}
|
||||
this.reservedRange_.Add(other.reservedRange_);
|
||||
this.reservedName_.Add(other.reservedName_);
|
||||
}
|
||||
|
||||
// Token: 0x060003D7 RID: 983 RVA: 0x0000EFE0 File Offset: 0x0000D1E0
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num <= 42U)
|
||||
{
|
||||
if (num <= 18U)
|
||||
{
|
||||
if (num == 10U)
|
||||
{
|
||||
this.Name = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
if (num == 18U)
|
||||
{
|
||||
this.field_.AddEntriesFrom(input, DescriptorProto._repeated_field_codec);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num == 26U)
|
||||
{
|
||||
this.nestedType_.AddEntriesFrom(input, DescriptorProto._repeated_nestedType_codec);
|
||||
continue;
|
||||
}
|
||||
if (num == 34U)
|
||||
{
|
||||
this.enumType_.AddEntriesFrom(input, DescriptorProto._repeated_enumType_codec);
|
||||
continue;
|
||||
}
|
||||
if (num == 42U)
|
||||
{
|
||||
this.extensionRange_.AddEntriesFrom(input, DescriptorProto._repeated_extensionRange_codec);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (num <= 58U)
|
||||
{
|
||||
if (num == 50U)
|
||||
{
|
||||
this.extension_.AddEntriesFrom(input, DescriptorProto._repeated_extension_codec);
|
||||
continue;
|
||||
}
|
||||
if (num == 58U)
|
||||
{
|
||||
if (this.options_ == null)
|
||||
{
|
||||
this.options_ = new MessageOptions();
|
||||
}
|
||||
input.ReadMessage(this.options_);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num == 66U)
|
||||
{
|
||||
this.oneofDecl_.AddEntriesFrom(input, DescriptorProto._repeated_oneofDecl_codec);
|
||||
continue;
|
||||
}
|
||||
if (num == 74U)
|
||||
{
|
||||
this.reservedRange_.AddEntriesFrom(input, DescriptorProto._repeated_reservedRange_codec);
|
||||
continue;
|
||||
}
|
||||
if (num == 82U)
|
||||
{
|
||||
this.reservedName_.AddEntriesFrom(input, DescriptorProto._repeated_reservedName_codec);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
input.SkipLastField();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000139 RID: 313
|
||||
private static readonly MessageParser<DescriptorProto> _parser = new MessageParser<DescriptorProto>(() => new DescriptorProto());
|
||||
|
||||
// Token: 0x0400013A RID: 314
|
||||
public const int NameFieldNumber = 1;
|
||||
|
||||
// Token: 0x0400013B RID: 315
|
||||
private string name_ = "";
|
||||
|
||||
// Token: 0x0400013C RID: 316
|
||||
public const int FieldFieldNumber = 2;
|
||||
|
||||
// Token: 0x0400013D RID: 317
|
||||
private static readonly FieldCodec<FieldDescriptorProto> _repeated_field_codec = FieldCodec.ForMessage<FieldDescriptorProto>(18U, FieldDescriptorProto.Parser);
|
||||
|
||||
// Token: 0x0400013E RID: 318
|
||||
private readonly RepeatedField<FieldDescriptorProto> field_ = new RepeatedField<FieldDescriptorProto>();
|
||||
|
||||
// Token: 0x0400013F RID: 319
|
||||
public const int ExtensionFieldNumber = 6;
|
||||
|
||||
// Token: 0x04000140 RID: 320
|
||||
private static readonly FieldCodec<FieldDescriptorProto> _repeated_extension_codec = FieldCodec.ForMessage<FieldDescriptorProto>(50U, FieldDescriptorProto.Parser);
|
||||
|
||||
// Token: 0x04000141 RID: 321
|
||||
private readonly RepeatedField<FieldDescriptorProto> extension_ = new RepeatedField<FieldDescriptorProto>();
|
||||
|
||||
// Token: 0x04000142 RID: 322
|
||||
public const int NestedTypeFieldNumber = 3;
|
||||
|
||||
// Token: 0x04000143 RID: 323
|
||||
private static readonly FieldCodec<DescriptorProto> _repeated_nestedType_codec = FieldCodec.ForMessage<DescriptorProto>(26U, DescriptorProto.Parser);
|
||||
|
||||
// Token: 0x04000144 RID: 324
|
||||
private readonly RepeatedField<DescriptorProto> nestedType_ = new RepeatedField<DescriptorProto>();
|
||||
|
||||
// Token: 0x04000145 RID: 325
|
||||
public const int EnumTypeFieldNumber = 4;
|
||||
|
||||
// Token: 0x04000146 RID: 326
|
||||
private static readonly FieldCodec<EnumDescriptorProto> _repeated_enumType_codec = FieldCodec.ForMessage<EnumDescriptorProto>(34U, EnumDescriptorProto.Parser);
|
||||
|
||||
// Token: 0x04000147 RID: 327
|
||||
private readonly RepeatedField<EnumDescriptorProto> enumType_ = new RepeatedField<EnumDescriptorProto>();
|
||||
|
||||
// Token: 0x04000148 RID: 328
|
||||
public const int ExtensionRangeFieldNumber = 5;
|
||||
|
||||
// Token: 0x04000149 RID: 329
|
||||
private static readonly FieldCodec<DescriptorProto.Types.ExtensionRange> _repeated_extensionRange_codec = FieldCodec.ForMessage<DescriptorProto.Types.ExtensionRange>(42U, DescriptorProto.Types.ExtensionRange.Parser);
|
||||
|
||||
// Token: 0x0400014A RID: 330
|
||||
private readonly RepeatedField<DescriptorProto.Types.ExtensionRange> extensionRange_ = new RepeatedField<DescriptorProto.Types.ExtensionRange>();
|
||||
|
||||
// Token: 0x0400014B RID: 331
|
||||
public const int OneofDeclFieldNumber = 8;
|
||||
|
||||
// Token: 0x0400014C RID: 332
|
||||
private static readonly FieldCodec<OneofDescriptorProto> _repeated_oneofDecl_codec = FieldCodec.ForMessage<OneofDescriptorProto>(66U, OneofDescriptorProto.Parser);
|
||||
|
||||
// Token: 0x0400014D RID: 333
|
||||
private readonly RepeatedField<OneofDescriptorProto> oneofDecl_ = new RepeatedField<OneofDescriptorProto>();
|
||||
|
||||
// Token: 0x0400014E RID: 334
|
||||
public const int OptionsFieldNumber = 7;
|
||||
|
||||
// Token: 0x0400014F RID: 335
|
||||
private MessageOptions options_;
|
||||
|
||||
// Token: 0x04000150 RID: 336
|
||||
public const int ReservedRangeFieldNumber = 9;
|
||||
|
||||
// Token: 0x04000151 RID: 337
|
||||
private static readonly FieldCodec<DescriptorProto.Types.ReservedRange> _repeated_reservedRange_codec = FieldCodec.ForMessage<DescriptorProto.Types.ReservedRange>(74U, DescriptorProto.Types.ReservedRange.Parser);
|
||||
|
||||
// Token: 0x04000152 RID: 338
|
||||
private readonly RepeatedField<DescriptorProto.Types.ReservedRange> reservedRange_ = new RepeatedField<DescriptorProto.Types.ReservedRange>();
|
||||
|
||||
// Token: 0x04000153 RID: 339
|
||||
public const int ReservedNameFieldNumber = 10;
|
||||
|
||||
// Token: 0x04000154 RID: 340
|
||||
private static readonly FieldCodec<string> _repeated_reservedName_codec = FieldCodec.ForString(82U);
|
||||
|
||||
// Token: 0x04000155 RID: 341
|
||||
private readonly RepeatedField<string> reservedName_ = new RepeatedField<string>();
|
||||
|
||||
// Token: 0x020000A4 RID: 164
|
||||
[DebuggerNonUserCode]
|
||||
public static class Types
|
||||
{
|
||||
// Token: 0x020000D5 RID: 213
|
||||
internal sealed class ExtensionRange : IMessage<DescriptorProto.Types.ExtensionRange>, IMessage, IEquatable<DescriptorProto.Types.ExtensionRange>, IDeepCloneable<DescriptorProto.Types.ExtensionRange>
|
||||
{
|
||||
// Token: 0x170001DF RID: 479
|
||||
// (get) Token: 0x060007B3 RID: 1971 RVA: 0x00017D62 File Offset: 0x00015F62
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<DescriptorProto.Types.ExtensionRange> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorProto.Types.ExtensionRange._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001E0 RID: 480
|
||||
// (get) Token: 0x060007B4 RID: 1972 RVA: 0x00017D69 File Offset: 0x00015F69
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorProto.Descriptor.NestedTypes[0];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001E1 RID: 481
|
||||
// (get) Token: 0x060007B5 RID: 1973 RVA: 0x00017D7B File Offset: 0x00015F7B
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorProto.Types.ExtensionRange.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060007B6 RID: 1974 RVA: 0x00007601 File Offset: 0x00005801
|
||||
[DebuggerNonUserCode]
|
||||
public ExtensionRange()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060007B7 RID: 1975 RVA: 0x00017D82 File Offset: 0x00015F82
|
||||
[DebuggerNonUserCode]
|
||||
public ExtensionRange(DescriptorProto.Types.ExtensionRange other)
|
||||
: this()
|
||||
{
|
||||
this.start_ = other.start_;
|
||||
this.end_ = other.end_;
|
||||
}
|
||||
|
||||
// Token: 0x060007B8 RID: 1976 RVA: 0x00017DA2 File Offset: 0x00015FA2
|
||||
[DebuggerNonUserCode]
|
||||
public DescriptorProto.Types.ExtensionRange Clone()
|
||||
{
|
||||
return new DescriptorProto.Types.ExtensionRange(this);
|
||||
}
|
||||
|
||||
// Token: 0x170001E2 RID: 482
|
||||
// (get) Token: 0x060007B9 RID: 1977 RVA: 0x00017DAA File Offset: 0x00015FAA
|
||||
// (set) Token: 0x060007BA RID: 1978 RVA: 0x00017DB2 File Offset: 0x00015FB2
|
||||
[DebuggerNonUserCode]
|
||||
public int Start
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.start_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.start_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001E3 RID: 483
|
||||
// (get) Token: 0x060007BB RID: 1979 RVA: 0x00017DBB File Offset: 0x00015FBB
|
||||
// (set) Token: 0x060007BC RID: 1980 RVA: 0x00017DC3 File Offset: 0x00015FC3
|
||||
[DebuggerNonUserCode]
|
||||
public int End
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.end_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.end_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060007BD RID: 1981 RVA: 0x00017DCC File Offset: 0x00015FCC
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as DescriptorProto.Types.ExtensionRange);
|
||||
}
|
||||
|
||||
// Token: 0x060007BE RID: 1982 RVA: 0x00017DDA File Offset: 0x00015FDA
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(DescriptorProto.Types.ExtensionRange other)
|
||||
{
|
||||
return other != null && (other == this || (this.Start == other.Start && this.End == other.End));
|
||||
}
|
||||
|
||||
// Token: 0x060007BF RID: 1983 RVA: 0x00017E08 File Offset: 0x00016008
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Start != 0)
|
||||
{
|
||||
num ^= this.Start.GetHashCode();
|
||||
}
|
||||
if (this.End != 0)
|
||||
{
|
||||
num ^= this.End.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x060007C0 RID: 1984 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x060007C1 RID: 1985 RVA: 0x00017E4A File Offset: 0x0001604A
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Start != 0)
|
||||
{
|
||||
output.WriteRawTag(8);
|
||||
output.WriteInt32(this.Start);
|
||||
}
|
||||
if (this.End != 0)
|
||||
{
|
||||
output.WriteRawTag(16);
|
||||
output.WriteInt32(this.End);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060007C2 RID: 1986 RVA: 0x00017E84 File Offset: 0x00016084
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Start != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeInt32Size(this.Start);
|
||||
}
|
||||
if (this.End != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeInt32Size(this.End);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x060007C3 RID: 1987 RVA: 0x00017EC4 File Offset: 0x000160C4
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(DescriptorProto.Types.ExtensionRange other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Start != 0)
|
||||
{
|
||||
this.Start = other.Start;
|
||||
}
|
||||
if (other.End != 0)
|
||||
{
|
||||
this.End = other.End;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060007C4 RID: 1988 RVA: 0x00017EF4 File Offset: 0x000160F4
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 8U)
|
||||
{
|
||||
if (num != 16U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.End = input.ReadInt32();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Start = input.ReadInt32();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000344 RID: 836
|
||||
private static readonly MessageParser<DescriptorProto.Types.ExtensionRange> _parser = new MessageParser<DescriptorProto.Types.ExtensionRange>(() => new DescriptorProto.Types.ExtensionRange());
|
||||
|
||||
// Token: 0x04000345 RID: 837
|
||||
public const int StartFieldNumber = 1;
|
||||
|
||||
// Token: 0x04000346 RID: 838
|
||||
private int start_;
|
||||
|
||||
// Token: 0x04000347 RID: 839
|
||||
public const int EndFieldNumber = 2;
|
||||
|
||||
// Token: 0x04000348 RID: 840
|
||||
private int end_;
|
||||
}
|
||||
|
||||
// Token: 0x020000D6 RID: 214
|
||||
internal sealed class ReservedRange : IMessage<DescriptorProto.Types.ReservedRange>, IMessage, IEquatable<DescriptorProto.Types.ReservedRange>, IDeepCloneable<DescriptorProto.Types.ReservedRange>
|
||||
{
|
||||
// Token: 0x170001E4 RID: 484
|
||||
// (get) Token: 0x060007C6 RID: 1990 RVA: 0x00017F54 File Offset: 0x00016154
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<DescriptorProto.Types.ReservedRange> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorProto.Types.ReservedRange._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001E5 RID: 485
|
||||
// (get) Token: 0x060007C7 RID: 1991 RVA: 0x00017F5B File Offset: 0x0001615B
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorProto.Descriptor.NestedTypes[1];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001E6 RID: 486
|
||||
// (get) Token: 0x060007C8 RID: 1992 RVA: 0x00017F6D File Offset: 0x0001616D
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorProto.Types.ReservedRange.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060007C9 RID: 1993 RVA: 0x00007601 File Offset: 0x00005801
|
||||
[DebuggerNonUserCode]
|
||||
public ReservedRange()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060007CA RID: 1994 RVA: 0x00017F74 File Offset: 0x00016174
|
||||
[DebuggerNonUserCode]
|
||||
public ReservedRange(DescriptorProto.Types.ReservedRange other)
|
||||
: this()
|
||||
{
|
||||
this.start_ = other.start_;
|
||||
this.end_ = other.end_;
|
||||
}
|
||||
|
||||
// Token: 0x060007CB RID: 1995 RVA: 0x00017F94 File Offset: 0x00016194
|
||||
[DebuggerNonUserCode]
|
||||
public DescriptorProto.Types.ReservedRange Clone()
|
||||
{
|
||||
return new DescriptorProto.Types.ReservedRange(this);
|
||||
}
|
||||
|
||||
// Token: 0x170001E7 RID: 487
|
||||
// (get) Token: 0x060007CC RID: 1996 RVA: 0x00017F9C File Offset: 0x0001619C
|
||||
// (set) Token: 0x060007CD RID: 1997 RVA: 0x00017FA4 File Offset: 0x000161A4
|
||||
[DebuggerNonUserCode]
|
||||
public int Start
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.start_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.start_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001E8 RID: 488
|
||||
// (get) Token: 0x060007CE RID: 1998 RVA: 0x00017FAD File Offset: 0x000161AD
|
||||
// (set) Token: 0x060007CF RID: 1999 RVA: 0x00017FB5 File Offset: 0x000161B5
|
||||
[DebuggerNonUserCode]
|
||||
public int End
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.end_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.end_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060007D0 RID: 2000 RVA: 0x00017FBE File Offset: 0x000161BE
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as DescriptorProto.Types.ReservedRange);
|
||||
}
|
||||
|
||||
// Token: 0x060007D1 RID: 2001 RVA: 0x00017FCC File Offset: 0x000161CC
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(DescriptorProto.Types.ReservedRange other)
|
||||
{
|
||||
return other != null && (other == this || (this.Start == other.Start && this.End == other.End));
|
||||
}
|
||||
|
||||
// Token: 0x060007D2 RID: 2002 RVA: 0x00017FFC File Offset: 0x000161FC
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Start != 0)
|
||||
{
|
||||
num ^= this.Start.GetHashCode();
|
||||
}
|
||||
if (this.End != 0)
|
||||
{
|
||||
num ^= this.End.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x060007D3 RID: 2003 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x060007D4 RID: 2004 RVA: 0x0001803E File Offset: 0x0001623E
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Start != 0)
|
||||
{
|
||||
output.WriteRawTag(8);
|
||||
output.WriteInt32(this.Start);
|
||||
}
|
||||
if (this.End != 0)
|
||||
{
|
||||
output.WriteRawTag(16);
|
||||
output.WriteInt32(this.End);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060007D5 RID: 2005 RVA: 0x00018078 File Offset: 0x00016278
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Start != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeInt32Size(this.Start);
|
||||
}
|
||||
if (this.End != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeInt32Size(this.End);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x060007D6 RID: 2006 RVA: 0x000180B8 File Offset: 0x000162B8
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(DescriptorProto.Types.ReservedRange other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Start != 0)
|
||||
{
|
||||
this.Start = other.Start;
|
||||
}
|
||||
if (other.End != 0)
|
||||
{
|
||||
this.End = other.End;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060007D7 RID: 2007 RVA: 0x000180E8 File Offset: 0x000162E8
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 8U)
|
||||
{
|
||||
if (num != 16U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.End = input.ReadInt32();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Start = input.ReadInt32();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000349 RID: 841
|
||||
private static readonly MessageParser<DescriptorProto.Types.ReservedRange> _parser = new MessageParser<DescriptorProto.Types.ReservedRange>(() => new DescriptorProto.Types.ReservedRange());
|
||||
|
||||
// Token: 0x0400034A RID: 842
|
||||
public const int StartFieldNumber = 1;
|
||||
|
||||
// Token: 0x0400034B RID: 843
|
||||
private int start_;
|
||||
|
||||
// Token: 0x0400034C RID: 844
|
||||
public const int EndFieldNumber = 2;
|
||||
|
||||
// Token: 0x0400034D RID: 845
|
||||
private int end_;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
using System;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000040 RID: 64
|
||||
internal static class DescriptorReflection
|
||||
{
|
||||
// Token: 0x170000C5 RID: 197
|
||||
// (get) Token: 0x0600038C RID: 908 RVA: 0x0000D30A File Offset: 0x0000B50A
|
||||
public static FileDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorReflection.descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000114 RID: 276
|
||||
private static FileDescriptor descriptor = FileDescriptor.FromGeneratedCode(Convert.FromBase64String(string.Concat(new string[]
|
||||
{
|
||||
"CiBnb29nbGUvcHJvdG9idWYvZGVzY3JpcHRvci5wcm90bxIPZ29vZ2xlLnBy", "b3RvYnVmIkcKEUZpbGVEZXNjcmlwdG9yU2V0EjIKBGZpbGUYASADKAsyJC5n", "b29nbGUucHJvdG9idWYuRmlsZURlc2NyaXB0b3JQcm90byLbAwoTRmlsZURl", "c2NyaXB0b3JQcm90bxIMCgRuYW1lGAEgASgJEg8KB3BhY2thZ2UYAiABKAkS", "EgoKZGVwZW5kZW5jeRgDIAMoCRIZChFwdWJsaWNfZGVwZW5kZW5jeRgKIAMo", "BRIXCg93ZWFrX2RlcGVuZGVuY3kYCyADKAUSNgoMbWVzc2FnZV90eXBlGAQg", "AygLMiAuZ29vZ2xlLnByb3RvYnVmLkRlc2NyaXB0b3JQcm90bxI3CgllbnVt", "X3R5cGUYBSADKAsyJC5nb29nbGUucHJvdG9idWYuRW51bURlc2NyaXB0b3JQ", "cm90bxI4CgdzZXJ2aWNlGAYgAygLMicuZ29vZ2xlLnByb3RvYnVmLlNlcnZp", "Y2VEZXNjcmlwdG9yUHJvdG8SOAoJZXh0ZW5zaW9uGAcgAygLMiUuZ29vZ2xl",
|
||||
"LnByb3RvYnVmLkZpZWxkRGVzY3JpcHRvclByb3RvEi0KB29wdGlvbnMYCCAB", "KAsyHC5nb29nbGUucHJvdG9idWYuRmlsZU9wdGlvbnMSOQoQc291cmNlX2Nv", "ZGVfaW5mbxgJIAEoCzIfLmdvb2dsZS5wcm90b2J1Zi5Tb3VyY2VDb2RlSW5m", "bxIOCgZzeW50YXgYDCABKAki8AQKD0Rlc2NyaXB0b3JQcm90bxIMCgRuYW1l", "GAEgASgJEjQKBWZpZWxkGAIgAygLMiUuZ29vZ2xlLnByb3RvYnVmLkZpZWxk", "RGVzY3JpcHRvclByb3RvEjgKCWV4dGVuc2lvbhgGIAMoCzIlLmdvb2dsZS5w", "cm90b2J1Zi5GaWVsZERlc2NyaXB0b3JQcm90bxI1CgtuZXN0ZWRfdHlwZRgD", "IAMoCzIgLmdvb2dsZS5wcm90b2J1Zi5EZXNjcmlwdG9yUHJvdG8SNwoJZW51", "bV90eXBlGAQgAygLMiQuZ29vZ2xlLnByb3RvYnVmLkVudW1EZXNjcmlwdG9y", "UHJvdG8SSAoPZXh0ZW5zaW9uX3JhbmdlGAUgAygLMi8uZ29vZ2xlLnByb3Rv",
|
||||
"YnVmLkRlc2NyaXB0b3JQcm90by5FeHRlbnNpb25SYW5nZRI5CgpvbmVvZl9k", "ZWNsGAggAygLMiUuZ29vZ2xlLnByb3RvYnVmLk9uZW9mRGVzY3JpcHRvclBy", "b3RvEjAKB29wdGlvbnMYByABKAsyHy5nb29nbGUucHJvdG9idWYuTWVzc2Fn", "ZU9wdGlvbnMSRgoOcmVzZXJ2ZWRfcmFuZ2UYCSADKAsyLi5nb29nbGUucHJv", "dG9idWYuRGVzY3JpcHRvclByb3RvLlJlc2VydmVkUmFuZ2USFQoNcmVzZXJ2", "ZWRfbmFtZRgKIAMoCRosCg5FeHRlbnNpb25SYW5nZRINCgVzdGFydBgBIAEo", "BRILCgNlbmQYAiABKAUaKwoNUmVzZXJ2ZWRSYW5nZRINCgVzdGFydBgBIAEo", "BRILCgNlbmQYAiABKAUivAUKFEZpZWxkRGVzY3JpcHRvclByb3RvEgwKBG5h", "bWUYASABKAkSDgoGbnVtYmVyGAMgASgFEjoKBWxhYmVsGAQgASgOMisuZ29v", "Z2xlLnByb3RvYnVmLkZpZWxkRGVzY3JpcHRvclByb3RvLkxhYmVsEjgKBHR5",
|
||||
"cGUYBSABKA4yKi5nb29nbGUucHJvdG9idWYuRmllbGREZXNjcmlwdG9yUHJv", "dG8uVHlwZRIRCgl0eXBlX25hbWUYBiABKAkSEAoIZXh0ZW5kZWUYAiABKAkS", "FQoNZGVmYXVsdF92YWx1ZRgHIAEoCRITCgtvbmVvZl9pbmRleBgJIAEoBRIR", "Cglqc29uX25hbWUYCiABKAkSLgoHb3B0aW9ucxgIIAEoCzIdLmdvb2dsZS5w", "cm90b2J1Zi5GaWVsZE9wdGlvbnMitgIKBFR5cGUSDwoLVFlQRV9ET1VCTEUQ", "ARIOCgpUWVBFX0ZMT0FUEAISDgoKVFlQRV9JTlQ2NBADEg8KC1RZUEVfVUlO", "VDY0EAQSDgoKVFlQRV9JTlQzMhAFEhAKDFRZUEVfRklYRUQ2NBAGEhAKDFRZ", "UEVfRklYRUQzMhAHEg0KCVRZUEVfQk9PTBAIEg8KC1RZUEVfU1RSSU5HEAkS", "DgoKVFlQRV9HUk9VUBAKEhAKDFRZUEVfTUVTU0FHRRALEg4KClRZUEVfQllU", "RVMQDBIPCgtUWVBFX1VJTlQzMhANEg0KCVRZUEVfRU5VTRAOEhEKDVRZUEVf",
|
||||
"U0ZJWEVEMzIQDxIRCg1UWVBFX1NGSVhFRDY0EBASDwoLVFlQRV9TSU5UMzIQ", "ERIPCgtUWVBFX1NJTlQ2NBASIkMKBUxhYmVsEhIKDkxBQkVMX09QVElPTkFM", "EAESEgoOTEFCRUxfUkVRVUlSRUQQAhISCg5MQUJFTF9SRVBFQVRFRBADIlQK", "FE9uZW9mRGVzY3JpcHRvclByb3RvEgwKBG5hbWUYASABKAkSLgoHb3B0aW9u", "cxgCIAEoCzIdLmdvb2dsZS5wcm90b2J1Zi5PbmVvZk9wdGlvbnMijAEKE0Vu", "dW1EZXNjcmlwdG9yUHJvdG8SDAoEbmFtZRgBIAEoCRI4CgV2YWx1ZRgCIAMo", "CzIpLmdvb2dsZS5wcm90b2J1Zi5FbnVtVmFsdWVEZXNjcmlwdG9yUHJvdG8S", "LQoHb3B0aW9ucxgDIAEoCzIcLmdvb2dsZS5wcm90b2J1Zi5FbnVtT3B0aW9u", "cyJsChhFbnVtVmFsdWVEZXNjcmlwdG9yUHJvdG8SDAoEbmFtZRgBIAEoCRIO", "CgZudW1iZXIYAiABKAUSMgoHb3B0aW9ucxgDIAEoCzIhLmdvb2dsZS5wcm90",
|
||||
"b2J1Zi5FbnVtVmFsdWVPcHRpb25zIpABChZTZXJ2aWNlRGVzY3JpcHRvclBy", "b3RvEgwKBG5hbWUYASABKAkSNgoGbWV0aG9kGAIgAygLMiYuZ29vZ2xlLnBy", "b3RvYnVmLk1ldGhvZERlc2NyaXB0b3JQcm90bxIwCgdvcHRpb25zGAMgASgL", "Mh8uZ29vZ2xlLnByb3RvYnVmLlNlcnZpY2VPcHRpb25zIsEBChVNZXRob2RE", "ZXNjcmlwdG9yUHJvdG8SDAoEbmFtZRgBIAEoCRISCgppbnB1dF90eXBlGAIg", "ASgJEhMKC291dHB1dF90eXBlGAMgASgJEi8KB29wdGlvbnMYBCABKAsyHi5n", "b29nbGUucHJvdG9idWYuTWV0aG9kT3B0aW9ucxIfChBjbGllbnRfc3RyZWFt", "aW5nGAUgASgIOgVmYWxzZRIfChBzZXJ2ZXJfc3RyZWFtaW5nGAYgASgIOgVm", "YWxzZSKEBQoLRmlsZU9wdGlvbnMSFAoMamF2YV9wYWNrYWdlGAEgASgJEhwK", "FGphdmFfb3V0ZXJfY2xhc3NuYW1lGAggASgJEiIKE2phdmFfbXVsdGlwbGVf",
|
||||
"ZmlsZXMYCiABKAg6BWZhbHNlEikKHWphdmFfZ2VuZXJhdGVfZXF1YWxzX2Fu", "ZF9oYXNoGBQgASgIQgIYARIlChZqYXZhX3N0cmluZ19jaGVja191dGY4GBsg", "ASgIOgVmYWxzZRJGCgxvcHRpbWl6ZV9mb3IYCSABKA4yKS5nb29nbGUucHJv", "dG9idWYuRmlsZU9wdGlvbnMuT3B0aW1pemVNb2RlOgVTUEVFRBISCgpnb19w", "YWNrYWdlGAsgASgJEiIKE2NjX2dlbmVyaWNfc2VydmljZXMYECABKAg6BWZh", "bHNlEiQKFWphdmFfZ2VuZXJpY19zZXJ2aWNlcxgRIAEoCDoFZmFsc2USIgoT", "cHlfZ2VuZXJpY19zZXJ2aWNlcxgSIAEoCDoFZmFsc2USGQoKZGVwcmVjYXRl", "ZBgXIAEoCDoFZmFsc2USHwoQY2NfZW5hYmxlX2FyZW5hcxgfIAEoCDoFZmFs", "c2USGQoRb2JqY19jbGFzc19wcmVmaXgYJCABKAkSGAoQY3NoYXJwX25hbWVz", "cGFjZRglIAEoCRJDChR1bmludGVycHJldGVkX29wdGlvbhjnByADKAsyJC5n",
|
||||
"b29nbGUucHJvdG9idWYuVW5pbnRlcnByZXRlZE9wdGlvbiI6CgxPcHRpbWl6", "ZU1vZGUSCQoFU1BFRUQQARINCglDT0RFX1NJWkUQAhIQCgxMSVRFX1JVTlRJ", "TUUQAyoJCOgHEICAgIACSgQIJhAnIuwBCg5NZXNzYWdlT3B0aW9ucxImChdt", "ZXNzYWdlX3NldF93aXJlX2Zvcm1hdBgBIAEoCDoFZmFsc2USLgofbm9fc3Rh", "bmRhcmRfZGVzY3JpcHRvcl9hY2Nlc3NvchgCIAEoCDoFZmFsc2USGQoKZGVw", "cmVjYXRlZBgDIAEoCDoFZmFsc2USEQoJbWFwX2VudHJ5GAcgASgIEkMKFHVu", "aW50ZXJwcmV0ZWRfb3B0aW9uGOcHIAMoCzIkLmdvb2dsZS5wcm90b2J1Zi5V", "bmludGVycHJldGVkT3B0aW9uKgkI6AcQgICAgAJKBAgIEAkingMKDEZpZWxk", "T3B0aW9ucxI6CgVjdHlwZRgBIAEoDjIjLmdvb2dsZS5wcm90b2J1Zi5GaWVs", "ZE9wdGlvbnMuQ1R5cGU6BlNUUklORxIOCgZwYWNrZWQYAiABKAgSPwoGanN0",
|
||||
"eXBlGAYgASgOMiQuZ29vZ2xlLnByb3RvYnVmLkZpZWxkT3B0aW9ucy5KU1R5", "cGU6CUpTX05PUk1BTBITCgRsYXp5GAUgASgIOgVmYWxzZRIZCgpkZXByZWNh", "dGVkGAMgASgIOgVmYWxzZRITCgR3ZWFrGAogASgIOgVmYWxzZRJDChR1bmlu", "dGVycHJldGVkX29wdGlvbhjnByADKAsyJC5nb29nbGUucHJvdG9idWYuVW5p", "bnRlcnByZXRlZE9wdGlvbiIvCgVDVHlwZRIKCgZTVFJJTkcQABIICgRDT1JE", "EAESEAoMU1RSSU5HX1BJRUNFEAIiNQoGSlNUeXBlEg0KCUpTX05PUk1BTBAA", "Eg0KCUpTX1NUUklORxABEg0KCUpTX05VTUJFUhACKgkI6AcQgICAgAJKBAgE", "EAUiXgoMT25lb2ZPcHRpb25zEkMKFHVuaW50ZXJwcmV0ZWRfb3B0aW9uGOcH", "IAMoCzIkLmdvb2dsZS5wcm90b2J1Zi5VbmludGVycHJldGVkT3B0aW9uKgkI", "6AcQgICAgAIijQEKC0VudW1PcHRpb25zEhMKC2FsbG93X2FsaWFzGAIgASgI",
|
||||
"EhkKCmRlcHJlY2F0ZWQYAyABKAg6BWZhbHNlEkMKFHVuaW50ZXJwcmV0ZWRf", "b3B0aW9uGOcHIAMoCzIkLmdvb2dsZS5wcm90b2J1Zi5VbmludGVycHJldGVk", "T3B0aW9uKgkI6AcQgICAgAIifQoQRW51bVZhbHVlT3B0aW9ucxIZCgpkZXBy", "ZWNhdGVkGAEgASgIOgVmYWxzZRJDChR1bmludGVycHJldGVkX29wdGlvbhjn", "ByADKAsyJC5nb29nbGUucHJvdG9idWYuVW5pbnRlcnByZXRlZE9wdGlvbioJ", "COgHEICAgIACInsKDlNlcnZpY2VPcHRpb25zEhkKCmRlcHJlY2F0ZWQYISAB", "KAg6BWZhbHNlEkMKFHVuaW50ZXJwcmV0ZWRfb3B0aW9uGOcHIAMoCzIkLmdv", "b2dsZS5wcm90b2J1Zi5VbmludGVycHJldGVkT3B0aW9uKgkI6AcQgICAgAIi", "egoNTWV0aG9kT3B0aW9ucxIZCgpkZXByZWNhdGVkGCEgASgIOgVmYWxzZRJD", "ChR1bmludGVycHJldGVkX29wdGlvbhjnByADKAsyJC5nb29nbGUucHJvdG9i",
|
||||
"dWYuVW5pbnRlcnByZXRlZE9wdGlvbioJCOgHEICAgIACIp4CChNVbmludGVy", "cHJldGVkT3B0aW9uEjsKBG5hbWUYAiADKAsyLS5nb29nbGUucHJvdG9idWYu", "VW5pbnRlcnByZXRlZE9wdGlvbi5OYW1lUGFydBIYChBpZGVudGlmaWVyX3Zh", "bHVlGAMgASgJEhoKEnBvc2l0aXZlX2ludF92YWx1ZRgEIAEoBBIaChJuZWdh", "dGl2ZV9pbnRfdmFsdWUYBSABKAMSFAoMZG91YmxlX3ZhbHVlGAYgASgBEhQK", "DHN0cmluZ192YWx1ZRgHIAEoDBIXCg9hZ2dyZWdhdGVfdmFsdWUYCCABKAka", "MwoITmFtZVBhcnQSEQoJbmFtZV9wYXJ0GAEgAigJEhQKDGlzX2V4dGVuc2lv", "bhgCIAIoCCLVAQoOU291cmNlQ29kZUluZm8SOgoIbG9jYXRpb24YASADKAsy", "KC5nb29nbGUucHJvdG9idWYuU291cmNlQ29kZUluZm8uTG9jYXRpb24ahgEK", "CExvY2F0aW9uEhAKBHBhdGgYASADKAVCAhABEhAKBHNwYW4YAiADKAVCAhAB",
|
||||
"EhgKEGxlYWRpbmdfY29tbWVudHMYAyABKAkSGQoRdHJhaWxpbmdfY29tbWVu", "dHMYBCABKAkSIQoZbGVhZGluZ19kZXRhY2hlZF9jb21tZW50cxgGIAMoCSKn", "AQoRR2VuZXJhdGVkQ29kZUluZm8SQQoKYW5ub3RhdGlvbhgBIAMoCzItLmdv", "b2dsZS5wcm90b2J1Zi5HZW5lcmF0ZWRDb2RlSW5mby5Bbm5vdGF0aW9uGk8K", "CkFubm90YXRpb24SEAoEcGF0aBgBIAMoBUICEAESEwoLc291cmNlX2ZpbGUY", "AiABKAkSDQoFYmVnaW4YAyABKAUSCwoDZW5kGAQgASgFQlgKE2NvbS5nb29n", "bGUucHJvdG9idWZCEERlc2NyaXB0b3JQcm90b3NIAVoKZGVzY3JpcHRvcqIC", "A0dQQqoCGkdvb2dsZS5Qcm90b2J1Zi5SZWZsZWN0aW9u"
|
||||
})), new FileDescriptor[0], new GeneratedClrTypeInfo(null, new GeneratedClrTypeInfo[]
|
||||
{
|
||||
new GeneratedClrTypeInfo(typeof(FileDescriptorSet), FileDescriptorSet.Parser, new string[] { "File" }, null, null, null),
|
||||
new GeneratedClrTypeInfo(typeof(FileDescriptorProto), FileDescriptorProto.Parser, new string[]
|
||||
{
|
||||
"Name", "Package", "Dependency", "PublicDependency", "WeakDependency", "MessageType", "EnumType", "Service", "Extension", "Options",
|
||||
"SourceCodeInfo", "Syntax"
|
||||
}, null, null, null),
|
||||
new GeneratedClrTypeInfo(typeof(DescriptorProto), DescriptorProto.Parser, new string[] { "Name", "Field", "Extension", "NestedType", "EnumType", "ExtensionRange", "OneofDecl", "Options", "ReservedRange", "ReservedName" }, null, null, new GeneratedClrTypeInfo[]
|
||||
{
|
||||
new GeneratedClrTypeInfo(typeof(DescriptorProto.Types.ExtensionRange), DescriptorProto.Types.ExtensionRange.Parser, new string[] { "Start", "End" }, null, null, null),
|
||||
new GeneratedClrTypeInfo(typeof(DescriptorProto.Types.ReservedRange), DescriptorProto.Types.ReservedRange.Parser, new string[] { "Start", "End" }, null, null, null)
|
||||
}),
|
||||
new GeneratedClrTypeInfo(typeof(FieldDescriptorProto), FieldDescriptorProto.Parser, new string[] { "Name", "Number", "Label", "Type", "TypeName", "Extendee", "DefaultValue", "OneofIndex", "JsonName", "Options" }, null, new Type[]
|
||||
{
|
||||
typeof(FieldDescriptorProto.Types.Type),
|
||||
typeof(FieldDescriptorProto.Types.Label)
|
||||
}, null),
|
||||
new GeneratedClrTypeInfo(typeof(OneofDescriptorProto), OneofDescriptorProto.Parser, new string[] { "Name", "Options" }, null, null, null),
|
||||
new GeneratedClrTypeInfo(typeof(EnumDescriptorProto), EnumDescriptorProto.Parser, new string[] { "Name", "Value", "Options" }, null, null, null),
|
||||
new GeneratedClrTypeInfo(typeof(EnumValueDescriptorProto), EnumValueDescriptorProto.Parser, new string[] { "Name", "Number", "Options" }, null, null, null),
|
||||
new GeneratedClrTypeInfo(typeof(ServiceDescriptorProto), ServiceDescriptorProto.Parser, new string[] { "Name", "Method", "Options" }, null, null, null),
|
||||
new GeneratedClrTypeInfo(typeof(MethodDescriptorProto), MethodDescriptorProto.Parser, new string[] { "Name", "InputType", "OutputType", "Options", "ClientStreaming", "ServerStreaming" }, null, null, null),
|
||||
new GeneratedClrTypeInfo(typeof(FileOptions), FileOptions.Parser, new string[]
|
||||
{
|
||||
"JavaPackage", "JavaOuterClassname", "JavaMultipleFiles", "JavaGenerateEqualsAndHash", "JavaStringCheckUtf8", "OptimizeFor", "GoPackage", "CcGenericServices", "JavaGenericServices", "PyGenericServices",
|
||||
"Deprecated", "CcEnableArenas", "ObjcClassPrefix", "CsharpNamespace", "UninterpretedOption"
|
||||
}, null, new Type[] { typeof(FileOptions.Types.OptimizeMode) }, null),
|
||||
new GeneratedClrTypeInfo(typeof(MessageOptions), MessageOptions.Parser, new string[] { "MessageSetWireFormat", "NoStandardDescriptorAccessor", "Deprecated", "MapEntry", "UninterpretedOption" }, null, null, null),
|
||||
new GeneratedClrTypeInfo(typeof(FieldOptions), FieldOptions.Parser, new string[] { "Ctype", "Packed", "Jstype", "Lazy", "Deprecated", "Weak", "UninterpretedOption" }, null, new Type[]
|
||||
{
|
||||
typeof(FieldOptions.Types.CType),
|
||||
typeof(FieldOptions.Types.JSType)
|
||||
}, null),
|
||||
new GeneratedClrTypeInfo(typeof(OneofOptions), OneofOptions.Parser, new string[] { "UninterpretedOption" }, null, null, null),
|
||||
new GeneratedClrTypeInfo(typeof(EnumOptions), EnumOptions.Parser, new string[] { "AllowAlias", "Deprecated", "UninterpretedOption" }, null, null, null),
|
||||
new GeneratedClrTypeInfo(typeof(EnumValueOptions), EnumValueOptions.Parser, new string[] { "Deprecated", "UninterpretedOption" }, null, null, null),
|
||||
new GeneratedClrTypeInfo(typeof(ServiceOptions), ServiceOptions.Parser, new string[] { "Deprecated", "UninterpretedOption" }, null, null, null),
|
||||
new GeneratedClrTypeInfo(typeof(MethodOptions), MethodOptions.Parser, new string[] { "Deprecated", "UninterpretedOption" }, null, null, null),
|
||||
new GeneratedClrTypeInfo(typeof(UninterpretedOption), UninterpretedOption.Parser, new string[] { "Name", "IdentifierValue", "PositiveIntValue", "NegativeIntValue", "DoubleValue", "StringValue", "AggregateValue" }, null, null, new GeneratedClrTypeInfo[]
|
||||
{
|
||||
new GeneratedClrTypeInfo(typeof(UninterpretedOption.Types.NamePart), UninterpretedOption.Types.NamePart.Parser, new string[] { "NamePart_", "IsExtension" }, null, null, null)
|
||||
}),
|
||||
new GeneratedClrTypeInfo(typeof(SourceCodeInfo), SourceCodeInfo.Parser, new string[] { "Location" }, null, null, new GeneratedClrTypeInfo[]
|
||||
{
|
||||
new GeneratedClrTypeInfo(typeof(SourceCodeInfo.Types.Location), SourceCodeInfo.Types.Location.Parser, new string[] { "Path", "Span", "LeadingComments", "TrailingComments", "LeadingDetachedComments" }, null, null, null)
|
||||
}),
|
||||
new GeneratedClrTypeInfo(typeof(GeneratedCodeInfo), GeneratedCodeInfo.Parser, new string[] { "Annotation" }, null, null, new GeneratedClrTypeInfo[]
|
||||
{
|
||||
new GeneratedClrTypeInfo(typeof(GeneratedCodeInfo.Types.Annotation), GeneratedCodeInfo.Types.Annotation.Parser, new string[] { "Path", "SourceFile", "Begin", "End" }, null, null, null)
|
||||
})
|
||||
}));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000057 RID: 87
|
||||
internal static class DescriptorUtil
|
||||
{
|
||||
// Token: 0x06000570 RID: 1392 RVA: 0x00013938 File Offset: 0x00011B38
|
||||
internal static IList<TOutput> ConvertAndMakeReadOnly<TInput, TOutput>(IList<TInput> input, DescriptorUtil.IndexedConverter<TInput, TOutput> converter)
|
||||
{
|
||||
TOutput[] array = new TOutput[input.Count];
|
||||
for (int i = 0; i < array.Length; i++)
|
||||
{
|
||||
array[i] = converter(input[i], i);
|
||||
}
|
||||
return new ReadOnlyCollection<TOutput>(array);
|
||||
}
|
||||
|
||||
// Token: 0x020000BE RID: 190
|
||||
// (Invoke) Token: 0x06000766 RID: 1894
|
||||
internal delegate TOutput IndexedConverter<TInput, TOutput>(TInput element, int index);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000058 RID: 88
|
||||
public sealed class DescriptorValidationException : Exception
|
||||
{
|
||||
// Token: 0x17000166 RID: 358
|
||||
// (get) Token: 0x06000571 RID: 1393 RVA: 0x0001397A File Offset: 0x00011B7A
|
||||
public string ProblemSymbolName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000167 RID: 359
|
||||
// (get) Token: 0x06000572 RID: 1394 RVA: 0x00013982 File Offset: 0x00011B82
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.description;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000573 RID: 1395 RVA: 0x0001398A File Offset: 0x00011B8A
|
||||
internal DescriptorValidationException(IDescriptor problemDescriptor, string description)
|
||||
: base(problemDescriptor.FullName + ": " + description)
|
||||
{
|
||||
this.name = problemDescriptor.FullName;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
// Token: 0x06000574 RID: 1396 RVA: 0x000139B6 File Offset: 0x00011BB6
|
||||
internal DescriptorValidationException(IDescriptor problemDescriptor, string description, Exception cause)
|
||||
: base(problemDescriptor.FullName + ": " + description, cause)
|
||||
{
|
||||
this.name = problemDescriptor.FullName;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
// Token: 0x0400020E RID: 526
|
||||
private readonly string name;
|
||||
|
||||
// Token: 0x0400020F RID: 527
|
||||
private readonly string description;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000059 RID: 89
|
||||
public sealed class EnumDescriptor : DescriptorBase
|
||||
{
|
||||
// Token: 0x06000575 RID: 1397 RVA: 0x000139E4 File Offset: 0x00011BE4
|
||||
internal EnumDescriptor(EnumDescriptorProto proto, FileDescriptor file, MessageDescriptor parent, int index, Type clrType)
|
||||
: base(file, file.ComputeFullName(parent, proto.Name), index)
|
||||
{
|
||||
EnumDescriptor <>4__this = this;
|
||||
this.proto = proto;
|
||||
this.clrType = clrType;
|
||||
this.containingType = parent;
|
||||
if (proto.Value.Count == 0)
|
||||
{
|
||||
throw new DescriptorValidationException(this, "Enums must contain at least one value.");
|
||||
}
|
||||
this.values = DescriptorUtil.ConvertAndMakeReadOnly<EnumValueDescriptorProto, EnumValueDescriptor>(proto.Value, (EnumValueDescriptorProto value, int i) => new EnumValueDescriptor(value, file, <>4__this, i));
|
||||
base.File.DescriptorPool.AddSymbol(this);
|
||||
}
|
||||
|
||||
// Token: 0x17000168 RID: 360
|
||||
// (get) Token: 0x06000576 RID: 1398 RVA: 0x00013A82 File Offset: 0x00011C82
|
||||
internal EnumDescriptorProto Proto
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.proto;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000169 RID: 361
|
||||
// (get) Token: 0x06000577 RID: 1399 RVA: 0x00013A8A File Offset: 0x00011C8A
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.proto.Name;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700016A RID: 362
|
||||
// (get) Token: 0x06000578 RID: 1400 RVA: 0x00013A97 File Offset: 0x00011C97
|
||||
public Type ClrType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.clrType;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700016B RID: 363
|
||||
// (get) Token: 0x06000579 RID: 1401 RVA: 0x00013A9F File Offset: 0x00011C9F
|
||||
public MessageDescriptor ContainingType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.containingType;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700016C RID: 364
|
||||
// (get) Token: 0x0600057A RID: 1402 RVA: 0x00013AA7 File Offset: 0x00011CA7
|
||||
public IList<EnumValueDescriptor> Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.values;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600057B RID: 1403 RVA: 0x00013AAF File Offset: 0x00011CAF
|
||||
public EnumValueDescriptor FindValueByNumber(int number)
|
||||
{
|
||||
return base.File.DescriptorPool.FindEnumValueByNumber(this, number);
|
||||
}
|
||||
|
||||
// Token: 0x0600057C RID: 1404 RVA: 0x00013AC3 File Offset: 0x00011CC3
|
||||
public EnumValueDescriptor FindValueByName(string name)
|
||||
{
|
||||
return base.File.DescriptorPool.FindSymbol<EnumValueDescriptor>(base.FullName + "." + name);
|
||||
}
|
||||
|
||||
// Token: 0x04000210 RID: 528
|
||||
private readonly EnumDescriptorProto proto;
|
||||
|
||||
// Token: 0x04000211 RID: 529
|
||||
private readonly MessageDescriptor containingType;
|
||||
|
||||
// Token: 0x04000212 RID: 530
|
||||
private readonly IList<EnumValueDescriptor> values;
|
||||
|
||||
// Token: 0x04000213 RID: 531
|
||||
private readonly Type clrType;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,264 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Collections;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000046 RID: 70
|
||||
internal sealed class EnumDescriptorProto : IMessage<EnumDescriptorProto>, IMessage, IEquatable<EnumDescriptorProto>, IDeepCloneable<EnumDescriptorProto>
|
||||
{
|
||||
// Token: 0x170000F8 RID: 248
|
||||
// (get) Token: 0x06000410 RID: 1040 RVA: 0x0000FCF8 File Offset: 0x0000DEF8
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<EnumDescriptorProto> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return EnumDescriptorProto._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000F9 RID: 249
|
||||
// (get) Token: 0x06000411 RID: 1041 RVA: 0x0000FCFF File Offset: 0x0000DEFF
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorReflection.Descriptor.MessageTypes[5];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000FA RID: 250
|
||||
// (get) Token: 0x06000412 RID: 1042 RVA: 0x0000FD11 File Offset: 0x0000DF11
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return EnumDescriptorProto.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000413 RID: 1043 RVA: 0x0000FD18 File Offset: 0x0000DF18
|
||||
[DebuggerNonUserCode]
|
||||
public EnumDescriptorProto()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000414 RID: 1044 RVA: 0x0000FD38 File Offset: 0x0000DF38
|
||||
[DebuggerNonUserCode]
|
||||
public EnumDescriptorProto(EnumDescriptorProto other)
|
||||
: this()
|
||||
{
|
||||
this.name_ = other.name_;
|
||||
this.value_ = other.value_.Clone();
|
||||
this.Options = ((other.options_ != null) ? other.Options.Clone() : null);
|
||||
}
|
||||
|
||||
// Token: 0x06000415 RID: 1045 RVA: 0x0000FD84 File Offset: 0x0000DF84
|
||||
[DebuggerNonUserCode]
|
||||
public EnumDescriptorProto Clone()
|
||||
{
|
||||
return new EnumDescriptorProto(this);
|
||||
}
|
||||
|
||||
// Token: 0x170000FB RID: 251
|
||||
// (get) Token: 0x06000416 RID: 1046 RVA: 0x0000FD8C File Offset: 0x0000DF8C
|
||||
// (set) Token: 0x06000417 RID: 1047 RVA: 0x0000FD94 File Offset: 0x0000DF94
|
||||
[DebuggerNonUserCode]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.name_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000FC RID: 252
|
||||
// (get) Token: 0x06000418 RID: 1048 RVA: 0x0000FDA7 File Offset: 0x0000DFA7
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<EnumValueDescriptorProto> Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.value_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000FD RID: 253
|
||||
// (get) Token: 0x06000419 RID: 1049 RVA: 0x0000FDAF File Offset: 0x0000DFAF
|
||||
// (set) Token: 0x0600041A RID: 1050 RVA: 0x0000FDB7 File Offset: 0x0000DFB7
|
||||
[DebuggerNonUserCode]
|
||||
public EnumOptions Options
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.options_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.options_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600041B RID: 1051 RVA: 0x0000FDC0 File Offset: 0x0000DFC0
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as EnumDescriptorProto);
|
||||
}
|
||||
|
||||
// Token: 0x0600041C RID: 1052 RVA: 0x0000FDD0 File Offset: 0x0000DFD0
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(EnumDescriptorProto other)
|
||||
{
|
||||
return other != null && (other == this || (!(this.Name != other.Name) && this.value_.Equals(other.value_) && object.Equals(this.Options, other.Options)));
|
||||
}
|
||||
|
||||
// Token: 0x0600041D RID: 1053 RVA: 0x0000FE28 File Offset: 0x0000E028
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
num ^= this.Name.GetHashCode();
|
||||
}
|
||||
num ^= this.value_.GetHashCode();
|
||||
if (this.options_ != null)
|
||||
{
|
||||
num ^= this.Options.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0600041E RID: 1054 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x0600041F RID: 1055 RVA: 0x0000FE78 File Offset: 0x0000E078
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(this.Name);
|
||||
}
|
||||
this.value_.WriteTo(output, EnumDescriptorProto._repeated_value_codec);
|
||||
if (this.options_ != null)
|
||||
{
|
||||
output.WriteRawTag(26);
|
||||
output.WriteMessage(this.Options);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000420 RID: 1056 RVA: 0x0000FED4 File Offset: 0x0000E0D4
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.Name);
|
||||
}
|
||||
num += this.value_.CalculateSize(EnumDescriptorProto._repeated_value_codec);
|
||||
if (this.options_ != null)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeMessageSize(this.Options);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000421 RID: 1057 RVA: 0x0000FF2C File Offset: 0x0000E12C
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(EnumDescriptorProto other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Name.Length != 0)
|
||||
{
|
||||
this.Name = other.Name;
|
||||
}
|
||||
this.value_.Add(other.value_);
|
||||
if (other.options_ != null)
|
||||
{
|
||||
if (this.options_ == null)
|
||||
{
|
||||
this.options_ = new EnumOptions();
|
||||
}
|
||||
this.Options.MergeFrom(other.Options);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000422 RID: 1058 RVA: 0x0000FF94 File Offset: 0x0000E194
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 10U)
|
||||
{
|
||||
if (num != 18U)
|
||||
{
|
||||
if (num != 26U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.options_ == null)
|
||||
{
|
||||
this.options_ = new EnumOptions();
|
||||
}
|
||||
input.ReadMessage(this.options_);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.value_.AddEntriesFrom(input, EnumDescriptorProto._repeated_value_codec);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Name = input.ReadString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000170 RID: 368
|
||||
private static readonly MessageParser<EnumDescriptorProto> _parser = new MessageParser<EnumDescriptorProto>(() => new EnumDescriptorProto());
|
||||
|
||||
// Token: 0x04000171 RID: 369
|
||||
public const int NameFieldNumber = 1;
|
||||
|
||||
// Token: 0x04000172 RID: 370
|
||||
private string name_ = "";
|
||||
|
||||
// Token: 0x04000173 RID: 371
|
||||
public const int ValueFieldNumber = 2;
|
||||
|
||||
// Token: 0x04000174 RID: 372
|
||||
private static readonly FieldCodec<EnumValueDescriptorProto> _repeated_value_codec = FieldCodec.ForMessage<EnumValueDescriptorProto>(18U, EnumValueDescriptorProto.Parser);
|
||||
|
||||
// Token: 0x04000175 RID: 373
|
||||
private readonly RepeatedField<EnumValueDescriptorProto> value_ = new RepeatedField<EnumValueDescriptorProto>();
|
||||
|
||||
// Token: 0x04000176 RID: 374
|
||||
public const int OptionsFieldNumber = 3;
|
||||
|
||||
// Token: 0x04000177 RID: 375
|
||||
private EnumOptions options_;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,254 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Collections;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x0200004E RID: 78
|
||||
internal sealed class EnumOptions : IMessage<EnumOptions>, IMessage, IEquatable<EnumOptions>, IDeepCloneable<EnumOptions>
|
||||
{
|
||||
// Token: 0x1700013B RID: 315
|
||||
// (get) Token: 0x060004D9 RID: 1241 RVA: 0x0001224A File Offset: 0x0001044A
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<EnumOptions> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return EnumOptions._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700013C RID: 316
|
||||
// (get) Token: 0x060004DA RID: 1242 RVA: 0x00012251 File Offset: 0x00010451
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorReflection.Descriptor.MessageTypes[13];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700013D RID: 317
|
||||
// (get) Token: 0x060004DB RID: 1243 RVA: 0x00012264 File Offset: 0x00010464
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return EnumOptions.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060004DC RID: 1244 RVA: 0x0001226B File Offset: 0x0001046B
|
||||
[DebuggerNonUserCode]
|
||||
public EnumOptions()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060004DD RID: 1245 RVA: 0x0001227E File Offset: 0x0001047E
|
||||
[DebuggerNonUserCode]
|
||||
public EnumOptions(EnumOptions other)
|
||||
: this()
|
||||
{
|
||||
this.allowAlias_ = other.allowAlias_;
|
||||
this.deprecated_ = other.deprecated_;
|
||||
this.uninterpretedOption_ = other.uninterpretedOption_.Clone();
|
||||
}
|
||||
|
||||
// Token: 0x060004DE RID: 1246 RVA: 0x000122AF File Offset: 0x000104AF
|
||||
[DebuggerNonUserCode]
|
||||
public EnumOptions Clone()
|
||||
{
|
||||
return new EnumOptions(this);
|
||||
}
|
||||
|
||||
// Token: 0x1700013E RID: 318
|
||||
// (get) Token: 0x060004DF RID: 1247 RVA: 0x000122B7 File Offset: 0x000104B7
|
||||
// (set) Token: 0x060004E0 RID: 1248 RVA: 0x000122BF File Offset: 0x000104BF
|
||||
[DebuggerNonUserCode]
|
||||
public bool AllowAlias
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.allowAlias_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.allowAlias_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700013F RID: 319
|
||||
// (get) Token: 0x060004E1 RID: 1249 RVA: 0x000122C8 File Offset: 0x000104C8
|
||||
// (set) Token: 0x060004E2 RID: 1250 RVA: 0x000122D0 File Offset: 0x000104D0
|
||||
[DebuggerNonUserCode]
|
||||
public bool Deprecated
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.deprecated_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.deprecated_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000140 RID: 320
|
||||
// (get) Token: 0x060004E3 RID: 1251 RVA: 0x000122D9 File Offset: 0x000104D9
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<UninterpretedOption> UninterpretedOption
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.uninterpretedOption_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060004E4 RID: 1252 RVA: 0x000122E1 File Offset: 0x000104E1
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as EnumOptions);
|
||||
}
|
||||
|
||||
// Token: 0x060004E5 RID: 1253 RVA: 0x000122F0 File Offset: 0x000104F0
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(EnumOptions other)
|
||||
{
|
||||
return other != null && (other == this || (this.AllowAlias == other.AllowAlias && this.Deprecated == other.Deprecated && this.uninterpretedOption_.Equals(other.uninterpretedOption_)));
|
||||
}
|
||||
|
||||
// Token: 0x060004E6 RID: 1254 RVA: 0x00012340 File Offset: 0x00010540
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.AllowAlias)
|
||||
{
|
||||
num ^= this.AllowAlias.GetHashCode();
|
||||
}
|
||||
if (this.Deprecated)
|
||||
{
|
||||
num ^= this.Deprecated.GetHashCode();
|
||||
}
|
||||
return num ^ this.uninterpretedOption_.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x060004E7 RID: 1255 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x060004E8 RID: 1256 RVA: 0x00012390 File Offset: 0x00010590
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.AllowAlias)
|
||||
{
|
||||
output.WriteRawTag(16);
|
||||
output.WriteBool(this.AllowAlias);
|
||||
}
|
||||
if (this.Deprecated)
|
||||
{
|
||||
output.WriteRawTag(24);
|
||||
output.WriteBool(this.Deprecated);
|
||||
}
|
||||
this.uninterpretedOption_.WriteTo(output, EnumOptions._repeated_uninterpretedOption_codec);
|
||||
}
|
||||
|
||||
// Token: 0x060004E9 RID: 1257 RVA: 0x000123E8 File Offset: 0x000105E8
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.AllowAlias)
|
||||
{
|
||||
num += 2;
|
||||
}
|
||||
if (this.Deprecated)
|
||||
{
|
||||
num += 2;
|
||||
}
|
||||
return num + this.uninterpretedOption_.CalculateSize(EnumOptions._repeated_uninterpretedOption_codec);
|
||||
}
|
||||
|
||||
// Token: 0x060004EA RID: 1258 RVA: 0x00012423 File Offset: 0x00010623
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(EnumOptions other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.AllowAlias)
|
||||
{
|
||||
this.AllowAlias = other.AllowAlias;
|
||||
}
|
||||
if (other.Deprecated)
|
||||
{
|
||||
this.Deprecated = other.Deprecated;
|
||||
}
|
||||
this.uninterpretedOption_.Add(other.uninterpretedOption_);
|
||||
}
|
||||
|
||||
// Token: 0x060004EB RID: 1259 RVA: 0x00012464 File Offset: 0x00010664
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 16U)
|
||||
{
|
||||
if (num != 24U)
|
||||
{
|
||||
if (num != 7994U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.uninterpretedOption_.AddEntriesFrom(input, EnumOptions._repeated_uninterpretedOption_codec);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Deprecated = input.ReadBool();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.AllowAlias = input.ReadBool();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040001D4 RID: 468
|
||||
private static readonly MessageParser<EnumOptions> _parser = new MessageParser<EnumOptions>(() => new EnumOptions());
|
||||
|
||||
// Token: 0x040001D5 RID: 469
|
||||
public const int AllowAliasFieldNumber = 2;
|
||||
|
||||
// Token: 0x040001D6 RID: 470
|
||||
private bool allowAlias_;
|
||||
|
||||
// Token: 0x040001D7 RID: 471
|
||||
public const int DeprecatedFieldNumber = 3;
|
||||
|
||||
// Token: 0x040001D8 RID: 472
|
||||
private bool deprecated_;
|
||||
|
||||
// Token: 0x040001D9 RID: 473
|
||||
public const int UninterpretedOptionFieldNumber = 999;
|
||||
|
||||
// Token: 0x040001DA RID: 474
|
||||
private static readonly FieldCodec<UninterpretedOption> _repeated_uninterpretedOption_codec = FieldCodec.ForMessage<UninterpretedOption>(7994U, Google.Protobuf.Reflection.UninterpretedOption.Parser);
|
||||
|
||||
// Token: 0x040001DB RID: 475
|
||||
private readonly RepeatedField<UninterpretedOption> uninterpretedOption_ = new RepeatedField<UninterpretedOption>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x0200005A RID: 90
|
||||
public sealed class EnumValueDescriptor : DescriptorBase
|
||||
{
|
||||
// Token: 0x0600057D RID: 1405 RVA: 0x00013AE8 File Offset: 0x00011CE8
|
||||
internal EnumValueDescriptor(EnumValueDescriptorProto proto, FileDescriptor file, EnumDescriptor parent, int index)
|
||||
: base(file, parent.FullName + "." + proto.Name, index)
|
||||
{
|
||||
this.proto = proto;
|
||||
this.enumDescriptor = parent;
|
||||
file.DescriptorPool.AddSymbol(this);
|
||||
file.DescriptorPool.AddEnumValueByNumber(this);
|
||||
}
|
||||
|
||||
// Token: 0x1700016D RID: 365
|
||||
// (get) Token: 0x0600057E RID: 1406 RVA: 0x00013B3A File Offset: 0x00011D3A
|
||||
internal EnumValueDescriptorProto Proto
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.proto;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700016E RID: 366
|
||||
// (get) Token: 0x0600057F RID: 1407 RVA: 0x00013B42 File Offset: 0x00011D42
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.proto.Name;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700016F RID: 367
|
||||
// (get) Token: 0x06000580 RID: 1408 RVA: 0x00013B4F File Offset: 0x00011D4F
|
||||
public int Number
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Proto.Number;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000170 RID: 368
|
||||
// (get) Token: 0x06000581 RID: 1409 RVA: 0x00013B5C File Offset: 0x00011D5C
|
||||
public EnumDescriptor EnumDescriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.enumDescriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000214 RID: 532
|
||||
private readonly EnumDescriptor enumDescriptor;
|
||||
|
||||
// Token: 0x04000215 RID: 533
|
||||
private readonly EnumValueDescriptorProto proto;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,278 @@
|
||||
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_;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Collections;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x0200004F RID: 79
|
||||
internal sealed class EnumValueOptions : IMessage<EnumValueOptions>, IMessage, IEquatable<EnumValueOptions>, IDeepCloneable<EnumValueOptions>
|
||||
{
|
||||
// Token: 0x17000141 RID: 321
|
||||
// (get) Token: 0x060004ED RID: 1261 RVA: 0x000124F4 File Offset: 0x000106F4
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<EnumValueOptions> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return EnumValueOptions._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000142 RID: 322
|
||||
// (get) Token: 0x060004EE RID: 1262 RVA: 0x000124FB File Offset: 0x000106FB
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorReflection.Descriptor.MessageTypes[14];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000143 RID: 323
|
||||
// (get) Token: 0x060004EF RID: 1263 RVA: 0x0001250E File Offset: 0x0001070E
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return EnumValueOptions.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060004F0 RID: 1264 RVA: 0x00012515 File Offset: 0x00010715
|
||||
[DebuggerNonUserCode]
|
||||
public EnumValueOptions()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060004F1 RID: 1265 RVA: 0x00012528 File Offset: 0x00010728
|
||||
[DebuggerNonUserCode]
|
||||
public EnumValueOptions(EnumValueOptions other)
|
||||
: this()
|
||||
{
|
||||
this.deprecated_ = other.deprecated_;
|
||||
this.uninterpretedOption_ = other.uninterpretedOption_.Clone();
|
||||
}
|
||||
|
||||
// Token: 0x060004F2 RID: 1266 RVA: 0x0001254D File Offset: 0x0001074D
|
||||
[DebuggerNonUserCode]
|
||||
public EnumValueOptions Clone()
|
||||
{
|
||||
return new EnumValueOptions(this);
|
||||
}
|
||||
|
||||
// Token: 0x17000144 RID: 324
|
||||
// (get) Token: 0x060004F3 RID: 1267 RVA: 0x00012555 File Offset: 0x00010755
|
||||
// (set) Token: 0x060004F4 RID: 1268 RVA: 0x0001255D File Offset: 0x0001075D
|
||||
[DebuggerNonUserCode]
|
||||
public bool Deprecated
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.deprecated_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.deprecated_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000145 RID: 325
|
||||
// (get) Token: 0x060004F5 RID: 1269 RVA: 0x00012566 File Offset: 0x00010766
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<UninterpretedOption> UninterpretedOption
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.uninterpretedOption_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060004F6 RID: 1270 RVA: 0x0001256E File Offset: 0x0001076E
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as EnumValueOptions);
|
||||
}
|
||||
|
||||
// Token: 0x060004F7 RID: 1271 RVA: 0x0001257C File Offset: 0x0001077C
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(EnumValueOptions other)
|
||||
{
|
||||
return other != null && (other == this || (this.Deprecated == other.Deprecated && this.uninterpretedOption_.Equals(other.uninterpretedOption_)));
|
||||
}
|
||||
|
||||
// Token: 0x060004F8 RID: 1272 RVA: 0x000125B0 File Offset: 0x000107B0
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Deprecated)
|
||||
{
|
||||
num ^= this.Deprecated.GetHashCode();
|
||||
}
|
||||
return num ^ this.uninterpretedOption_.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x060004F9 RID: 1273 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x060004FA RID: 1274 RVA: 0x000125E7 File Offset: 0x000107E7
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Deprecated)
|
||||
{
|
||||
output.WriteRawTag(8);
|
||||
output.WriteBool(this.Deprecated);
|
||||
}
|
||||
this.uninterpretedOption_.WriteTo(output, EnumValueOptions._repeated_uninterpretedOption_codec);
|
||||
}
|
||||
|
||||
// Token: 0x060004FB RID: 1275 RVA: 0x00012618 File Offset: 0x00010818
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Deprecated)
|
||||
{
|
||||
num += 2;
|
||||
}
|
||||
return num + this.uninterpretedOption_.CalculateSize(EnumValueOptions._repeated_uninterpretedOption_codec);
|
||||
}
|
||||
|
||||
// Token: 0x060004FC RID: 1276 RVA: 0x00012647 File Offset: 0x00010847
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(EnumValueOptions other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Deprecated)
|
||||
{
|
||||
this.Deprecated = other.Deprecated;
|
||||
}
|
||||
this.uninterpretedOption_.Add(other.uninterpretedOption_);
|
||||
}
|
||||
|
||||
// Token: 0x060004FD RID: 1277 RVA: 0x00012674 File Offset: 0x00010874
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 8U)
|
||||
{
|
||||
if (num != 7994U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.uninterpretedOption_.AddEntriesFrom(input, EnumValueOptions._repeated_uninterpretedOption_codec);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Deprecated = input.ReadBool();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040001DC RID: 476
|
||||
private static readonly MessageParser<EnumValueOptions> _parser = new MessageParser<EnumValueOptions>(() => new EnumValueOptions());
|
||||
|
||||
// Token: 0x040001DD RID: 477
|
||||
public const int DeprecatedFieldNumber = 1;
|
||||
|
||||
// Token: 0x040001DE RID: 478
|
||||
private bool deprecated_;
|
||||
|
||||
// Token: 0x040001DF RID: 479
|
||||
public const int UninterpretedOptionFieldNumber = 999;
|
||||
|
||||
// Token: 0x040001E0 RID: 480
|
||||
private static readonly FieldCodec<UninterpretedOption> _repeated_uninterpretedOption_codec = FieldCodec.ForMessage<UninterpretedOption>(7994U, Google.Protobuf.Reflection.UninterpretedOption.Parser);
|
||||
|
||||
// Token: 0x040001E1 RID: 481
|
||||
private readonly RepeatedField<UninterpretedOption> uninterpretedOption_ = new RepeatedField<UninterpretedOption>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x0200005B RID: 91
|
||||
internal abstract class FieldAccessorBase : IFieldAccessor
|
||||
{
|
||||
// Token: 0x06000582 RID: 1410 RVA: 0x00013B64 File Offset: 0x00011D64
|
||||
internal FieldAccessorBase(PropertyInfo property, FieldDescriptor descriptor)
|
||||
{
|
||||
this.descriptor = descriptor;
|
||||
this.getValueDelegate = ReflectionUtil.CreateFuncIMessageObject(property.GetGetMethod());
|
||||
}
|
||||
|
||||
// Token: 0x17000171 RID: 369
|
||||
// (get) Token: 0x06000583 RID: 1411 RVA: 0x00013B84 File Offset: 0x00011D84
|
||||
public FieldDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000584 RID: 1412 RVA: 0x00013B8C File Offset: 0x00011D8C
|
||||
public object GetValue(IMessage message)
|
||||
{
|
||||
return this.getValueDelegate(message);
|
||||
}
|
||||
|
||||
// Token: 0x06000585 RID: 1413
|
||||
public abstract void Clear(IMessage message);
|
||||
|
||||
// Token: 0x06000586 RID: 1414
|
||||
public abstract void SetValue(IMessage message, object value);
|
||||
|
||||
// Token: 0x04000216 RID: 534
|
||||
private readonly Func<IMessage, object> getValueDelegate;
|
||||
|
||||
// Token: 0x04000217 RID: 535
|
||||
private readonly FieldDescriptor descriptor;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,302 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x0200005C RID: 92
|
||||
public sealed class FieldDescriptor : DescriptorBase, IComparable<FieldDescriptor>
|
||||
{
|
||||
// Token: 0x17000172 RID: 370
|
||||
// (get) Token: 0x06000587 RID: 1415 RVA: 0x00013B9A File Offset: 0x00011D9A
|
||||
public MessageDescriptor ContainingType { get; }
|
||||
|
||||
// Token: 0x17000173 RID: 371
|
||||
// (get) Token: 0x06000588 RID: 1416 RVA: 0x00013BA2 File Offset: 0x00011DA2
|
||||
public OneofDescriptor ContainingOneof { get; }
|
||||
|
||||
// Token: 0x17000174 RID: 372
|
||||
// (get) Token: 0x06000589 RID: 1417 RVA: 0x00013BAA File Offset: 0x00011DAA
|
||||
public string JsonName { get; }
|
||||
|
||||
// Token: 0x17000175 RID: 373
|
||||
// (get) Token: 0x0600058A RID: 1418 RVA: 0x00013BB2 File Offset: 0x00011DB2
|
||||
internal FieldDescriptorProto Proto { get; }
|
||||
|
||||
// Token: 0x0600058B RID: 1419 RVA: 0x00013BBC File Offset: 0x00011DBC
|
||||
internal FieldDescriptor(FieldDescriptorProto proto, FileDescriptor file, MessageDescriptor parent, int index, string propertyName)
|
||||
: base(file, file.ComputeFullName(parent, proto.Name), index)
|
||||
{
|
||||
this.Proto = proto;
|
||||
if (proto.Type != (FieldDescriptorProto.Types.Type)0)
|
||||
{
|
||||
this.fieldType = FieldDescriptor.GetFieldTypeFromProtoType(proto.Type);
|
||||
}
|
||||
if (this.FieldNumber <= 0)
|
||||
{
|
||||
throw new DescriptorValidationException(this, "Field numbers must be positive integers.");
|
||||
}
|
||||
this.ContainingType = parent;
|
||||
if (proto.OneofIndex != -1)
|
||||
{
|
||||
if (proto.OneofIndex < 0 || proto.OneofIndex >= parent.Proto.OneofDecl.Count)
|
||||
{
|
||||
throw new DescriptorValidationException(this, string.Format("FieldDescriptorProto.oneof_index is out of range for type {0}", parent.Name));
|
||||
}
|
||||
this.ContainingOneof = parent.Oneofs[proto.OneofIndex];
|
||||
}
|
||||
file.DescriptorPool.AddSymbol(this);
|
||||
this.propertyName = propertyName;
|
||||
this.JsonName = ((this.Proto.JsonName == "") ? JsonFormatter.ToCamelCase(this.Proto.Name) : this.Proto.JsonName);
|
||||
}
|
||||
|
||||
// Token: 0x17000176 RID: 374
|
||||
// (get) Token: 0x0600058C RID: 1420 RVA: 0x00013CC1 File Offset: 0x00011EC1
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Proto.Name;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000177 RID: 375
|
||||
// (get) Token: 0x0600058D RID: 1421 RVA: 0x00013CCE File Offset: 0x00011ECE
|
||||
public IFieldAccessor Accessor
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.accessor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600058E RID: 1422 RVA: 0x00013CD8 File Offset: 0x00011ED8
|
||||
private static FieldType GetFieldTypeFromProtoType(FieldDescriptorProto.Types.Type type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case FieldDescriptorProto.Types.Type.Double:
|
||||
return FieldType.Double;
|
||||
case FieldDescriptorProto.Types.Type.Float:
|
||||
return FieldType.Float;
|
||||
case FieldDescriptorProto.Types.Type.Int64:
|
||||
return FieldType.Int64;
|
||||
case FieldDescriptorProto.Types.Type.Uint64:
|
||||
return FieldType.UInt64;
|
||||
case FieldDescriptorProto.Types.Type.Int32:
|
||||
return FieldType.Int32;
|
||||
case FieldDescriptorProto.Types.Type.Fixed64:
|
||||
return FieldType.Fixed64;
|
||||
case FieldDescriptorProto.Types.Type.Fixed32:
|
||||
return FieldType.Fixed32;
|
||||
case FieldDescriptorProto.Types.Type.Bool:
|
||||
return FieldType.Bool;
|
||||
case FieldDescriptorProto.Types.Type.String:
|
||||
return FieldType.String;
|
||||
case FieldDescriptorProto.Types.Type.Group:
|
||||
return FieldType.Group;
|
||||
case FieldDescriptorProto.Types.Type.Message:
|
||||
return FieldType.Message;
|
||||
case FieldDescriptorProto.Types.Type.Bytes:
|
||||
return FieldType.Bytes;
|
||||
case FieldDescriptorProto.Types.Type.Uint32:
|
||||
return FieldType.UInt32;
|
||||
case FieldDescriptorProto.Types.Type.Enum:
|
||||
return FieldType.Enum;
|
||||
case FieldDescriptorProto.Types.Type.Sfixed32:
|
||||
return FieldType.SFixed32;
|
||||
case FieldDescriptorProto.Types.Type.Sfixed64:
|
||||
return FieldType.SFixed64;
|
||||
case FieldDescriptorProto.Types.Type.Sint32:
|
||||
return FieldType.SInt32;
|
||||
case FieldDescriptorProto.Types.Type.Sint64:
|
||||
return FieldType.SInt64;
|
||||
default:
|
||||
throw new ArgumentException("Invalid type specified");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000178 RID: 376
|
||||
// (get) Token: 0x0600058F RID: 1423 RVA: 0x00013D6E File Offset: 0x00011F6E
|
||||
public bool IsRepeated
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Proto.Label == FieldDescriptorProto.Types.Label.Repeated;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000179 RID: 377
|
||||
// (get) Token: 0x06000590 RID: 1424 RVA: 0x00013D7E File Offset: 0x00011F7E
|
||||
public bool IsMap
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.fieldType == FieldType.Message && this.messageType.Proto.Options != null && this.messageType.Proto.Options.MapEntry;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700017A RID: 378
|
||||
// (get) Token: 0x06000591 RID: 1425 RVA: 0x00013DB3 File Offset: 0x00011FB3
|
||||
public bool IsPacked
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Proto.Options == null || this.Proto.Options.Packed;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700017B RID: 379
|
||||
// (get) Token: 0x06000592 RID: 1426 RVA: 0x00013DD4 File Offset: 0x00011FD4
|
||||
public FieldType FieldType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.fieldType;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700017C RID: 380
|
||||
// (get) Token: 0x06000593 RID: 1427 RVA: 0x00013DDC File Offset: 0x00011FDC
|
||||
public int FieldNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Proto.Number;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000594 RID: 1428 RVA: 0x00013DE9 File Offset: 0x00011FE9
|
||||
public int CompareTo(FieldDescriptor other)
|
||||
{
|
||||
if (other.ContainingType != this.ContainingType)
|
||||
{
|
||||
throw new ArgumentException("FieldDescriptors can only be compared to other FieldDescriptors for fields of the same message type.");
|
||||
}
|
||||
return this.FieldNumber - other.FieldNumber;
|
||||
}
|
||||
|
||||
// Token: 0x1700017D RID: 381
|
||||
// (get) Token: 0x06000595 RID: 1429 RVA: 0x00013E11 File Offset: 0x00012011
|
||||
public EnumDescriptor EnumType
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.fieldType != FieldType.Enum)
|
||||
{
|
||||
throw new InvalidOperationException("EnumType is only valid for enum fields.");
|
||||
}
|
||||
return this.enumType;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700017E RID: 382
|
||||
// (get) Token: 0x06000596 RID: 1430 RVA: 0x00013E2E File Offset: 0x0001202E
|
||||
public MessageDescriptor MessageType
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.fieldType != FieldType.Message)
|
||||
{
|
||||
throw new InvalidOperationException("MessageType is only valid for message fields.");
|
||||
}
|
||||
return this.messageType;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000597 RID: 1431 RVA: 0x00013E4C File Offset: 0x0001204C
|
||||
internal void CrossLink()
|
||||
{
|
||||
if (this.Proto.TypeName != "")
|
||||
{
|
||||
IDescriptor descriptor = base.File.DescriptorPool.LookupSymbol(this.Proto.TypeName, this);
|
||||
if (this.Proto.Type != (FieldDescriptorProto.Types.Type)0)
|
||||
{
|
||||
if (descriptor is MessageDescriptor)
|
||||
{
|
||||
this.fieldType = FieldType.Message;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(descriptor is EnumDescriptor))
|
||||
{
|
||||
throw new DescriptorValidationException(this, string.Format("\"{0}\" is not a type.", this.Proto.TypeName));
|
||||
}
|
||||
this.fieldType = FieldType.Enum;
|
||||
}
|
||||
}
|
||||
if (this.fieldType == FieldType.Message)
|
||||
{
|
||||
if (!(descriptor is MessageDescriptor))
|
||||
{
|
||||
throw new DescriptorValidationException(this, string.Format("\"{0}\" is not a message type.", this.Proto.TypeName));
|
||||
}
|
||||
this.messageType = (MessageDescriptor)descriptor;
|
||||
if (this.Proto.DefaultValue != "")
|
||||
{
|
||||
throw new DescriptorValidationException(this, "Messages can't have default values.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.fieldType != FieldType.Enum)
|
||||
{
|
||||
throw new DescriptorValidationException(this, "Field with primitive type has type_name.");
|
||||
}
|
||||
if (!(descriptor is EnumDescriptor))
|
||||
{
|
||||
throw new DescriptorValidationException(this, string.Format("\"{0}\" is not an enum type.", this.Proto.TypeName));
|
||||
}
|
||||
this.enumType = (EnumDescriptor)descriptor;
|
||||
}
|
||||
}
|
||||
else if (this.fieldType == FieldType.Message || this.fieldType == FieldType.Enum)
|
||||
{
|
||||
throw new DescriptorValidationException(this, "Field with message or enum type missing type_name.");
|
||||
}
|
||||
base.File.DescriptorPool.AddFieldByNumber(this);
|
||||
if (this.ContainingType != null && this.ContainingType.Proto.Options != null && this.ContainingType.Proto.Options.MessageSetWireFormat)
|
||||
{
|
||||
throw new DescriptorValidationException(this, "MessageSet format is not supported.");
|
||||
}
|
||||
this.accessor = this.CreateAccessor();
|
||||
}
|
||||
|
||||
// Token: 0x06000598 RID: 1432 RVA: 0x00013FFC File Offset: 0x000121FC
|
||||
private IFieldAccessor CreateAccessor()
|
||||
{
|
||||
if (this.propertyName == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
PropertyInfo property = this.ContainingType.ClrType.GetProperty(this.propertyName);
|
||||
if (property == null)
|
||||
{
|
||||
throw new DescriptorValidationException(this, string.Format("Property {0} not found in {1}", this.propertyName, this.ContainingType.ClrType));
|
||||
}
|
||||
if (this.IsMap)
|
||||
{
|
||||
return new MapFieldAccessor(property, this);
|
||||
}
|
||||
if (!this.IsRepeated)
|
||||
{
|
||||
return new SingleFieldAccessor(property, this);
|
||||
}
|
||||
return new RepeatedFieldAccessor(property, this);
|
||||
}
|
||||
|
||||
// Token: 0x04000218 RID: 536
|
||||
private EnumDescriptor enumType;
|
||||
|
||||
// Token: 0x04000219 RID: 537
|
||||
private MessageDescriptor messageType;
|
||||
|
||||
// Token: 0x0400021A RID: 538
|
||||
private FieldType fieldType;
|
||||
|
||||
// Token: 0x0400021B RID: 539
|
||||
private readonly string propertyName;
|
||||
|
||||
// Token: 0x0400021C RID: 540
|
||||
private IFieldAccessor accessor;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,687 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,477 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x0200005D RID: 93
|
||||
public enum FieldType
|
||||
{
|
||||
// Token: 0x04000222 RID: 546
|
||||
Double,
|
||||
// Token: 0x04000223 RID: 547
|
||||
Float,
|
||||
// Token: 0x04000224 RID: 548
|
||||
Int64,
|
||||
// Token: 0x04000225 RID: 549
|
||||
UInt64,
|
||||
// Token: 0x04000226 RID: 550
|
||||
Int32,
|
||||
// Token: 0x04000227 RID: 551
|
||||
Fixed64,
|
||||
// Token: 0x04000228 RID: 552
|
||||
Fixed32,
|
||||
// Token: 0x04000229 RID: 553
|
||||
Bool,
|
||||
// Token: 0x0400022A RID: 554
|
||||
String,
|
||||
// Token: 0x0400022B RID: 555
|
||||
Group,
|
||||
// Token: 0x0400022C RID: 556
|
||||
Message,
|
||||
// Token: 0x0400022D RID: 557
|
||||
Bytes,
|
||||
// Token: 0x0400022E RID: 558
|
||||
UInt32,
|
||||
// Token: 0x0400022F RID: 559
|
||||
SFixed32,
|
||||
// Token: 0x04000230 RID: 560
|
||||
SFixed64,
|
||||
// Token: 0x04000231 RID: 561
|
||||
SInt32,
|
||||
// Token: 0x04000232 RID: 562
|
||||
SInt64,
|
||||
// Token: 0x04000233 RID: 563
|
||||
Enum
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,233 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x0200005E RID: 94
|
||||
public sealed class FileDescriptor : IDescriptor
|
||||
{
|
||||
// Token: 0x06000599 RID: 1433 RVA: 0x0001407C File Offset: 0x0001227C
|
||||
private FileDescriptor(ByteString descriptorData, FileDescriptorProto proto, FileDescriptor[] dependencies, DescriptorPool pool, bool allowUnknownDependencies, GeneratedClrTypeInfo generatedCodeInfo)
|
||||
{
|
||||
FileDescriptor <>4__this = this;
|
||||
this.SerializedData = descriptorData;
|
||||
this.DescriptorPool = pool;
|
||||
this.Proto = proto;
|
||||
this.Dependencies = new ReadOnlyCollection<FileDescriptor>((FileDescriptor[])dependencies.Clone());
|
||||
this.PublicDependencies = FileDescriptor.DeterminePublicDependencies(this, proto, dependencies, allowUnknownDependencies);
|
||||
pool.AddPackage(this.Package, this);
|
||||
this.MessageTypes = DescriptorUtil.ConvertAndMakeReadOnly<DescriptorProto, MessageDescriptor>(proto.MessageType, (DescriptorProto message, int index) => new MessageDescriptor(message, <>4__this, null, index, generatedCodeInfo.NestedTypes[index]));
|
||||
this.EnumTypes = DescriptorUtil.ConvertAndMakeReadOnly<EnumDescriptorProto, EnumDescriptor>(proto.EnumType, (EnumDescriptorProto enumType, int index) => new EnumDescriptor(enumType, <>4__this, null, index, generatedCodeInfo.NestedEnums[index]));
|
||||
this.Services = DescriptorUtil.ConvertAndMakeReadOnly<ServiceDescriptorProto, ServiceDescriptor>(proto.Service, (ServiceDescriptorProto service, int index) => new ServiceDescriptor(service, this, index));
|
||||
}
|
||||
|
||||
// Token: 0x0600059A RID: 1434 RVA: 0x00014145 File Offset: 0x00012345
|
||||
internal string ComputeFullName(MessageDescriptor parent, string name)
|
||||
{
|
||||
if (parent != null)
|
||||
{
|
||||
return parent.FullName + "." + name;
|
||||
}
|
||||
if (this.Package.Length > 0)
|
||||
{
|
||||
return this.Package + "." + name;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
// Token: 0x0600059B RID: 1435 RVA: 0x00014180 File Offset: 0x00012380
|
||||
private static IList<FileDescriptor> DeterminePublicDependencies(FileDescriptor @this, FileDescriptorProto proto, FileDescriptor[] dependencies, bool allowUnknownDependencies)
|
||||
{
|
||||
Dictionary<string, FileDescriptor> dictionary = new Dictionary<string, FileDescriptor>();
|
||||
foreach (FileDescriptor fileDescriptor in dependencies)
|
||||
{
|
||||
dictionary[fileDescriptor.Name] = fileDescriptor;
|
||||
}
|
||||
List<FileDescriptor> list = new List<FileDescriptor>();
|
||||
for (int j = 0; j < proto.PublicDependency.Count; j++)
|
||||
{
|
||||
int num = proto.PublicDependency[j];
|
||||
if (num < 0 || num >= proto.Dependency.Count)
|
||||
{
|
||||
throw new DescriptorValidationException(@this, "Invalid public dependency index.");
|
||||
}
|
||||
string text = proto.Dependency[num];
|
||||
FileDescriptor fileDescriptor2 = dictionary[text];
|
||||
if (fileDescriptor2 == null)
|
||||
{
|
||||
if (!allowUnknownDependencies)
|
||||
{
|
||||
throw new DescriptorValidationException(@this, "Invalid public dependency: " + text);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add(fileDescriptor2);
|
||||
}
|
||||
}
|
||||
return new ReadOnlyCollection<FileDescriptor>(list);
|
||||
}
|
||||
|
||||
// Token: 0x1700017F RID: 383
|
||||
// (get) Token: 0x0600059C RID: 1436 RVA: 0x00014247 File Offset: 0x00012447
|
||||
internal FileDescriptorProto Proto { get; }
|
||||
|
||||
// Token: 0x17000180 RID: 384
|
||||
// (get) Token: 0x0600059D RID: 1437 RVA: 0x0001424F File Offset: 0x0001244F
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Proto.Name;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000181 RID: 385
|
||||
// (get) Token: 0x0600059E RID: 1438 RVA: 0x0001425C File Offset: 0x0001245C
|
||||
public string Package
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Proto.Package;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000182 RID: 386
|
||||
// (get) Token: 0x0600059F RID: 1439 RVA: 0x00014269 File Offset: 0x00012469
|
||||
public IList<MessageDescriptor> MessageTypes { get; }
|
||||
|
||||
// Token: 0x17000183 RID: 387
|
||||
// (get) Token: 0x060005A0 RID: 1440 RVA: 0x00014271 File Offset: 0x00012471
|
||||
public IList<EnumDescriptor> EnumTypes { get; }
|
||||
|
||||
// Token: 0x17000184 RID: 388
|
||||
// (get) Token: 0x060005A1 RID: 1441 RVA: 0x00014279 File Offset: 0x00012479
|
||||
public IList<ServiceDescriptor> Services { get; }
|
||||
|
||||
// Token: 0x17000185 RID: 389
|
||||
// (get) Token: 0x060005A2 RID: 1442 RVA: 0x00014281 File Offset: 0x00012481
|
||||
public IList<FileDescriptor> Dependencies { get; }
|
||||
|
||||
// Token: 0x17000186 RID: 390
|
||||
// (get) Token: 0x060005A3 RID: 1443 RVA: 0x00014289 File Offset: 0x00012489
|
||||
public IList<FileDescriptor> PublicDependencies { get; }
|
||||
|
||||
// Token: 0x17000187 RID: 391
|
||||
// (get) Token: 0x060005A4 RID: 1444 RVA: 0x00014291 File Offset: 0x00012491
|
||||
public ByteString SerializedData { get; }
|
||||
|
||||
// Token: 0x17000188 RID: 392
|
||||
// (get) Token: 0x060005A5 RID: 1445 RVA: 0x00014299 File Offset: 0x00012499
|
||||
string IDescriptor.FullName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Name;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000189 RID: 393
|
||||
// (get) Token: 0x060005A6 RID: 1446 RVA: 0x000142A1 File Offset: 0x000124A1
|
||||
FileDescriptor IDescriptor.File
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700018A RID: 394
|
||||
// (get) Token: 0x060005A7 RID: 1447 RVA: 0x000142A4 File Offset: 0x000124A4
|
||||
internal DescriptorPool DescriptorPool { get; }
|
||||
|
||||
// Token: 0x060005A8 RID: 1448 RVA: 0x000142AC File Offset: 0x000124AC
|
||||
public T FindTypeByName<T>(string name) where T : class, IDescriptor
|
||||
{
|
||||
if (name.IndexOf('.') != -1)
|
||||
{
|
||||
return default(T);
|
||||
}
|
||||
if (this.Package.Length > 0)
|
||||
{
|
||||
name = this.Package + "." + name;
|
||||
}
|
||||
T t = this.DescriptorPool.FindSymbol<T>(name);
|
||||
if (t != null && t.File == this)
|
||||
{
|
||||
return t;
|
||||
}
|
||||
return default(T);
|
||||
}
|
||||
|
||||
// Token: 0x060005A9 RID: 1449 RVA: 0x00014320 File Offset: 0x00012520
|
||||
private static FileDescriptor BuildFrom(ByteString descriptorData, FileDescriptorProto proto, FileDescriptor[] dependencies, bool allowUnknownDependencies, GeneratedClrTypeInfo generatedCodeInfo)
|
||||
{
|
||||
if (dependencies == null)
|
||||
{
|
||||
dependencies = new FileDescriptor[0];
|
||||
}
|
||||
DescriptorPool descriptorPool = new DescriptorPool(dependencies);
|
||||
FileDescriptor fileDescriptor = new FileDescriptor(descriptorData, proto, dependencies, descriptorPool, allowUnknownDependencies, generatedCodeInfo);
|
||||
if (dependencies.Length != proto.Dependency.Count)
|
||||
{
|
||||
throw new DescriptorValidationException(fileDescriptor, "Dependencies passed to FileDescriptor.BuildFrom() don't match those listed in the FileDescriptorProto.");
|
||||
}
|
||||
fileDescriptor.CrossLink();
|
||||
return fileDescriptor;
|
||||
}
|
||||
|
||||
// Token: 0x060005AA RID: 1450 RVA: 0x00014370 File Offset: 0x00012570
|
||||
private void CrossLink()
|
||||
{
|
||||
foreach (MessageDescriptor messageDescriptor in this.MessageTypes)
|
||||
{
|
||||
messageDescriptor.CrossLink();
|
||||
}
|
||||
foreach (ServiceDescriptor serviceDescriptor in this.Services)
|
||||
{
|
||||
serviceDescriptor.CrossLink();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060005AB RID: 1451 RVA: 0x000143F4 File Offset: 0x000125F4
|
||||
public static FileDescriptor FromGeneratedCode(byte[] descriptorData, FileDescriptor[] dependencies, GeneratedClrTypeInfo generatedCodeInfo)
|
||||
{
|
||||
FileDescriptorProto fileDescriptorProto;
|
||||
try
|
||||
{
|
||||
fileDescriptorProto = FileDescriptorProto.Parser.ParseFrom(descriptorData);
|
||||
}
|
||||
catch (InvalidProtocolBufferException ex)
|
||||
{
|
||||
throw new ArgumentException("Failed to parse protocol buffer descriptor for generated code.", ex);
|
||||
}
|
||||
FileDescriptor fileDescriptor;
|
||||
try
|
||||
{
|
||||
fileDescriptor = FileDescriptor.BuildFrom(ByteString.CopyFrom(descriptorData), fileDescriptorProto, dependencies, true, generatedCodeInfo);
|
||||
}
|
||||
catch (DescriptorValidationException ex2)
|
||||
{
|
||||
throw new ArgumentException(string.Format("Invalid embedded descriptor for \"{0}\".", fileDescriptorProto.Name), ex2);
|
||||
}
|
||||
return fileDescriptor;
|
||||
}
|
||||
|
||||
// Token: 0x060005AC RID: 1452 RVA: 0x00014464 File Offset: 0x00012664
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("FileDescriptor for {0}", this.Name);
|
||||
}
|
||||
|
||||
// Token: 0x1700018B RID: 395
|
||||
// (get) Token: 0x060005AD RID: 1453 RVA: 0x00014476 File Offset: 0x00012676
|
||||
public static FileDescriptor DescriptorProtoFileDescriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorReflection.Descriptor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,611 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Collections;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000042 RID: 66
|
||||
internal sealed class FileDescriptorProto : IMessage<FileDescriptorProto>, IMessage, IEquatable<FileDescriptorProto>, IDeepCloneable<FileDescriptorProto>
|
||||
{
|
||||
// Token: 0x170000CA RID: 202
|
||||
// (get) Token: 0x0600039E RID: 926 RVA: 0x0000DFC0 File Offset: 0x0000C1C0
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<FileDescriptorProto> 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<string>(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<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000CF RID: 207
|
||||
// (get) Token: 0x060003A8 RID: 936 RVA: 0x0000E188 File Offset: 0x0000C388
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<string> Dependency
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dependency_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000D0 RID: 208
|
||||
// (get) Token: 0x060003A9 RID: 937 RVA: 0x0000E190 File Offset: 0x0000C390
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<int> PublicDependency
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.publicDependency_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000D1 RID: 209
|
||||
// (get) Token: 0x060003AA RID: 938 RVA: 0x0000E198 File Offset: 0x0000C398
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<int> WeakDependency
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.weakDependency_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000D2 RID: 210
|
||||
// (get) Token: 0x060003AB RID: 939 RVA: 0x0000E1A0 File Offset: 0x0000C3A0
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<DescriptorProto> MessageType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.messageType_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000D3 RID: 211
|
||||
// (get) Token: 0x060003AC RID: 940 RVA: 0x0000E1A8 File Offset: 0x0000C3A8
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<EnumDescriptorProto> EnumType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.enumType_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000D4 RID: 212
|
||||
// (get) Token: 0x060003AD RID: 941 RVA: 0x0000E1B0 File Offset: 0x0000C3B0
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<ServiceDescriptorProto> Service
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.service_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000D5 RID: 213
|
||||
// (get) Token: 0x060003AE RID: 942 RVA: 0x0000E1B8 File Offset: 0x0000C3B8
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<FieldDescriptorProto> 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<string>(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<FileDescriptorProto> _parser = new MessageParser<FileDescriptorProto>(() => 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<string> _repeated_dependency_codec = FieldCodec.ForString(26U);
|
||||
|
||||
// Token: 0x04000120 RID: 288
|
||||
private readonly RepeatedField<string> dependency_ = new RepeatedField<string>();
|
||||
|
||||
// Token: 0x04000121 RID: 289
|
||||
public const int PublicDependencyFieldNumber = 10;
|
||||
|
||||
// Token: 0x04000122 RID: 290
|
||||
private static readonly FieldCodec<int> _repeated_publicDependency_codec = FieldCodec.ForInt32(80U);
|
||||
|
||||
// Token: 0x04000123 RID: 291
|
||||
private readonly RepeatedField<int> publicDependency_ = new RepeatedField<int>();
|
||||
|
||||
// Token: 0x04000124 RID: 292
|
||||
public const int WeakDependencyFieldNumber = 11;
|
||||
|
||||
// Token: 0x04000125 RID: 293
|
||||
private static readonly FieldCodec<int> _repeated_weakDependency_codec = FieldCodec.ForInt32(88U);
|
||||
|
||||
// Token: 0x04000126 RID: 294
|
||||
private readonly RepeatedField<int> weakDependency_ = new RepeatedField<int>();
|
||||
|
||||
// Token: 0x04000127 RID: 295
|
||||
public const int MessageTypeFieldNumber = 4;
|
||||
|
||||
// Token: 0x04000128 RID: 296
|
||||
private static readonly FieldCodec<DescriptorProto> _repeated_messageType_codec = FieldCodec.ForMessage<DescriptorProto>(34U, DescriptorProto.Parser);
|
||||
|
||||
// Token: 0x04000129 RID: 297
|
||||
private readonly RepeatedField<DescriptorProto> messageType_ = new RepeatedField<DescriptorProto>();
|
||||
|
||||
// Token: 0x0400012A RID: 298
|
||||
public const int EnumTypeFieldNumber = 5;
|
||||
|
||||
// Token: 0x0400012B RID: 299
|
||||
private static readonly FieldCodec<EnumDescriptorProto> _repeated_enumType_codec = FieldCodec.ForMessage<EnumDescriptorProto>(42U, EnumDescriptorProto.Parser);
|
||||
|
||||
// Token: 0x0400012C RID: 300
|
||||
private readonly RepeatedField<EnumDescriptorProto> enumType_ = new RepeatedField<EnumDescriptorProto>();
|
||||
|
||||
// Token: 0x0400012D RID: 301
|
||||
public const int ServiceFieldNumber = 6;
|
||||
|
||||
// Token: 0x0400012E RID: 302
|
||||
private static readonly FieldCodec<ServiceDescriptorProto> _repeated_service_codec = FieldCodec.ForMessage<ServiceDescriptorProto>(50U, ServiceDescriptorProto.Parser);
|
||||
|
||||
// Token: 0x0400012F RID: 303
|
||||
private readonly RepeatedField<ServiceDescriptorProto> service_ = new RepeatedField<ServiceDescriptorProto>();
|
||||
|
||||
// Token: 0x04000130 RID: 304
|
||||
public const int ExtensionFieldNumber = 7;
|
||||
|
||||
// Token: 0x04000131 RID: 305
|
||||
private static readonly FieldCodec<FieldDescriptorProto> _repeated_extension_codec = FieldCodec.ForMessage<FieldDescriptorProto>(58U, FieldDescriptorProto.Parser);
|
||||
|
||||
// Token: 0x04000132 RID: 306
|
||||
private readonly RepeatedField<FieldDescriptorProto> extension_ = new RepeatedField<FieldDescriptorProto>();
|
||||
|
||||
// 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_ = "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,158 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Collections;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000041 RID: 65
|
||||
internal sealed class FileDescriptorSet : IMessage<FileDescriptorSet>, IMessage, IEquatable<FileDescriptorSet>, IDeepCloneable<FileDescriptorSet>
|
||||
{
|
||||
// Token: 0x170000C6 RID: 198
|
||||
// (get) Token: 0x0600038E RID: 910 RVA: 0x0000DE82 File Offset: 0x0000C082
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<FileDescriptorSet> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return FileDescriptorSet._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000C7 RID: 199
|
||||
// (get) Token: 0x0600038F RID: 911 RVA: 0x0000DE89 File Offset: 0x0000C089
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorReflection.Descriptor.MessageTypes[0];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000C8 RID: 200
|
||||
// (get) Token: 0x06000390 RID: 912 RVA: 0x0000DE9B File Offset: 0x0000C09B
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return FileDescriptorSet.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000391 RID: 913 RVA: 0x0000DEA2 File Offset: 0x0000C0A2
|
||||
[DebuggerNonUserCode]
|
||||
public FileDescriptorSet()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000392 RID: 914 RVA: 0x0000DEB5 File Offset: 0x0000C0B5
|
||||
[DebuggerNonUserCode]
|
||||
public FileDescriptorSet(FileDescriptorSet other)
|
||||
: this()
|
||||
{
|
||||
this.file_ = other.file_.Clone();
|
||||
}
|
||||
|
||||
// Token: 0x06000393 RID: 915 RVA: 0x0000DECE File Offset: 0x0000C0CE
|
||||
[DebuggerNonUserCode]
|
||||
public FileDescriptorSet Clone()
|
||||
{
|
||||
return new FileDescriptorSet(this);
|
||||
}
|
||||
|
||||
// Token: 0x170000C9 RID: 201
|
||||
// (get) Token: 0x06000394 RID: 916 RVA: 0x0000DED6 File Offset: 0x0000C0D6
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<FileDescriptorProto> File
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.file_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000395 RID: 917 RVA: 0x0000DEDE File Offset: 0x0000C0DE
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as FileDescriptorSet);
|
||||
}
|
||||
|
||||
// Token: 0x06000396 RID: 918 RVA: 0x0000DEEC File Offset: 0x0000C0EC
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(FileDescriptorSet other)
|
||||
{
|
||||
return other != null && (other == this || this.file_.Equals(other.file_));
|
||||
}
|
||||
|
||||
// Token: 0x06000397 RID: 919 RVA: 0x0000DF0F File Offset: 0x0000C10F
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return 1 ^ this.file_.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x06000398 RID: 920 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x06000399 RID: 921 RVA: 0x0000DF1E File Offset: 0x0000C11E
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
this.file_.WriteTo(output, FileDescriptorSet._repeated_file_codec);
|
||||
}
|
||||
|
||||
// Token: 0x0600039A RID: 922 RVA: 0x0000DF31 File Offset: 0x0000C131
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
return 0 + this.file_.CalculateSize(FileDescriptorSet._repeated_file_codec);
|
||||
}
|
||||
|
||||
// Token: 0x0600039B RID: 923 RVA: 0x0000DF45 File Offset: 0x0000C145
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(FileDescriptorSet other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.file_.Add(other.file_);
|
||||
}
|
||||
|
||||
// Token: 0x0600039C RID: 924 RVA: 0x0000DF5C File Offset: 0x0000C15C
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 10U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.file_.AddEntriesFrom(input, FileDescriptorSet._repeated_file_codec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000115 RID: 277
|
||||
private static readonly MessageParser<FileDescriptorSet> _parser = new MessageParser<FileDescriptorSet>(() => new FileDescriptorSet());
|
||||
|
||||
// Token: 0x04000116 RID: 278
|
||||
public const int FileFieldNumber = 1;
|
||||
|
||||
// Token: 0x04000117 RID: 279
|
||||
private static readonly FieldCodec<FileDescriptorProto> _repeated_file_codec = FieldCodec.ForMessage<FileDescriptorProto>(10U, FileDescriptorProto.Parser);
|
||||
|
||||
// Token: 0x04000118 RID: 280
|
||||
private readonly RepeatedField<FileDescriptorProto> file_ = new RepeatedField<FileDescriptorProto>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,835 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Collections;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x0200004A RID: 74
|
||||
internal sealed class FileOptions : IMessage<FileOptions>, IMessage, IEquatable<FileOptions>, IDeepCloneable<FileOptions>
|
||||
{
|
||||
// Token: 0x17000113 RID: 275
|
||||
// (get) Token: 0x06000468 RID: 1128 RVA: 0x00010C01 File Offset: 0x0000EE01
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<FileOptions> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return FileOptions._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000114 RID: 276
|
||||
// (get) Token: 0x06000469 RID: 1129 RVA: 0x00010C08 File Offset: 0x0000EE08
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorReflection.Descriptor.MessageTypes[9];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000115 RID: 277
|
||||
// (get) Token: 0x0600046A RID: 1130 RVA: 0x00010C1B File Offset: 0x0000EE1B
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return FileOptions.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600046B RID: 1131 RVA: 0x00010C24 File Offset: 0x0000EE24
|
||||
[DebuggerNonUserCode]
|
||||
public FileOptions()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600046C RID: 1132 RVA: 0x00010C7C File Offset: 0x0000EE7C
|
||||
[DebuggerNonUserCode]
|
||||
public FileOptions(FileOptions other)
|
||||
: this()
|
||||
{
|
||||
this.javaPackage_ = other.javaPackage_;
|
||||
this.javaOuterClassname_ = other.javaOuterClassname_;
|
||||
this.javaMultipleFiles_ = other.javaMultipleFiles_;
|
||||
this.javaGenerateEqualsAndHash_ = other.javaGenerateEqualsAndHash_;
|
||||
this.javaStringCheckUtf8_ = other.javaStringCheckUtf8_;
|
||||
this.optimizeFor_ = other.optimizeFor_;
|
||||
this.goPackage_ = other.goPackage_;
|
||||
this.ccGenericServices_ = other.ccGenericServices_;
|
||||
this.javaGenericServices_ = other.javaGenericServices_;
|
||||
this.pyGenericServices_ = other.pyGenericServices_;
|
||||
this.deprecated_ = other.deprecated_;
|
||||
this.ccEnableArenas_ = other.ccEnableArenas_;
|
||||
this.objcClassPrefix_ = other.objcClassPrefix_;
|
||||
this.csharpNamespace_ = other.csharpNamespace_;
|
||||
this.uninterpretedOption_ = other.uninterpretedOption_.Clone();
|
||||
}
|
||||
|
||||
// Token: 0x0600046D RID: 1133 RVA: 0x00010D48 File Offset: 0x0000EF48
|
||||
[DebuggerNonUserCode]
|
||||
public FileOptions Clone()
|
||||
{
|
||||
return new FileOptions(this);
|
||||
}
|
||||
|
||||
// Token: 0x17000116 RID: 278
|
||||
// (get) Token: 0x0600046E RID: 1134 RVA: 0x00010D50 File Offset: 0x0000EF50
|
||||
// (set) Token: 0x0600046F RID: 1135 RVA: 0x00010D58 File Offset: 0x0000EF58
|
||||
[DebuggerNonUserCode]
|
||||
public string JavaPackage
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.javaPackage_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.javaPackage_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000117 RID: 279
|
||||
// (get) Token: 0x06000470 RID: 1136 RVA: 0x00010D6B File Offset: 0x0000EF6B
|
||||
// (set) Token: 0x06000471 RID: 1137 RVA: 0x00010D73 File Offset: 0x0000EF73
|
||||
[DebuggerNonUserCode]
|
||||
public string JavaOuterClassname
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.javaOuterClassname_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.javaOuterClassname_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000118 RID: 280
|
||||
// (get) Token: 0x06000472 RID: 1138 RVA: 0x00010D86 File Offset: 0x0000EF86
|
||||
// (set) Token: 0x06000473 RID: 1139 RVA: 0x00010D8E File Offset: 0x0000EF8E
|
||||
[DebuggerNonUserCode]
|
||||
public bool JavaMultipleFiles
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.javaMultipleFiles_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.javaMultipleFiles_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000119 RID: 281
|
||||
// (get) Token: 0x06000474 RID: 1140 RVA: 0x00010D97 File Offset: 0x0000EF97
|
||||
// (set) Token: 0x06000475 RID: 1141 RVA: 0x00010D9F File Offset: 0x0000EF9F
|
||||
[Obsolete]
|
||||
[DebuggerNonUserCode]
|
||||
public bool JavaGenerateEqualsAndHash
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.javaGenerateEqualsAndHash_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.javaGenerateEqualsAndHash_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700011A RID: 282
|
||||
// (get) Token: 0x06000476 RID: 1142 RVA: 0x00010DA8 File Offset: 0x0000EFA8
|
||||
// (set) Token: 0x06000477 RID: 1143 RVA: 0x00010DB0 File Offset: 0x0000EFB0
|
||||
[DebuggerNonUserCode]
|
||||
public bool JavaStringCheckUtf8
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.javaStringCheckUtf8_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.javaStringCheckUtf8_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700011B RID: 283
|
||||
// (get) Token: 0x06000478 RID: 1144 RVA: 0x00010DB9 File Offset: 0x0000EFB9
|
||||
// (set) Token: 0x06000479 RID: 1145 RVA: 0x00010DC1 File Offset: 0x0000EFC1
|
||||
[DebuggerNonUserCode]
|
||||
public FileOptions.Types.OptimizeMode OptimizeFor
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.optimizeFor_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.optimizeFor_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700011C RID: 284
|
||||
// (get) Token: 0x0600047A RID: 1146 RVA: 0x00010DCA File Offset: 0x0000EFCA
|
||||
// (set) Token: 0x0600047B RID: 1147 RVA: 0x00010DD2 File Offset: 0x0000EFD2
|
||||
[DebuggerNonUserCode]
|
||||
public string GoPackage
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.goPackage_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.goPackage_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700011D RID: 285
|
||||
// (get) Token: 0x0600047C RID: 1148 RVA: 0x00010DE5 File Offset: 0x0000EFE5
|
||||
// (set) Token: 0x0600047D RID: 1149 RVA: 0x00010DED File Offset: 0x0000EFED
|
||||
[DebuggerNonUserCode]
|
||||
public bool CcGenericServices
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.ccGenericServices_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.ccGenericServices_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700011E RID: 286
|
||||
// (get) Token: 0x0600047E RID: 1150 RVA: 0x00010DF6 File Offset: 0x0000EFF6
|
||||
// (set) Token: 0x0600047F RID: 1151 RVA: 0x00010DFE File Offset: 0x0000EFFE
|
||||
[DebuggerNonUserCode]
|
||||
public bool JavaGenericServices
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.javaGenericServices_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.javaGenericServices_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700011F RID: 287
|
||||
// (get) Token: 0x06000480 RID: 1152 RVA: 0x00010E07 File Offset: 0x0000F007
|
||||
// (set) Token: 0x06000481 RID: 1153 RVA: 0x00010E0F File Offset: 0x0000F00F
|
||||
[DebuggerNonUserCode]
|
||||
public bool PyGenericServices
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.pyGenericServices_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.pyGenericServices_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000120 RID: 288
|
||||
// (get) Token: 0x06000482 RID: 1154 RVA: 0x00010E18 File Offset: 0x0000F018
|
||||
// (set) Token: 0x06000483 RID: 1155 RVA: 0x00010E20 File Offset: 0x0000F020
|
||||
[DebuggerNonUserCode]
|
||||
public bool Deprecated
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.deprecated_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.deprecated_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000121 RID: 289
|
||||
// (get) Token: 0x06000484 RID: 1156 RVA: 0x00010E29 File Offset: 0x0000F029
|
||||
// (set) Token: 0x06000485 RID: 1157 RVA: 0x00010E31 File Offset: 0x0000F031
|
||||
[DebuggerNonUserCode]
|
||||
public bool CcEnableArenas
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.ccEnableArenas_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.ccEnableArenas_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000122 RID: 290
|
||||
// (get) Token: 0x06000486 RID: 1158 RVA: 0x00010E3A File Offset: 0x0000F03A
|
||||
// (set) Token: 0x06000487 RID: 1159 RVA: 0x00010E42 File Offset: 0x0000F042
|
||||
[DebuggerNonUserCode]
|
||||
public string ObjcClassPrefix
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.objcClassPrefix_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.objcClassPrefix_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000123 RID: 291
|
||||
// (get) Token: 0x06000488 RID: 1160 RVA: 0x00010E55 File Offset: 0x0000F055
|
||||
// (set) Token: 0x06000489 RID: 1161 RVA: 0x00010E5D File Offset: 0x0000F05D
|
||||
[DebuggerNonUserCode]
|
||||
public string CsharpNamespace
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.csharpNamespace_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.csharpNamespace_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000124 RID: 292
|
||||
// (get) Token: 0x0600048A RID: 1162 RVA: 0x00010E70 File Offset: 0x0000F070
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<UninterpretedOption> UninterpretedOption
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.uninterpretedOption_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600048B RID: 1163 RVA: 0x00010E78 File Offset: 0x0000F078
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as FileOptions);
|
||||
}
|
||||
|
||||
// Token: 0x0600048C RID: 1164 RVA: 0x00010E88 File Offset: 0x0000F088
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(FileOptions other)
|
||||
{
|
||||
return other != null && (other == this || (!(this.JavaPackage != other.JavaPackage) && !(this.JavaOuterClassname != other.JavaOuterClassname) && this.JavaMultipleFiles == other.JavaMultipleFiles && this.JavaGenerateEqualsAndHash == other.JavaGenerateEqualsAndHash && this.JavaStringCheckUtf8 == other.JavaStringCheckUtf8 && this.OptimizeFor == other.OptimizeFor && !(this.GoPackage != other.GoPackage) && this.CcGenericServices == other.CcGenericServices && this.JavaGenericServices == other.JavaGenericServices && this.PyGenericServices == other.PyGenericServices && this.Deprecated == other.Deprecated && this.CcEnableArenas == other.CcEnableArenas && !(this.ObjcClassPrefix != other.ObjcClassPrefix) && !(this.CsharpNamespace != other.CsharpNamespace) && this.uninterpretedOption_.Equals(other.uninterpretedOption_)));
|
||||
}
|
||||
|
||||
// Token: 0x0600048D RID: 1165 RVA: 0x00010FB0 File Offset: 0x0000F1B0
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.JavaPackage.Length != 0)
|
||||
{
|
||||
num ^= this.JavaPackage.GetHashCode();
|
||||
}
|
||||
if (this.JavaOuterClassname.Length != 0)
|
||||
{
|
||||
num ^= this.JavaOuterClassname.GetHashCode();
|
||||
}
|
||||
if (this.JavaMultipleFiles)
|
||||
{
|
||||
num ^= this.JavaMultipleFiles.GetHashCode();
|
||||
}
|
||||
if (this.JavaGenerateEqualsAndHash)
|
||||
{
|
||||
num ^= this.JavaGenerateEqualsAndHash.GetHashCode();
|
||||
}
|
||||
if (this.JavaStringCheckUtf8)
|
||||
{
|
||||
num ^= this.JavaStringCheckUtf8.GetHashCode();
|
||||
}
|
||||
if (this.OptimizeFor != (FileOptions.Types.OptimizeMode)0)
|
||||
{
|
||||
num ^= this.OptimizeFor.GetHashCode();
|
||||
}
|
||||
if (this.GoPackage.Length != 0)
|
||||
{
|
||||
num ^= this.GoPackage.GetHashCode();
|
||||
}
|
||||
if (this.CcGenericServices)
|
||||
{
|
||||
num ^= this.CcGenericServices.GetHashCode();
|
||||
}
|
||||
if (this.JavaGenericServices)
|
||||
{
|
||||
num ^= this.JavaGenericServices.GetHashCode();
|
||||
}
|
||||
if (this.PyGenericServices)
|
||||
{
|
||||
num ^= this.PyGenericServices.GetHashCode();
|
||||
}
|
||||
if (this.Deprecated)
|
||||
{
|
||||
num ^= this.Deprecated.GetHashCode();
|
||||
}
|
||||
if (this.CcEnableArenas)
|
||||
{
|
||||
num ^= this.CcEnableArenas.GetHashCode();
|
||||
}
|
||||
if (this.ObjcClassPrefix.Length != 0)
|
||||
{
|
||||
num ^= this.ObjcClassPrefix.GetHashCode();
|
||||
}
|
||||
if (this.CsharpNamespace.Length != 0)
|
||||
{
|
||||
num ^= this.CsharpNamespace.GetHashCode();
|
||||
}
|
||||
return num ^ this.uninterpretedOption_.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x0600048E RID: 1166 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x0600048F RID: 1167 RVA: 0x0001113C File Offset: 0x0000F33C
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.JavaPackage.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(this.JavaPackage);
|
||||
}
|
||||
if (this.JavaOuterClassname.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(66);
|
||||
output.WriteString(this.JavaOuterClassname);
|
||||
}
|
||||
if (this.OptimizeFor != (FileOptions.Types.OptimizeMode)0)
|
||||
{
|
||||
output.WriteRawTag(72);
|
||||
output.WriteEnum((int)this.OptimizeFor);
|
||||
}
|
||||
if (this.JavaMultipleFiles)
|
||||
{
|
||||
output.WriteRawTag(80);
|
||||
output.WriteBool(this.JavaMultipleFiles);
|
||||
}
|
||||
if (this.GoPackage.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(90);
|
||||
output.WriteString(this.GoPackage);
|
||||
}
|
||||
if (this.CcGenericServices)
|
||||
{
|
||||
output.WriteRawTag(128, 1);
|
||||
output.WriteBool(this.CcGenericServices);
|
||||
}
|
||||
if (this.JavaGenericServices)
|
||||
{
|
||||
output.WriteRawTag(136, 1);
|
||||
output.WriteBool(this.JavaGenericServices);
|
||||
}
|
||||
if (this.PyGenericServices)
|
||||
{
|
||||
output.WriteRawTag(144, 1);
|
||||
output.WriteBool(this.PyGenericServices);
|
||||
}
|
||||
if (this.JavaGenerateEqualsAndHash)
|
||||
{
|
||||
output.WriteRawTag(160, 1);
|
||||
output.WriteBool(this.JavaGenerateEqualsAndHash);
|
||||
}
|
||||
if (this.Deprecated)
|
||||
{
|
||||
output.WriteRawTag(184, 1);
|
||||
output.WriteBool(this.Deprecated);
|
||||
}
|
||||
if (this.JavaStringCheckUtf8)
|
||||
{
|
||||
output.WriteRawTag(216, 1);
|
||||
output.WriteBool(this.JavaStringCheckUtf8);
|
||||
}
|
||||
if (this.CcEnableArenas)
|
||||
{
|
||||
output.WriteRawTag(248, 1);
|
||||
output.WriteBool(this.CcEnableArenas);
|
||||
}
|
||||
if (this.ObjcClassPrefix.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(162, 2);
|
||||
output.WriteString(this.ObjcClassPrefix);
|
||||
}
|
||||
if (this.CsharpNamespace.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(170, 2);
|
||||
output.WriteString(this.CsharpNamespace);
|
||||
}
|
||||
this.uninterpretedOption_.WriteTo(output, FileOptions._repeated_uninterpretedOption_codec);
|
||||
}
|
||||
|
||||
// Token: 0x06000490 RID: 1168 RVA: 0x00011320 File Offset: 0x0000F520
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.JavaPackage.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.JavaPackage);
|
||||
}
|
||||
if (this.JavaOuterClassname.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.JavaOuterClassname);
|
||||
}
|
||||
if (this.JavaMultipleFiles)
|
||||
{
|
||||
num += 2;
|
||||
}
|
||||
if (this.JavaGenerateEqualsAndHash)
|
||||
{
|
||||
num += 3;
|
||||
}
|
||||
if (this.JavaStringCheckUtf8)
|
||||
{
|
||||
num += 3;
|
||||
}
|
||||
if (this.OptimizeFor != (FileOptions.Types.OptimizeMode)0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeEnumSize((int)this.OptimizeFor);
|
||||
}
|
||||
if (this.GoPackage.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.GoPackage);
|
||||
}
|
||||
if (this.CcGenericServices)
|
||||
{
|
||||
num += 3;
|
||||
}
|
||||
if (this.JavaGenericServices)
|
||||
{
|
||||
num += 3;
|
||||
}
|
||||
if (this.PyGenericServices)
|
||||
{
|
||||
num += 3;
|
||||
}
|
||||
if (this.Deprecated)
|
||||
{
|
||||
num += 3;
|
||||
}
|
||||
if (this.CcEnableArenas)
|
||||
{
|
||||
num += 3;
|
||||
}
|
||||
if (this.ObjcClassPrefix.Length != 0)
|
||||
{
|
||||
num += 2 + CodedOutputStream.ComputeStringSize(this.ObjcClassPrefix);
|
||||
}
|
||||
if (this.CsharpNamespace.Length != 0)
|
||||
{
|
||||
num += 2 + CodedOutputStream.ComputeStringSize(this.CsharpNamespace);
|
||||
}
|
||||
return num + this.uninterpretedOption_.CalculateSize(FileOptions._repeated_uninterpretedOption_codec);
|
||||
}
|
||||
|
||||
// Token: 0x06000491 RID: 1169 RVA: 0x0001144C File Offset: 0x0000F64C
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(FileOptions other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.JavaPackage.Length != 0)
|
||||
{
|
||||
this.JavaPackage = other.JavaPackage;
|
||||
}
|
||||
if (other.JavaOuterClassname.Length != 0)
|
||||
{
|
||||
this.JavaOuterClassname = other.JavaOuterClassname;
|
||||
}
|
||||
if (other.JavaMultipleFiles)
|
||||
{
|
||||
this.JavaMultipleFiles = other.JavaMultipleFiles;
|
||||
}
|
||||
if (other.JavaGenerateEqualsAndHash)
|
||||
{
|
||||
this.JavaGenerateEqualsAndHash = other.JavaGenerateEqualsAndHash;
|
||||
}
|
||||
if (other.JavaStringCheckUtf8)
|
||||
{
|
||||
this.JavaStringCheckUtf8 = other.JavaStringCheckUtf8;
|
||||
}
|
||||
if (other.OptimizeFor != (FileOptions.Types.OptimizeMode)0)
|
||||
{
|
||||
this.OptimizeFor = other.OptimizeFor;
|
||||
}
|
||||
if (other.GoPackage.Length != 0)
|
||||
{
|
||||
this.GoPackage = other.GoPackage;
|
||||
}
|
||||
if (other.CcGenericServices)
|
||||
{
|
||||
this.CcGenericServices = other.CcGenericServices;
|
||||
}
|
||||
if (other.JavaGenericServices)
|
||||
{
|
||||
this.JavaGenericServices = other.JavaGenericServices;
|
||||
}
|
||||
if (other.PyGenericServices)
|
||||
{
|
||||
this.PyGenericServices = other.PyGenericServices;
|
||||
}
|
||||
if (other.Deprecated)
|
||||
{
|
||||
this.Deprecated = other.Deprecated;
|
||||
}
|
||||
if (other.CcEnableArenas)
|
||||
{
|
||||
this.CcEnableArenas = other.CcEnableArenas;
|
||||
}
|
||||
if (other.ObjcClassPrefix.Length != 0)
|
||||
{
|
||||
this.ObjcClassPrefix = other.ObjcClassPrefix;
|
||||
}
|
||||
if (other.CsharpNamespace.Length != 0)
|
||||
{
|
||||
this.CsharpNamespace = other.CsharpNamespace;
|
||||
}
|
||||
this.uninterpretedOption_.Add(other.uninterpretedOption_);
|
||||
}
|
||||
|
||||
// Token: 0x06000492 RID: 1170 RVA: 0x000115A0 File Offset: 0x0000F7A0
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num <= 136U)
|
||||
{
|
||||
if (num <= 72U)
|
||||
{
|
||||
if (num == 10U)
|
||||
{
|
||||
this.JavaPackage = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
if (num == 66U)
|
||||
{
|
||||
this.JavaOuterClassname = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
if (num == 72U)
|
||||
{
|
||||
this.optimizeFor_ = (FileOptions.Types.OptimizeMode)input.ReadEnum();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (num <= 90U)
|
||||
{
|
||||
if (num == 80U)
|
||||
{
|
||||
this.JavaMultipleFiles = input.ReadBool();
|
||||
continue;
|
||||
}
|
||||
if (num == 90U)
|
||||
{
|
||||
this.GoPackage = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num == 128U)
|
||||
{
|
||||
this.CcGenericServices = input.ReadBool();
|
||||
continue;
|
||||
}
|
||||
if (num == 136U)
|
||||
{
|
||||
this.JavaGenericServices = input.ReadBool();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (num <= 216U)
|
||||
{
|
||||
if (num <= 160U)
|
||||
{
|
||||
if (num == 144U)
|
||||
{
|
||||
this.PyGenericServices = input.ReadBool();
|
||||
continue;
|
||||
}
|
||||
if (num == 160U)
|
||||
{
|
||||
this.JavaGenerateEqualsAndHash = input.ReadBool();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num == 184U)
|
||||
{
|
||||
this.Deprecated = input.ReadBool();
|
||||
continue;
|
||||
}
|
||||
if (num == 216U)
|
||||
{
|
||||
this.JavaStringCheckUtf8 = input.ReadBool();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (num <= 290U)
|
||||
{
|
||||
if (num == 248U)
|
||||
{
|
||||
this.CcEnableArenas = input.ReadBool();
|
||||
continue;
|
||||
}
|
||||
if (num == 290U)
|
||||
{
|
||||
this.ObjcClassPrefix = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num == 298U)
|
||||
{
|
||||
this.CsharpNamespace = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
if (num == 7994U)
|
||||
{
|
||||
this.uninterpretedOption_.AddEntriesFrom(input, FileOptions._repeated_uninterpretedOption_codec);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
input.SkipLastField();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000194 RID: 404
|
||||
private static readonly MessageParser<FileOptions> _parser = new MessageParser<FileOptions>(() => new FileOptions());
|
||||
|
||||
// Token: 0x04000195 RID: 405
|
||||
public const int JavaPackageFieldNumber = 1;
|
||||
|
||||
// Token: 0x04000196 RID: 406
|
||||
private string javaPackage_ = "";
|
||||
|
||||
// Token: 0x04000197 RID: 407
|
||||
public const int JavaOuterClassnameFieldNumber = 8;
|
||||
|
||||
// Token: 0x04000198 RID: 408
|
||||
private string javaOuterClassname_ = "";
|
||||
|
||||
// Token: 0x04000199 RID: 409
|
||||
public const int JavaMultipleFilesFieldNumber = 10;
|
||||
|
||||
// Token: 0x0400019A RID: 410
|
||||
private bool javaMultipleFiles_;
|
||||
|
||||
// Token: 0x0400019B RID: 411
|
||||
public const int JavaGenerateEqualsAndHashFieldNumber = 20;
|
||||
|
||||
// Token: 0x0400019C RID: 412
|
||||
private bool javaGenerateEqualsAndHash_;
|
||||
|
||||
// Token: 0x0400019D RID: 413
|
||||
public const int JavaStringCheckUtf8FieldNumber = 27;
|
||||
|
||||
// Token: 0x0400019E RID: 414
|
||||
private bool javaStringCheckUtf8_;
|
||||
|
||||
// Token: 0x0400019F RID: 415
|
||||
public const int OptimizeForFieldNumber = 9;
|
||||
|
||||
// Token: 0x040001A0 RID: 416
|
||||
private FileOptions.Types.OptimizeMode optimizeFor_;
|
||||
|
||||
// Token: 0x040001A1 RID: 417
|
||||
public const int GoPackageFieldNumber = 11;
|
||||
|
||||
// Token: 0x040001A2 RID: 418
|
||||
private string goPackage_ = "";
|
||||
|
||||
// Token: 0x040001A3 RID: 419
|
||||
public const int CcGenericServicesFieldNumber = 16;
|
||||
|
||||
// Token: 0x040001A4 RID: 420
|
||||
private bool ccGenericServices_;
|
||||
|
||||
// Token: 0x040001A5 RID: 421
|
||||
public const int JavaGenericServicesFieldNumber = 17;
|
||||
|
||||
// Token: 0x040001A6 RID: 422
|
||||
private bool javaGenericServices_;
|
||||
|
||||
// Token: 0x040001A7 RID: 423
|
||||
public const int PyGenericServicesFieldNumber = 18;
|
||||
|
||||
// Token: 0x040001A8 RID: 424
|
||||
private bool pyGenericServices_;
|
||||
|
||||
// Token: 0x040001A9 RID: 425
|
||||
public const int DeprecatedFieldNumber = 23;
|
||||
|
||||
// Token: 0x040001AA RID: 426
|
||||
private bool deprecated_;
|
||||
|
||||
// Token: 0x040001AB RID: 427
|
||||
public const int CcEnableArenasFieldNumber = 31;
|
||||
|
||||
// Token: 0x040001AC RID: 428
|
||||
private bool ccEnableArenas_;
|
||||
|
||||
// Token: 0x040001AD RID: 429
|
||||
public const int ObjcClassPrefixFieldNumber = 36;
|
||||
|
||||
// Token: 0x040001AE RID: 430
|
||||
private string objcClassPrefix_ = "";
|
||||
|
||||
// Token: 0x040001AF RID: 431
|
||||
public const int CsharpNamespaceFieldNumber = 37;
|
||||
|
||||
// Token: 0x040001B0 RID: 432
|
||||
private string csharpNamespace_ = "";
|
||||
|
||||
// Token: 0x040001B1 RID: 433
|
||||
public const int UninterpretedOptionFieldNumber = 999;
|
||||
|
||||
// Token: 0x040001B2 RID: 434
|
||||
private static readonly FieldCodec<UninterpretedOption> _repeated_uninterpretedOption_codec = FieldCodec.ForMessage<UninterpretedOption>(7994U, Google.Protobuf.Reflection.UninterpretedOption.Parser);
|
||||
|
||||
// Token: 0x040001B3 RID: 435
|
||||
private readonly RepeatedField<UninterpretedOption> uninterpretedOption_ = new RepeatedField<UninterpretedOption>();
|
||||
|
||||
// Token: 0x020000AD RID: 173
|
||||
[DebuggerNonUserCode]
|
||||
public static class Types
|
||||
{
|
||||
// Token: 0x020000D9 RID: 217
|
||||
internal enum OptimizeMode
|
||||
{
|
||||
// Token: 0x04000366 RID: 870
|
||||
[OriginalName("SPEED")]
|
||||
Speed = 1,
|
||||
// Token: 0x04000367 RID: 871
|
||||
[OriginalName("CODE_SIZE")]
|
||||
CodeSize,
|
||||
// Token: 0x04000368 RID: 872
|
||||
[OriginalName("LITE_RUNTIME")]
|
||||
LiteRuntime
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x0200005F RID: 95
|
||||
public sealed class GeneratedClrTypeInfo
|
||||
{
|
||||
// Token: 0x1700018C RID: 396
|
||||
// (get) Token: 0x060005AF RID: 1455 RVA: 0x00014487 File Offset: 0x00012687
|
||||
// (set) Token: 0x060005B0 RID: 1456 RVA: 0x0001448F File Offset: 0x0001268F
|
||||
public Type ClrType { get; private set; }
|
||||
|
||||
// Token: 0x1700018D RID: 397
|
||||
// (get) Token: 0x060005B1 RID: 1457 RVA: 0x00014498 File Offset: 0x00012698
|
||||
public MessageParser Parser { get; }
|
||||
|
||||
// Token: 0x1700018E RID: 398
|
||||
// (get) Token: 0x060005B2 RID: 1458 RVA: 0x000144A0 File Offset: 0x000126A0
|
||||
public string[] PropertyNames { get; }
|
||||
|
||||
// Token: 0x1700018F RID: 399
|
||||
// (get) Token: 0x060005B3 RID: 1459 RVA: 0x000144A8 File Offset: 0x000126A8
|
||||
public string[] OneofNames { get; }
|
||||
|
||||
// Token: 0x17000190 RID: 400
|
||||
// (get) Token: 0x060005B4 RID: 1460 RVA: 0x000144B0 File Offset: 0x000126B0
|
||||
public GeneratedClrTypeInfo[] NestedTypes { get; }
|
||||
|
||||
// Token: 0x17000191 RID: 401
|
||||
// (get) Token: 0x060005B5 RID: 1461 RVA: 0x000144B8 File Offset: 0x000126B8
|
||||
public Type[] NestedEnums { get; }
|
||||
|
||||
// Token: 0x060005B6 RID: 1462 RVA: 0x000144C0 File Offset: 0x000126C0
|
||||
public GeneratedClrTypeInfo(Type clrType, MessageParser parser, string[] propertyNames, string[] oneofNames, Type[] nestedEnums, GeneratedClrTypeInfo[] nestedTypes)
|
||||
{
|
||||
this.NestedTypes = nestedTypes ?? GeneratedClrTypeInfo.EmptyCodeInfo;
|
||||
this.NestedEnums = nestedEnums ?? ReflectionUtil.EmptyTypes;
|
||||
this.ClrType = clrType;
|
||||
this.Parser = parser;
|
||||
this.PropertyNames = propertyNames ?? GeneratedClrTypeInfo.EmptyNames;
|
||||
this.OneofNames = oneofNames ?? GeneratedClrTypeInfo.EmptyNames;
|
||||
}
|
||||
|
||||
// Token: 0x060005B7 RID: 1463 RVA: 0x00014524 File Offset: 0x00012724
|
||||
public GeneratedClrTypeInfo(Type[] nestedEnums, GeneratedClrTypeInfo[] nestedTypes)
|
||||
: this(null, null, null, null, nestedEnums, nestedTypes)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0400023C RID: 572
|
||||
private static readonly string[] EmptyNames = new string[0];
|
||||
|
||||
// Token: 0x0400023D RID: 573
|
||||
private static readonly GeneratedClrTypeInfo[] EmptyCodeInfo = new GeneratedClrTypeInfo[0];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,458 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Collections;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000054 RID: 84
|
||||
internal sealed class GeneratedCodeInfo : IMessage<GeneratedCodeInfo>, IMessage, IEquatable<GeneratedCodeInfo>, IDeepCloneable<GeneratedCodeInfo>
|
||||
{
|
||||
// Token: 0x1700015E RID: 350
|
||||
// (get) Token: 0x0600054F RID: 1359 RVA: 0x00013244 File Offset: 0x00011444
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<GeneratedCodeInfo> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return GeneratedCodeInfo._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700015F RID: 351
|
||||
// (get) Token: 0x06000550 RID: 1360 RVA: 0x0001324B File Offset: 0x0001144B
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorReflection.Descriptor.MessageTypes[19];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000160 RID: 352
|
||||
// (get) Token: 0x06000551 RID: 1361 RVA: 0x0001325E File Offset: 0x0001145E
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return GeneratedCodeInfo.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000552 RID: 1362 RVA: 0x00013265 File Offset: 0x00011465
|
||||
[DebuggerNonUserCode]
|
||||
public GeneratedCodeInfo()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000553 RID: 1363 RVA: 0x00013278 File Offset: 0x00011478
|
||||
[DebuggerNonUserCode]
|
||||
public GeneratedCodeInfo(GeneratedCodeInfo other)
|
||||
: this()
|
||||
{
|
||||
this.annotation_ = other.annotation_.Clone();
|
||||
}
|
||||
|
||||
// Token: 0x06000554 RID: 1364 RVA: 0x00013291 File Offset: 0x00011491
|
||||
[DebuggerNonUserCode]
|
||||
public GeneratedCodeInfo Clone()
|
||||
{
|
||||
return new GeneratedCodeInfo(this);
|
||||
}
|
||||
|
||||
// Token: 0x17000161 RID: 353
|
||||
// (get) Token: 0x06000555 RID: 1365 RVA: 0x00013299 File Offset: 0x00011499
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<GeneratedCodeInfo.Types.Annotation> Annotation
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.annotation_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000556 RID: 1366 RVA: 0x000132A1 File Offset: 0x000114A1
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as GeneratedCodeInfo);
|
||||
}
|
||||
|
||||
// Token: 0x06000557 RID: 1367 RVA: 0x000132AF File Offset: 0x000114AF
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(GeneratedCodeInfo other)
|
||||
{
|
||||
return other != null && (other == this || this.annotation_.Equals(other.annotation_));
|
||||
}
|
||||
|
||||
// Token: 0x06000558 RID: 1368 RVA: 0x000132D2 File Offset: 0x000114D2
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return 1 ^ this.annotation_.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x06000559 RID: 1369 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x0600055A RID: 1370 RVA: 0x000132E1 File Offset: 0x000114E1
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
this.annotation_.WriteTo(output, GeneratedCodeInfo._repeated_annotation_codec);
|
||||
}
|
||||
|
||||
// Token: 0x0600055B RID: 1371 RVA: 0x000132F4 File Offset: 0x000114F4
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
return 0 + this.annotation_.CalculateSize(GeneratedCodeInfo._repeated_annotation_codec);
|
||||
}
|
||||
|
||||
// Token: 0x0600055C RID: 1372 RVA: 0x00013308 File Offset: 0x00011508
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(GeneratedCodeInfo other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.annotation_.Add(other.annotation_);
|
||||
}
|
||||
|
||||
// Token: 0x0600055D RID: 1373 RVA: 0x00013320 File Offset: 0x00011520
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 10U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.annotation_.AddEntriesFrom(input, GeneratedCodeInfo._repeated_annotation_codec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000202 RID: 514
|
||||
private static readonly MessageParser<GeneratedCodeInfo> _parser = new MessageParser<GeneratedCodeInfo>(() => new GeneratedCodeInfo());
|
||||
|
||||
// Token: 0x04000203 RID: 515
|
||||
public const int AnnotationFieldNumber = 1;
|
||||
|
||||
// Token: 0x04000204 RID: 516
|
||||
private static readonly FieldCodec<GeneratedCodeInfo.Types.Annotation> _repeated_annotation_codec = FieldCodec.ForMessage<GeneratedCodeInfo.Types.Annotation>(10U, GeneratedCodeInfo.Types.Annotation.Parser);
|
||||
|
||||
// Token: 0x04000205 RID: 517
|
||||
private readonly RepeatedField<GeneratedCodeInfo.Types.Annotation> annotation_ = new RepeatedField<GeneratedCodeInfo.Types.Annotation>();
|
||||
|
||||
// Token: 0x020000BB RID: 187
|
||||
[DebuggerNonUserCode]
|
||||
public static class Types
|
||||
{
|
||||
// Token: 0x020000DE RID: 222
|
||||
internal sealed class Annotation : IMessage<GeneratedCodeInfo.Types.Annotation>, IMessage, IEquatable<GeneratedCodeInfo.Types.Annotation>, IDeepCloneable<GeneratedCodeInfo.Types.Annotation>
|
||||
{
|
||||
// Token: 0x170001F6 RID: 502
|
||||
// (get) Token: 0x06000802 RID: 2050 RVA: 0x000187E2 File Offset: 0x000169E2
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<GeneratedCodeInfo.Types.Annotation> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return GeneratedCodeInfo.Types.Annotation._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001F7 RID: 503
|
||||
// (get) Token: 0x06000803 RID: 2051 RVA: 0x000187E9 File Offset: 0x000169E9
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return GeneratedCodeInfo.Descriptor.NestedTypes[0];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001F8 RID: 504
|
||||
// (get) Token: 0x06000804 RID: 2052 RVA: 0x000187FB File Offset: 0x000169FB
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return GeneratedCodeInfo.Types.Annotation.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000805 RID: 2053 RVA: 0x00018802 File Offset: 0x00016A02
|
||||
[DebuggerNonUserCode]
|
||||
public Annotation()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000806 RID: 2054 RVA: 0x00018820 File Offset: 0x00016A20
|
||||
[DebuggerNonUserCode]
|
||||
public Annotation(GeneratedCodeInfo.Types.Annotation other)
|
||||
: this()
|
||||
{
|
||||
this.path_ = other.path_.Clone();
|
||||
this.sourceFile_ = other.sourceFile_;
|
||||
this.begin_ = other.begin_;
|
||||
this.end_ = other.end_;
|
||||
}
|
||||
|
||||
// Token: 0x06000807 RID: 2055 RVA: 0x0001885D File Offset: 0x00016A5D
|
||||
[DebuggerNonUserCode]
|
||||
public GeneratedCodeInfo.Types.Annotation Clone()
|
||||
{
|
||||
return new GeneratedCodeInfo.Types.Annotation(this);
|
||||
}
|
||||
|
||||
// Token: 0x170001F9 RID: 505
|
||||
// (get) Token: 0x06000808 RID: 2056 RVA: 0x00018865 File Offset: 0x00016A65
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<int> Path
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.path_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001FA RID: 506
|
||||
// (get) Token: 0x06000809 RID: 2057 RVA: 0x0001886D File Offset: 0x00016A6D
|
||||
// (set) Token: 0x0600080A RID: 2058 RVA: 0x00018875 File Offset: 0x00016A75
|
||||
[DebuggerNonUserCode]
|
||||
public string SourceFile
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.sourceFile_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.sourceFile_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001FB RID: 507
|
||||
// (get) Token: 0x0600080B RID: 2059 RVA: 0x00018888 File Offset: 0x00016A88
|
||||
// (set) Token: 0x0600080C RID: 2060 RVA: 0x00018890 File Offset: 0x00016A90
|
||||
[DebuggerNonUserCode]
|
||||
public int Begin
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.begin_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.begin_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001FC RID: 508
|
||||
// (get) Token: 0x0600080D RID: 2061 RVA: 0x00018899 File Offset: 0x00016A99
|
||||
// (set) Token: 0x0600080E RID: 2062 RVA: 0x000188A1 File Offset: 0x00016AA1
|
||||
[DebuggerNonUserCode]
|
||||
public int End
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.end_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.end_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600080F RID: 2063 RVA: 0x000188AA File Offset: 0x00016AAA
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as GeneratedCodeInfo.Types.Annotation);
|
||||
}
|
||||
|
||||
// Token: 0x06000810 RID: 2064 RVA: 0x000188B8 File Offset: 0x00016AB8
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(GeneratedCodeInfo.Types.Annotation other)
|
||||
{
|
||||
return other != null && (other == this || (this.path_.Equals(other.path_) && !(this.SourceFile != other.SourceFile) && this.Begin == other.Begin && this.End == other.End));
|
||||
}
|
||||
|
||||
// Token: 0x06000811 RID: 2065 RVA: 0x0001891C File Offset: 0x00016B1C
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
num ^= this.path_.GetHashCode();
|
||||
if (this.SourceFile.Length != 0)
|
||||
{
|
||||
num ^= this.SourceFile.GetHashCode();
|
||||
}
|
||||
if (this.Begin != 0)
|
||||
{
|
||||
num ^= this.Begin.GetHashCode();
|
||||
}
|
||||
if (this.End != 0)
|
||||
{
|
||||
num ^= this.End.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000812 RID: 2066 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x06000813 RID: 2067 RVA: 0x00018988 File Offset: 0x00016B88
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
this.path_.WriteTo(output, GeneratedCodeInfo.Types.Annotation._repeated_path_codec);
|
||||
if (this.SourceFile.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(18);
|
||||
output.WriteString(this.SourceFile);
|
||||
}
|
||||
if (this.Begin != 0)
|
||||
{
|
||||
output.WriteRawTag(24);
|
||||
output.WriteInt32(this.Begin);
|
||||
}
|
||||
if (this.End != 0)
|
||||
{
|
||||
output.WriteRawTag(32);
|
||||
output.WriteInt32(this.End);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000814 RID: 2068 RVA: 0x00018A00 File Offset: 0x00016C00
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
num += this.path_.CalculateSize(GeneratedCodeInfo.Types.Annotation._repeated_path_codec);
|
||||
if (this.SourceFile.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.SourceFile);
|
||||
}
|
||||
if (this.Begin != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeInt32Size(this.Begin);
|
||||
}
|
||||
if (this.End != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeInt32Size(this.End);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000815 RID: 2069 RVA: 0x00018A70 File Offset: 0x00016C70
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(GeneratedCodeInfo.Types.Annotation other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.path_.Add(other.path_);
|
||||
if (other.SourceFile.Length != 0)
|
||||
{
|
||||
this.SourceFile = other.SourceFile;
|
||||
}
|
||||
if (other.Begin != 0)
|
||||
{
|
||||
this.Begin = other.Begin;
|
||||
}
|
||||
if (other.End != 0)
|
||||
{
|
||||
this.End = other.End;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000816 RID: 2070 RVA: 0x00018AD4 File Offset: 0x00016CD4
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num <= 10U)
|
||||
{
|
||||
if (num == 8U || num == 10U)
|
||||
{
|
||||
this.path_.AddEntriesFrom(input, GeneratedCodeInfo.Types.Annotation._repeated_path_codec);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num == 18U)
|
||||
{
|
||||
this.SourceFile = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
if (num == 24U)
|
||||
{
|
||||
this.Begin = input.ReadInt32();
|
||||
continue;
|
||||
}
|
||||
if (num == 32U)
|
||||
{
|
||||
this.End = input.ReadInt32();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
input.SkipLastField();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000384 RID: 900
|
||||
private static readonly MessageParser<GeneratedCodeInfo.Types.Annotation> _parser = new MessageParser<GeneratedCodeInfo.Types.Annotation>(() => new GeneratedCodeInfo.Types.Annotation());
|
||||
|
||||
// Token: 0x04000385 RID: 901
|
||||
public const int PathFieldNumber = 1;
|
||||
|
||||
// Token: 0x04000386 RID: 902
|
||||
private static readonly FieldCodec<int> _repeated_path_codec = FieldCodec.ForInt32(10U);
|
||||
|
||||
// Token: 0x04000387 RID: 903
|
||||
private readonly RepeatedField<int> path_ = new RepeatedField<int>();
|
||||
|
||||
// Token: 0x04000388 RID: 904
|
||||
public const int SourceFileFieldNumber = 2;
|
||||
|
||||
// Token: 0x04000389 RID: 905
|
||||
private string sourceFile_ = "";
|
||||
|
||||
// Token: 0x0400038A RID: 906
|
||||
public const int BeginFieldNumber = 3;
|
||||
|
||||
// Token: 0x0400038B RID: 907
|
||||
private int begin_;
|
||||
|
||||
// Token: 0x0400038C RID: 908
|
||||
public const int EndFieldNumber = 4;
|
||||
|
||||
// Token: 0x0400038D RID: 909
|
||||
private int end_;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000060 RID: 96
|
||||
public interface IDescriptor
|
||||
{
|
||||
// Token: 0x17000192 RID: 402
|
||||
// (get) Token: 0x060005B9 RID: 1465
|
||||
string Name { get; }
|
||||
|
||||
// Token: 0x17000193 RID: 403
|
||||
// (get) Token: 0x060005BA RID: 1466
|
||||
string FullName { get; }
|
||||
|
||||
// Token: 0x17000194 RID: 404
|
||||
// (get) Token: 0x060005BB RID: 1467
|
||||
FileDescriptor File { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000061 RID: 97
|
||||
public interface IFieldAccessor
|
||||
{
|
||||
// Token: 0x17000195 RID: 405
|
||||
// (get) Token: 0x060005BC RID: 1468
|
||||
FieldDescriptor Descriptor { get; }
|
||||
|
||||
// Token: 0x060005BD RID: 1469
|
||||
void Clear(IMessage message);
|
||||
|
||||
// Token: 0x060005BE RID: 1470
|
||||
object GetValue(IMessage message);
|
||||
|
||||
// Token: 0x060005BF RID: 1471
|
||||
void SetValue(IMessage message, object value);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000062 RID: 98
|
||||
internal sealed class MapFieldAccessor : FieldAccessorBase
|
||||
{
|
||||
// Token: 0x060005C0 RID: 1472 RVA: 0x0001454A File Offset: 0x0001274A
|
||||
internal MapFieldAccessor(PropertyInfo property, FieldDescriptor descriptor)
|
||||
: base(property, descriptor)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060005C1 RID: 1473 RVA: 0x00014554 File Offset: 0x00012754
|
||||
public override void Clear(IMessage message)
|
||||
{
|
||||
((IDictionary)base.GetValue(message)).Clear();
|
||||
}
|
||||
|
||||
// Token: 0x060005C2 RID: 1474 RVA: 0x00014567 File Offset: 0x00012767
|
||||
public override void SetValue(IMessage message, object value)
|
||||
{
|
||||
throw new InvalidOperationException("SetValue is not implemented for map fields");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,219 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using Google.Protobuf.Collections;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000063 RID: 99
|
||||
public sealed class MessageDescriptor : DescriptorBase
|
||||
{
|
||||
// Token: 0x060005C3 RID: 1475 RVA: 0x00014574 File Offset: 0x00012774
|
||||
internal MessageDescriptor(DescriptorProto proto, FileDescriptor file, MessageDescriptor parent, int typeIndex, GeneratedClrTypeInfo generatedCodeInfo)
|
||||
: base(file, file.ComputeFullName(parent, proto.Name), typeIndex)
|
||||
{
|
||||
MessageDescriptor <>4__this = this;
|
||||
this.Proto = proto;
|
||||
GeneratedClrTypeInfo generatedCodeInfo2 = generatedCodeInfo;
|
||||
this.Parser = ((generatedCodeInfo2 != null) ? generatedCodeInfo2.Parser : null);
|
||||
GeneratedClrTypeInfo generatedCodeInfo3 = generatedCodeInfo;
|
||||
this.ClrType = ((generatedCodeInfo3 != null) ? generatedCodeInfo3.ClrType : null);
|
||||
this.ContainingType = parent;
|
||||
this.Oneofs = DescriptorUtil.ConvertAndMakeReadOnly<OneofDescriptorProto, OneofDescriptor>(proto.OneofDecl, (OneofDescriptorProto oneof, int index) => new OneofDescriptor(oneof, file, <>4__this, index, generatedCodeInfo.OneofNames[index]));
|
||||
this.NestedTypes = DescriptorUtil.ConvertAndMakeReadOnly<DescriptorProto, MessageDescriptor>(proto.NestedType, (DescriptorProto type, int index) => new MessageDescriptor(type, file, <>4__this, index, generatedCodeInfo.NestedTypes[index]));
|
||||
this.EnumTypes = DescriptorUtil.ConvertAndMakeReadOnly<EnumDescriptorProto, EnumDescriptor>(proto.EnumType, (EnumDescriptorProto type, int index) => new EnumDescriptor(type, file, <>4__this, index, generatedCodeInfo.NestedEnums[index]));
|
||||
this.fieldsInDeclarationOrder = DescriptorUtil.ConvertAndMakeReadOnly<FieldDescriptorProto, FieldDescriptor>(proto.Field, delegate(FieldDescriptorProto field, int index)
|
||||
{
|
||||
FileDescriptor file2 = file;
|
||||
MessageDescriptor <>4__this2 = <>4__this;
|
||||
GeneratedClrTypeInfo generatedCodeInfo4 = generatedCodeInfo;
|
||||
return new FieldDescriptor(field, file2, <>4__this2, index, (generatedCodeInfo4 != null) ? generatedCodeInfo4.PropertyNames[index] : null);
|
||||
});
|
||||
this.fieldsInNumberOrder = new ReadOnlyCollection<FieldDescriptor>(this.fieldsInDeclarationOrder.OrderBy((FieldDescriptor field) => field.FieldNumber).ToArray<FieldDescriptor>());
|
||||
this.jsonFieldMap = MessageDescriptor.CreateJsonFieldMap(this.fieldsInNumberOrder);
|
||||
file.DescriptorPool.AddSymbol(this);
|
||||
this.Fields = new MessageDescriptor.FieldCollection(this);
|
||||
}
|
||||
|
||||
// Token: 0x060005C4 RID: 1476 RVA: 0x000146D8 File Offset: 0x000128D8
|
||||
private static ReadOnlyDictionary<string, FieldDescriptor> CreateJsonFieldMap(IList<FieldDescriptor> fields)
|
||||
{
|
||||
Dictionary<string, FieldDescriptor> dictionary = new Dictionary<string, FieldDescriptor>();
|
||||
foreach (FieldDescriptor fieldDescriptor in fields)
|
||||
{
|
||||
dictionary[fieldDescriptor.Name] = fieldDescriptor;
|
||||
dictionary[fieldDescriptor.JsonName] = fieldDescriptor;
|
||||
}
|
||||
return new ReadOnlyDictionary<string, FieldDescriptor>(dictionary);
|
||||
}
|
||||
|
||||
// Token: 0x17000196 RID: 406
|
||||
// (get) Token: 0x060005C5 RID: 1477 RVA: 0x00014740 File Offset: 0x00012940
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Proto.Name;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000197 RID: 407
|
||||
// (get) Token: 0x060005C6 RID: 1478 RVA: 0x0001474D File Offset: 0x0001294D
|
||||
internal DescriptorProto Proto { get; }
|
||||
|
||||
// Token: 0x17000198 RID: 408
|
||||
// (get) Token: 0x060005C7 RID: 1479 RVA: 0x00014755 File Offset: 0x00012955
|
||||
public Type ClrType { get; }
|
||||
|
||||
// Token: 0x17000199 RID: 409
|
||||
// (get) Token: 0x060005C8 RID: 1480 RVA: 0x0001475D File Offset: 0x0001295D
|
||||
public MessageParser Parser { get; }
|
||||
|
||||
// Token: 0x1700019A RID: 410
|
||||
// (get) Token: 0x060005C9 RID: 1481 RVA: 0x00014765 File Offset: 0x00012965
|
||||
internal bool IsWellKnownType
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.File.Package == "google.protobuf" && MessageDescriptor.WellKnownTypeNames.Contains(base.File.Name);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700019B RID: 411
|
||||
// (get) Token: 0x060005CA RID: 1482 RVA: 0x00014795 File Offset: 0x00012995
|
||||
internal bool IsWrapperType
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.File.Package == "google.protobuf" && base.File.Name == "google/protobuf/wrappers.proto";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700019C RID: 412
|
||||
// (get) Token: 0x060005CB RID: 1483 RVA: 0x000147C5 File Offset: 0x000129C5
|
||||
public MessageDescriptor ContainingType { get; }
|
||||
|
||||
// Token: 0x1700019D RID: 413
|
||||
// (get) Token: 0x060005CC RID: 1484 RVA: 0x000147CD File Offset: 0x000129CD
|
||||
public MessageDescriptor.FieldCollection Fields { get; }
|
||||
|
||||
// Token: 0x1700019E RID: 414
|
||||
// (get) Token: 0x060005CD RID: 1485 RVA: 0x000147D5 File Offset: 0x000129D5
|
||||
public IList<MessageDescriptor> NestedTypes { get; }
|
||||
|
||||
// Token: 0x1700019F RID: 415
|
||||
// (get) Token: 0x060005CE RID: 1486 RVA: 0x000147DD File Offset: 0x000129DD
|
||||
public IList<EnumDescriptor> EnumTypes { get; }
|
||||
|
||||
// Token: 0x170001A0 RID: 416
|
||||
// (get) Token: 0x060005CF RID: 1487 RVA: 0x000147E5 File Offset: 0x000129E5
|
||||
public IList<OneofDescriptor> Oneofs { get; }
|
||||
|
||||
// Token: 0x060005D0 RID: 1488 RVA: 0x000147ED File Offset: 0x000129ED
|
||||
public FieldDescriptor FindFieldByName(string name)
|
||||
{
|
||||
return base.File.DescriptorPool.FindSymbol<FieldDescriptor>(base.FullName + "." + name);
|
||||
}
|
||||
|
||||
// Token: 0x060005D1 RID: 1489 RVA: 0x00014810 File Offset: 0x00012A10
|
||||
public FieldDescriptor FindFieldByNumber(int number)
|
||||
{
|
||||
return base.File.DescriptorPool.FindFieldByNumber(this, number);
|
||||
}
|
||||
|
||||
// Token: 0x060005D2 RID: 1490 RVA: 0x00014824 File Offset: 0x00012A24
|
||||
public T FindDescriptor<T>(string name) where T : class, IDescriptor
|
||||
{
|
||||
return base.File.DescriptorPool.FindSymbol<T>(base.FullName + "." + name);
|
||||
}
|
||||
|
||||
// Token: 0x060005D3 RID: 1491 RVA: 0x00014848 File Offset: 0x00012A48
|
||||
internal void CrossLink()
|
||||
{
|
||||
foreach (MessageDescriptor messageDescriptor in this.NestedTypes)
|
||||
{
|
||||
messageDescriptor.CrossLink();
|
||||
}
|
||||
foreach (FieldDescriptor fieldDescriptor in this.fieldsInDeclarationOrder)
|
||||
{
|
||||
fieldDescriptor.CrossLink();
|
||||
}
|
||||
foreach (OneofDescriptor oneofDescriptor in this.Oneofs)
|
||||
{
|
||||
oneofDescriptor.CrossLink();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000244 RID: 580
|
||||
private static readonly HashSet<string> WellKnownTypeNames = new HashSet<string> { "google/protobuf/any.proto", "google/protobuf/api.proto", "google/protobuf/duration.proto", "google/protobuf/empty.proto", "google/protobuf/wrappers.proto", "google/protobuf/timestamp.proto", "google/protobuf/field_mask.proto", "google/protobuf/source_context.proto", "google/protobuf/struct.proto", "google/protobuf/type.proto" };
|
||||
|
||||
// Token: 0x04000245 RID: 581
|
||||
private readonly IList<FieldDescriptor> fieldsInDeclarationOrder;
|
||||
|
||||
// Token: 0x04000246 RID: 582
|
||||
private readonly IList<FieldDescriptor> fieldsInNumberOrder;
|
||||
|
||||
// Token: 0x04000247 RID: 583
|
||||
private readonly IDictionary<string, FieldDescriptor> jsonFieldMap;
|
||||
|
||||
// Token: 0x020000C1 RID: 193
|
||||
public sealed class FieldCollection
|
||||
{
|
||||
// Token: 0x0600076E RID: 1902 RVA: 0x000176C7 File Offset: 0x000158C7
|
||||
internal FieldCollection(MessageDescriptor messageDescriptor)
|
||||
{
|
||||
this.messageDescriptor = messageDescriptor;
|
||||
}
|
||||
|
||||
// Token: 0x0600076F RID: 1903 RVA: 0x000176D6 File Offset: 0x000158D6
|
||||
public IList<FieldDescriptor> InDeclarationOrder()
|
||||
{
|
||||
return this.messageDescriptor.fieldsInDeclarationOrder;
|
||||
}
|
||||
|
||||
// Token: 0x06000770 RID: 1904 RVA: 0x000176E3 File Offset: 0x000158E3
|
||||
public IList<FieldDescriptor> InFieldNumberOrder()
|
||||
{
|
||||
return this.messageDescriptor.fieldsInNumberOrder;
|
||||
}
|
||||
|
||||
// Token: 0x06000771 RID: 1905 RVA: 0x000176F0 File Offset: 0x000158F0
|
||||
internal IDictionary<string, FieldDescriptor> ByJsonName()
|
||||
{
|
||||
return this.messageDescriptor.jsonFieldMap;
|
||||
}
|
||||
|
||||
// Token: 0x170001D2 RID: 466
|
||||
public FieldDescriptor this[int number]
|
||||
{
|
||||
get
|
||||
{
|
||||
FieldDescriptor fieldDescriptor = this.messageDescriptor.FindFieldByNumber(number);
|
||||
if (fieldDescriptor == null)
|
||||
{
|
||||
throw new KeyNotFoundException("No such field number");
|
||||
}
|
||||
return fieldDescriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001D3 RID: 467
|
||||
public FieldDescriptor this[string name]
|
||||
{
|
||||
get
|
||||
{
|
||||
FieldDescriptor fieldDescriptor = this.messageDescriptor.FindFieldByName(name);
|
||||
if (fieldDescriptor == null)
|
||||
{
|
||||
throw new KeyNotFoundException("No such field name");
|
||||
}
|
||||
return fieldDescriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040002F7 RID: 759
|
||||
private readonly MessageDescriptor messageDescriptor;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,344 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Collections;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x0200004B RID: 75
|
||||
internal sealed class MessageOptions : IMessage<MessageOptions>, IMessage, IEquatable<MessageOptions>, IDeepCloneable<MessageOptions>
|
||||
{
|
||||
// Token: 0x17000125 RID: 293
|
||||
// (get) Token: 0x06000494 RID: 1172 RVA: 0x000117B3 File Offset: 0x0000F9B3
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<MessageOptions> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return MessageOptions._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000126 RID: 294
|
||||
// (get) Token: 0x06000495 RID: 1173 RVA: 0x000117BA File Offset: 0x0000F9BA
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorReflection.Descriptor.MessageTypes[10];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000127 RID: 295
|
||||
// (get) Token: 0x06000496 RID: 1174 RVA: 0x000117CD File Offset: 0x0000F9CD
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return MessageOptions.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000497 RID: 1175 RVA: 0x000117D4 File Offset: 0x0000F9D4
|
||||
[DebuggerNonUserCode]
|
||||
public MessageOptions()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000498 RID: 1176 RVA: 0x000117E8 File Offset: 0x0000F9E8
|
||||
[DebuggerNonUserCode]
|
||||
public MessageOptions(MessageOptions other)
|
||||
: this()
|
||||
{
|
||||
this.messageSetWireFormat_ = other.messageSetWireFormat_;
|
||||
this.noStandardDescriptorAccessor_ = other.noStandardDescriptorAccessor_;
|
||||
this.deprecated_ = other.deprecated_;
|
||||
this.mapEntry_ = other.mapEntry_;
|
||||
this.uninterpretedOption_ = other.uninterpretedOption_.Clone();
|
||||
}
|
||||
|
||||
// Token: 0x06000499 RID: 1177 RVA: 0x0001183C File Offset: 0x0000FA3C
|
||||
[DebuggerNonUserCode]
|
||||
public MessageOptions Clone()
|
||||
{
|
||||
return new MessageOptions(this);
|
||||
}
|
||||
|
||||
// Token: 0x17000128 RID: 296
|
||||
// (get) Token: 0x0600049A RID: 1178 RVA: 0x00011844 File Offset: 0x0000FA44
|
||||
// (set) Token: 0x0600049B RID: 1179 RVA: 0x0001184C File Offset: 0x0000FA4C
|
||||
[DebuggerNonUserCode]
|
||||
public bool MessageSetWireFormat
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.messageSetWireFormat_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.messageSetWireFormat_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000129 RID: 297
|
||||
// (get) Token: 0x0600049C RID: 1180 RVA: 0x00011855 File Offset: 0x0000FA55
|
||||
// (set) Token: 0x0600049D RID: 1181 RVA: 0x0001185D File Offset: 0x0000FA5D
|
||||
[DebuggerNonUserCode]
|
||||
public bool NoStandardDescriptorAccessor
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.noStandardDescriptorAccessor_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.noStandardDescriptorAccessor_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700012A RID: 298
|
||||
// (get) Token: 0x0600049E RID: 1182 RVA: 0x00011866 File Offset: 0x0000FA66
|
||||
// (set) Token: 0x0600049F RID: 1183 RVA: 0x0001186E File Offset: 0x0000FA6E
|
||||
[DebuggerNonUserCode]
|
||||
public bool Deprecated
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.deprecated_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.deprecated_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700012B RID: 299
|
||||
// (get) Token: 0x060004A0 RID: 1184 RVA: 0x00011877 File Offset: 0x0000FA77
|
||||
// (set) Token: 0x060004A1 RID: 1185 RVA: 0x0001187F File Offset: 0x0000FA7F
|
||||
[DebuggerNonUserCode]
|
||||
public bool MapEntry
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.mapEntry_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.mapEntry_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700012C RID: 300
|
||||
// (get) Token: 0x060004A2 RID: 1186 RVA: 0x00011888 File Offset: 0x0000FA88
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<UninterpretedOption> UninterpretedOption
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.uninterpretedOption_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060004A3 RID: 1187 RVA: 0x00011890 File Offset: 0x0000FA90
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as MessageOptions);
|
||||
}
|
||||
|
||||
// Token: 0x060004A4 RID: 1188 RVA: 0x000118A0 File Offset: 0x0000FAA0
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(MessageOptions other)
|
||||
{
|
||||
return other != null && (other == this || (this.MessageSetWireFormat == other.MessageSetWireFormat && this.NoStandardDescriptorAccessor == other.NoStandardDescriptorAccessor && this.Deprecated == other.Deprecated && this.MapEntry == other.MapEntry && this.uninterpretedOption_.Equals(other.uninterpretedOption_)));
|
||||
}
|
||||
|
||||
// Token: 0x060004A5 RID: 1189 RVA: 0x00011910 File Offset: 0x0000FB10
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.MessageSetWireFormat)
|
||||
{
|
||||
num ^= this.MessageSetWireFormat.GetHashCode();
|
||||
}
|
||||
if (this.NoStandardDescriptorAccessor)
|
||||
{
|
||||
num ^= this.NoStandardDescriptorAccessor.GetHashCode();
|
||||
}
|
||||
if (this.Deprecated)
|
||||
{
|
||||
num ^= this.Deprecated.GetHashCode();
|
||||
}
|
||||
if (this.MapEntry)
|
||||
{
|
||||
num ^= this.MapEntry.GetHashCode();
|
||||
}
|
||||
return num ^ this.uninterpretedOption_.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x060004A6 RID: 1190 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x060004A7 RID: 1191 RVA: 0x00011994 File Offset: 0x0000FB94
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.MessageSetWireFormat)
|
||||
{
|
||||
output.WriteRawTag(8);
|
||||
output.WriteBool(this.MessageSetWireFormat);
|
||||
}
|
||||
if (this.NoStandardDescriptorAccessor)
|
||||
{
|
||||
output.WriteRawTag(16);
|
||||
output.WriteBool(this.NoStandardDescriptorAccessor);
|
||||
}
|
||||
if (this.Deprecated)
|
||||
{
|
||||
output.WriteRawTag(24);
|
||||
output.WriteBool(this.Deprecated);
|
||||
}
|
||||
if (this.MapEntry)
|
||||
{
|
||||
output.WriteRawTag(56);
|
||||
output.WriteBool(this.MapEntry);
|
||||
}
|
||||
this.uninterpretedOption_.WriteTo(output, MessageOptions._repeated_uninterpretedOption_codec);
|
||||
}
|
||||
|
||||
// Token: 0x060004A8 RID: 1192 RVA: 0x00011A24 File Offset: 0x0000FC24
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.MessageSetWireFormat)
|
||||
{
|
||||
num += 2;
|
||||
}
|
||||
if (this.NoStandardDescriptorAccessor)
|
||||
{
|
||||
num += 2;
|
||||
}
|
||||
if (this.Deprecated)
|
||||
{
|
||||
num += 2;
|
||||
}
|
||||
if (this.MapEntry)
|
||||
{
|
||||
num += 2;
|
||||
}
|
||||
return num + this.uninterpretedOption_.CalculateSize(MessageOptions._repeated_uninterpretedOption_codec);
|
||||
}
|
||||
|
||||
// Token: 0x060004A9 RID: 1193 RVA: 0x00011A78 File Offset: 0x0000FC78
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(MessageOptions other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.MessageSetWireFormat)
|
||||
{
|
||||
this.MessageSetWireFormat = other.MessageSetWireFormat;
|
||||
}
|
||||
if (other.NoStandardDescriptorAccessor)
|
||||
{
|
||||
this.NoStandardDescriptorAccessor = other.NoStandardDescriptorAccessor;
|
||||
}
|
||||
if (other.Deprecated)
|
||||
{
|
||||
this.Deprecated = other.Deprecated;
|
||||
}
|
||||
if (other.MapEntry)
|
||||
{
|
||||
this.MapEntry = other.MapEntry;
|
||||
}
|
||||
this.uninterpretedOption_.Add(other.uninterpretedOption_);
|
||||
}
|
||||
|
||||
// Token: 0x060004AA RID: 1194 RVA: 0x00011AEC File Offset: 0x0000FCEC
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num <= 16U)
|
||||
{
|
||||
if (num == 8U)
|
||||
{
|
||||
this.MessageSetWireFormat = input.ReadBool();
|
||||
continue;
|
||||
}
|
||||
if (num == 16U)
|
||||
{
|
||||
this.NoStandardDescriptorAccessor = input.ReadBool();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num == 24U)
|
||||
{
|
||||
this.Deprecated = input.ReadBool();
|
||||
continue;
|
||||
}
|
||||
if (num == 56U)
|
||||
{
|
||||
this.MapEntry = input.ReadBool();
|
||||
continue;
|
||||
}
|
||||
if (num == 7994U)
|
||||
{
|
||||
this.uninterpretedOption_.AddEntriesFrom(input, MessageOptions._repeated_uninterpretedOption_codec);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
input.SkipLastField();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040001B4 RID: 436
|
||||
private static readonly MessageParser<MessageOptions> _parser = new MessageParser<MessageOptions>(() => new MessageOptions());
|
||||
|
||||
// Token: 0x040001B5 RID: 437
|
||||
public const int MessageSetWireFormatFieldNumber = 1;
|
||||
|
||||
// Token: 0x040001B6 RID: 438
|
||||
private bool messageSetWireFormat_;
|
||||
|
||||
// Token: 0x040001B7 RID: 439
|
||||
public const int NoStandardDescriptorAccessorFieldNumber = 2;
|
||||
|
||||
// Token: 0x040001B8 RID: 440
|
||||
private bool noStandardDescriptorAccessor_;
|
||||
|
||||
// Token: 0x040001B9 RID: 441
|
||||
public const int DeprecatedFieldNumber = 3;
|
||||
|
||||
// Token: 0x040001BA RID: 442
|
||||
private bool deprecated_;
|
||||
|
||||
// Token: 0x040001BB RID: 443
|
||||
public const int MapEntryFieldNumber = 7;
|
||||
|
||||
// Token: 0x040001BC RID: 444
|
||||
private bool mapEntry_;
|
||||
|
||||
// Token: 0x040001BD RID: 445
|
||||
public const int UninterpretedOptionFieldNumber = 999;
|
||||
|
||||
// Token: 0x040001BE RID: 446
|
||||
private static readonly FieldCodec<UninterpretedOption> _repeated_uninterpretedOption_codec = FieldCodec.ForMessage<UninterpretedOption>(7994U, Google.Protobuf.Reflection.UninterpretedOption.Parser);
|
||||
|
||||
// Token: 0x040001BF RID: 447
|
||||
private readonly RepeatedField<UninterpretedOption> uninterpretedOption_ = new RepeatedField<UninterpretedOption>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
using System;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000064 RID: 100
|
||||
public sealed class MethodDescriptor : DescriptorBase
|
||||
{
|
||||
// Token: 0x170001A1 RID: 417
|
||||
// (get) Token: 0x060005D5 RID: 1493 RVA: 0x00014993 File Offset: 0x00012B93
|
||||
public ServiceDescriptor Service
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.service;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001A2 RID: 418
|
||||
// (get) Token: 0x060005D6 RID: 1494 RVA: 0x0001499B File Offset: 0x00012B9B
|
||||
public MessageDescriptor InputType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.inputType;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001A3 RID: 419
|
||||
// (get) Token: 0x060005D7 RID: 1495 RVA: 0x000149A3 File Offset: 0x00012BA3
|
||||
public MessageDescriptor OutputType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.outputType;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001A4 RID: 420
|
||||
// (get) Token: 0x060005D8 RID: 1496 RVA: 0x000149AB File Offset: 0x00012BAB
|
||||
public bool IsClientStreaming
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.proto.ClientStreaming;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001A5 RID: 421
|
||||
// (get) Token: 0x060005D9 RID: 1497 RVA: 0x000149B8 File Offset: 0x00012BB8
|
||||
public bool IsServerStreaming
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.proto.ServerStreaming;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060005DA RID: 1498 RVA: 0x000149C5 File Offset: 0x00012BC5
|
||||
internal MethodDescriptor(MethodDescriptorProto proto, FileDescriptor file, ServiceDescriptor parent, int index)
|
||||
: base(file, parent.FullName + "." + proto.Name, index)
|
||||
{
|
||||
this.proto = proto;
|
||||
this.service = parent;
|
||||
file.DescriptorPool.AddSymbol(this);
|
||||
}
|
||||
|
||||
// Token: 0x170001A6 RID: 422
|
||||
// (get) Token: 0x060005DB RID: 1499 RVA: 0x00014A00 File Offset: 0x00012C00
|
||||
internal MethodDescriptorProto Proto
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.proto;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001A7 RID: 423
|
||||
// (get) Token: 0x060005DC RID: 1500 RVA: 0x00014A08 File Offset: 0x00012C08
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.proto.Name;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060005DD RID: 1501 RVA: 0x00014A18 File Offset: 0x00012C18
|
||||
internal void CrossLink()
|
||||
{
|
||||
IDescriptor descriptor = base.File.DescriptorPool.LookupSymbol(this.Proto.InputType, this);
|
||||
if (!(descriptor is MessageDescriptor))
|
||||
{
|
||||
throw new DescriptorValidationException(this, "\"" + this.Proto.InputType + "\" is not a message type.");
|
||||
}
|
||||
this.inputType = (MessageDescriptor)descriptor;
|
||||
descriptor = base.File.DescriptorPool.LookupSymbol(this.Proto.OutputType, this);
|
||||
if (!(descriptor is MessageDescriptor))
|
||||
{
|
||||
throw new DescriptorValidationException(this, "\"" + this.Proto.OutputType + "\" is not a message type.");
|
||||
}
|
||||
this.outputType = (MessageDescriptor)descriptor;
|
||||
}
|
||||
|
||||
// Token: 0x04000250 RID: 592
|
||||
private readonly MethodDescriptorProto proto;
|
||||
|
||||
// Token: 0x04000251 RID: 593
|
||||
private readonly ServiceDescriptor service;
|
||||
|
||||
// Token: 0x04000252 RID: 594
|
||||
private MessageDescriptor inputType;
|
||||
|
||||
// Token: 0x04000253 RID: 595
|
||||
private MessageDescriptor outputType;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,413 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000049 RID: 73
|
||||
internal sealed class MethodDescriptorProto : IMessage<MethodDescriptorProto>, IMessage, IEquatable<MethodDescriptorProto>, IDeepCloneable<MethodDescriptorProto>
|
||||
{
|
||||
// Token: 0x1700010A RID: 266
|
||||
// (get) Token: 0x0600044D RID: 1101 RVA: 0x00010699 File Offset: 0x0000E899
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<MethodDescriptorProto> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return MethodDescriptorProto._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700010B RID: 267
|
||||
// (get) Token: 0x0600044E RID: 1102 RVA: 0x000106A0 File Offset: 0x0000E8A0
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorReflection.Descriptor.MessageTypes[8];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700010C RID: 268
|
||||
// (get) Token: 0x0600044F RID: 1103 RVA: 0x000106B2 File Offset: 0x0000E8B2
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return MethodDescriptorProto.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000450 RID: 1104 RVA: 0x000106B9 File Offset: 0x0000E8B9
|
||||
[DebuggerNonUserCode]
|
||||
public MethodDescriptorProto()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000451 RID: 1105 RVA: 0x000106E4 File Offset: 0x0000E8E4
|
||||
[DebuggerNonUserCode]
|
||||
public MethodDescriptorProto(MethodDescriptorProto other)
|
||||
: this()
|
||||
{
|
||||
this.name_ = other.name_;
|
||||
this.inputType_ = other.inputType_;
|
||||
this.outputType_ = other.outputType_;
|
||||
this.Options = ((other.options_ != null) ? other.Options.Clone() : null);
|
||||
this.clientStreaming_ = other.clientStreaming_;
|
||||
this.serverStreaming_ = other.serverStreaming_;
|
||||
}
|
||||
|
||||
// Token: 0x06000452 RID: 1106 RVA: 0x0001074F File Offset: 0x0000E94F
|
||||
[DebuggerNonUserCode]
|
||||
public MethodDescriptorProto Clone()
|
||||
{
|
||||
return new MethodDescriptorProto(this);
|
||||
}
|
||||
|
||||
// Token: 0x1700010D RID: 269
|
||||
// (get) Token: 0x06000453 RID: 1107 RVA: 0x00010757 File Offset: 0x0000E957
|
||||
// (set) Token: 0x06000454 RID: 1108 RVA: 0x0001075F File Offset: 0x0000E95F
|
||||
[DebuggerNonUserCode]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.name_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700010E RID: 270
|
||||
// (get) Token: 0x06000455 RID: 1109 RVA: 0x00010772 File Offset: 0x0000E972
|
||||
// (set) Token: 0x06000456 RID: 1110 RVA: 0x0001077A File Offset: 0x0000E97A
|
||||
[DebuggerNonUserCode]
|
||||
public string InputType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.inputType_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.inputType_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700010F RID: 271
|
||||
// (get) Token: 0x06000457 RID: 1111 RVA: 0x0001078D File Offset: 0x0000E98D
|
||||
// (set) Token: 0x06000458 RID: 1112 RVA: 0x00010795 File Offset: 0x0000E995
|
||||
[DebuggerNonUserCode]
|
||||
public string OutputType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.outputType_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.outputType_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000110 RID: 272
|
||||
// (get) Token: 0x06000459 RID: 1113 RVA: 0x000107A8 File Offset: 0x0000E9A8
|
||||
// (set) Token: 0x0600045A RID: 1114 RVA: 0x000107B0 File Offset: 0x0000E9B0
|
||||
[DebuggerNonUserCode]
|
||||
public MethodOptions Options
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.options_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.options_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000111 RID: 273
|
||||
// (get) Token: 0x0600045B RID: 1115 RVA: 0x000107B9 File Offset: 0x0000E9B9
|
||||
// (set) Token: 0x0600045C RID: 1116 RVA: 0x000107C1 File Offset: 0x0000E9C1
|
||||
[DebuggerNonUserCode]
|
||||
public bool ClientStreaming
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.clientStreaming_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.clientStreaming_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000112 RID: 274
|
||||
// (get) Token: 0x0600045D RID: 1117 RVA: 0x000107CA File Offset: 0x0000E9CA
|
||||
// (set) Token: 0x0600045E RID: 1118 RVA: 0x000107D2 File Offset: 0x0000E9D2
|
||||
[DebuggerNonUserCode]
|
||||
public bool ServerStreaming
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.serverStreaming_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.serverStreaming_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600045F RID: 1119 RVA: 0x000107DB File Offset: 0x0000E9DB
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as MethodDescriptorProto);
|
||||
}
|
||||
|
||||
// Token: 0x06000460 RID: 1120 RVA: 0x000107EC File Offset: 0x0000E9EC
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(MethodDescriptorProto other)
|
||||
{
|
||||
return other != null && (other == this || (!(this.Name != other.Name) && !(this.InputType != other.InputType) && !(this.OutputType != other.OutputType) && object.Equals(this.Options, other.Options) && this.ClientStreaming == other.ClientStreaming && this.ServerStreaming == other.ServerStreaming));
|
||||
}
|
||||
|
||||
// Token: 0x06000461 RID: 1121 RVA: 0x0001087C File Offset: 0x0000EA7C
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
num ^= this.Name.GetHashCode();
|
||||
}
|
||||
if (this.InputType.Length != 0)
|
||||
{
|
||||
num ^= this.InputType.GetHashCode();
|
||||
}
|
||||
if (this.OutputType.Length != 0)
|
||||
{
|
||||
num ^= this.OutputType.GetHashCode();
|
||||
}
|
||||
if (this.options_ != null)
|
||||
{
|
||||
num ^= this.Options.GetHashCode();
|
||||
}
|
||||
if (this.ClientStreaming)
|
||||
{
|
||||
num ^= this.ClientStreaming.GetHashCode();
|
||||
}
|
||||
if (this.ServerStreaming)
|
||||
{
|
||||
num ^= this.ServerStreaming.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000462 RID: 1122 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x06000463 RID: 1123 RVA: 0x00010928 File Offset: 0x0000EB28
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(this.Name);
|
||||
}
|
||||
if (this.InputType.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(18);
|
||||
output.WriteString(this.InputType);
|
||||
}
|
||||
if (this.OutputType.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(26);
|
||||
output.WriteString(this.OutputType);
|
||||
}
|
||||
if (this.options_ != null)
|
||||
{
|
||||
output.WriteRawTag(34);
|
||||
output.WriteMessage(this.Options);
|
||||
}
|
||||
if (this.ClientStreaming)
|
||||
{
|
||||
output.WriteRawTag(40);
|
||||
output.WriteBool(this.ClientStreaming);
|
||||
}
|
||||
if (this.ServerStreaming)
|
||||
{
|
||||
output.WriteRawTag(48);
|
||||
output.WriteBool(this.ServerStreaming);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000464 RID: 1124 RVA: 0x000109EC File Offset: 0x0000EBEC
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.Name);
|
||||
}
|
||||
if (this.InputType.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.InputType);
|
||||
}
|
||||
if (this.OutputType.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.OutputType);
|
||||
}
|
||||
if (this.options_ != null)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeMessageSize(this.Options);
|
||||
}
|
||||
if (this.ClientStreaming)
|
||||
{
|
||||
num += 2;
|
||||
}
|
||||
if (this.ServerStreaming)
|
||||
{
|
||||
num += 2;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000465 RID: 1125 RVA: 0x00010A84 File Offset: 0x0000EC84
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(MethodDescriptorProto other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Name.Length != 0)
|
||||
{
|
||||
this.Name = other.Name;
|
||||
}
|
||||
if (other.InputType.Length != 0)
|
||||
{
|
||||
this.InputType = other.InputType;
|
||||
}
|
||||
if (other.OutputType.Length != 0)
|
||||
{
|
||||
this.OutputType = other.OutputType;
|
||||
}
|
||||
if (other.options_ != null)
|
||||
{
|
||||
if (this.options_ == null)
|
||||
{
|
||||
this.options_ = new MethodOptions();
|
||||
}
|
||||
this.Options.MergeFrom(other.Options);
|
||||
}
|
||||
if (other.ClientStreaming)
|
||||
{
|
||||
this.ClientStreaming = other.ClientStreaming;
|
||||
}
|
||||
if (other.ServerStreaming)
|
||||
{
|
||||
this.ServerStreaming = other.ServerStreaming;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000466 RID: 1126 RVA: 0x00010B34 File Offset: 0x0000ED34
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num <= 26U)
|
||||
{
|
||||
if (num == 10U)
|
||||
{
|
||||
this.Name = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
if (num == 18U)
|
||||
{
|
||||
this.InputType = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
if (num == 26U)
|
||||
{
|
||||
this.OutputType = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num == 34U)
|
||||
{
|
||||
if (this.options_ == null)
|
||||
{
|
||||
this.options_ = new MethodOptions();
|
||||
}
|
||||
input.ReadMessage(this.options_);
|
||||
continue;
|
||||
}
|
||||
if (num == 40U)
|
||||
{
|
||||
this.ClientStreaming = input.ReadBool();
|
||||
continue;
|
||||
}
|
||||
if (num == 48U)
|
||||
{
|
||||
this.ServerStreaming = input.ReadBool();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
input.SkipLastField();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000187 RID: 391
|
||||
private static readonly MessageParser<MethodDescriptorProto> _parser = new MessageParser<MethodDescriptorProto>(() => new MethodDescriptorProto());
|
||||
|
||||
// Token: 0x04000188 RID: 392
|
||||
public const int NameFieldNumber = 1;
|
||||
|
||||
// Token: 0x04000189 RID: 393
|
||||
private string name_ = "";
|
||||
|
||||
// Token: 0x0400018A RID: 394
|
||||
public const int InputTypeFieldNumber = 2;
|
||||
|
||||
// Token: 0x0400018B RID: 395
|
||||
private string inputType_ = "";
|
||||
|
||||
// Token: 0x0400018C RID: 396
|
||||
public const int OutputTypeFieldNumber = 3;
|
||||
|
||||
// Token: 0x0400018D RID: 397
|
||||
private string outputType_ = "";
|
||||
|
||||
// Token: 0x0400018E RID: 398
|
||||
public const int OptionsFieldNumber = 4;
|
||||
|
||||
// Token: 0x0400018F RID: 399
|
||||
private MethodOptions options_;
|
||||
|
||||
// Token: 0x04000190 RID: 400
|
||||
public const int ClientStreamingFieldNumber = 5;
|
||||
|
||||
// Token: 0x04000191 RID: 401
|
||||
private bool clientStreaming_;
|
||||
|
||||
// Token: 0x04000192 RID: 402
|
||||
public const int ServerStreamingFieldNumber = 6;
|
||||
|
||||
// Token: 0x04000193 RID: 403
|
||||
private bool serverStreaming_;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Collections;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000051 RID: 81
|
||||
internal sealed class MethodOptions : IMessage<MethodOptions>, IMessage, IEquatable<MethodOptions>, IDeepCloneable<MethodOptions>
|
||||
{
|
||||
// Token: 0x1700014B RID: 331
|
||||
// (get) Token: 0x06000511 RID: 1297 RVA: 0x000128F4 File Offset: 0x00010AF4
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<MethodOptions> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return MethodOptions._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700014C RID: 332
|
||||
// (get) Token: 0x06000512 RID: 1298 RVA: 0x000128FB File Offset: 0x00010AFB
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorReflection.Descriptor.MessageTypes[16];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700014D RID: 333
|
||||
// (get) Token: 0x06000513 RID: 1299 RVA: 0x0001290E File Offset: 0x00010B0E
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return MethodOptions.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000514 RID: 1300 RVA: 0x00012915 File Offset: 0x00010B15
|
||||
[DebuggerNonUserCode]
|
||||
public MethodOptions()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000515 RID: 1301 RVA: 0x00012928 File Offset: 0x00010B28
|
||||
[DebuggerNonUserCode]
|
||||
public MethodOptions(MethodOptions other)
|
||||
: this()
|
||||
{
|
||||
this.deprecated_ = other.deprecated_;
|
||||
this.uninterpretedOption_ = other.uninterpretedOption_.Clone();
|
||||
}
|
||||
|
||||
// Token: 0x06000516 RID: 1302 RVA: 0x0001294D File Offset: 0x00010B4D
|
||||
[DebuggerNonUserCode]
|
||||
public MethodOptions Clone()
|
||||
{
|
||||
return new MethodOptions(this);
|
||||
}
|
||||
|
||||
// Token: 0x1700014E RID: 334
|
||||
// (get) Token: 0x06000517 RID: 1303 RVA: 0x00012955 File Offset: 0x00010B55
|
||||
// (set) Token: 0x06000518 RID: 1304 RVA: 0x0001295D File Offset: 0x00010B5D
|
||||
[DebuggerNonUserCode]
|
||||
public bool Deprecated
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.deprecated_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.deprecated_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700014F RID: 335
|
||||
// (get) Token: 0x06000519 RID: 1305 RVA: 0x00012966 File Offset: 0x00010B66
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<UninterpretedOption> UninterpretedOption
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.uninterpretedOption_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600051A RID: 1306 RVA: 0x0001296E File Offset: 0x00010B6E
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as MethodOptions);
|
||||
}
|
||||
|
||||
// Token: 0x0600051B RID: 1307 RVA: 0x0001297C File Offset: 0x00010B7C
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(MethodOptions other)
|
||||
{
|
||||
return other != null && (other == this || (this.Deprecated == other.Deprecated && this.uninterpretedOption_.Equals(other.uninterpretedOption_)));
|
||||
}
|
||||
|
||||
// Token: 0x0600051C RID: 1308 RVA: 0x000129B0 File Offset: 0x00010BB0
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Deprecated)
|
||||
{
|
||||
num ^= this.Deprecated.GetHashCode();
|
||||
}
|
||||
return num ^ this.uninterpretedOption_.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x0600051D RID: 1309 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x0600051E RID: 1310 RVA: 0x000129E7 File Offset: 0x00010BE7
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Deprecated)
|
||||
{
|
||||
output.WriteRawTag(136, 2);
|
||||
output.WriteBool(this.Deprecated);
|
||||
}
|
||||
this.uninterpretedOption_.WriteTo(output, MethodOptions._repeated_uninterpretedOption_codec);
|
||||
}
|
||||
|
||||
// Token: 0x0600051F RID: 1311 RVA: 0x00012A1C File Offset: 0x00010C1C
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Deprecated)
|
||||
{
|
||||
num += 3;
|
||||
}
|
||||
return num + this.uninterpretedOption_.CalculateSize(MethodOptions._repeated_uninterpretedOption_codec);
|
||||
}
|
||||
|
||||
// Token: 0x06000520 RID: 1312 RVA: 0x00012A4B File Offset: 0x00010C4B
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(MethodOptions other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Deprecated)
|
||||
{
|
||||
this.Deprecated = other.Deprecated;
|
||||
}
|
||||
this.uninterpretedOption_.Add(other.uninterpretedOption_);
|
||||
}
|
||||
|
||||
// Token: 0x06000521 RID: 1313 RVA: 0x00012A78 File Offset: 0x00010C78
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 264U)
|
||||
{
|
||||
if (num != 7994U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.uninterpretedOption_.AddEntriesFrom(input, MethodOptions._repeated_uninterpretedOption_codec);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Deprecated = input.ReadBool();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040001E8 RID: 488
|
||||
private static readonly MessageParser<MethodOptions> _parser = new MessageParser<MethodOptions>(() => new MethodOptions());
|
||||
|
||||
// Token: 0x040001E9 RID: 489
|
||||
public const int DeprecatedFieldNumber = 33;
|
||||
|
||||
// Token: 0x040001EA RID: 490
|
||||
private bool deprecated_;
|
||||
|
||||
// Token: 0x040001EB RID: 491
|
||||
public const int UninterpretedOptionFieldNumber = 999;
|
||||
|
||||
// Token: 0x040001EC RID: 492
|
||||
private static readonly FieldCodec<UninterpretedOption> _repeated_uninterpretedOption_codec = FieldCodec.ForMessage<UninterpretedOption>(7994U, Google.Protobuf.Reflection.UninterpretedOption.Parser);
|
||||
|
||||
// Token: 0x040001ED RID: 493
|
||||
private readonly RepeatedField<UninterpretedOption> uninterpretedOption_ = new RepeatedField<UninterpretedOption>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000065 RID: 101
|
||||
public sealed class OneofAccessor
|
||||
{
|
||||
// Token: 0x060005DE RID: 1502 RVA: 0x00014ACC File Offset: 0x00012CCC
|
||||
internal OneofAccessor(PropertyInfo caseProperty, MethodInfo clearMethod, OneofDescriptor descriptor)
|
||||
{
|
||||
if (!caseProperty.CanRead)
|
||||
{
|
||||
throw new ArgumentException("Cannot read from property");
|
||||
}
|
||||
this.descriptor = descriptor;
|
||||
this.caseDelegate = ReflectionUtil.CreateFuncIMessageT<int>(caseProperty.GetGetMethod());
|
||||
this.descriptor = descriptor;
|
||||
this.clearDelegate = ReflectionUtil.CreateActionIMessage(clearMethod);
|
||||
}
|
||||
|
||||
// Token: 0x170001A8 RID: 424
|
||||
// (get) Token: 0x060005DF RID: 1503 RVA: 0x00014B1D File Offset: 0x00012D1D
|
||||
public OneofDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060005E0 RID: 1504 RVA: 0x00014B25 File Offset: 0x00012D25
|
||||
public void Clear(IMessage message)
|
||||
{
|
||||
this.clearDelegate(message);
|
||||
}
|
||||
|
||||
// Token: 0x060005E1 RID: 1505 RVA: 0x00014B34 File Offset: 0x00012D34
|
||||
public FieldDescriptor GetCaseFieldDescriptor(IMessage message)
|
||||
{
|
||||
int num = this.caseDelegate(message);
|
||||
if (num > 0)
|
||||
{
|
||||
return this.descriptor.ContainingType.FindFieldByNumber(num);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// Token: 0x04000254 RID: 596
|
||||
private readonly Func<IMessage, int> caseDelegate;
|
||||
|
||||
// Token: 0x04000255 RID: 597
|
||||
private readonly Action<IMessage> clearDelegate;
|
||||
|
||||
// Token: 0x04000256 RID: 598
|
||||
private OneofDescriptor descriptor;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000066 RID: 102
|
||||
public sealed class OneofDescriptor : DescriptorBase
|
||||
{
|
||||
// Token: 0x060005E2 RID: 1506 RVA: 0x00014B65 File Offset: 0x00012D65
|
||||
internal OneofDescriptor(OneofDescriptorProto proto, FileDescriptor file, MessageDescriptor parent, int index, string clrName)
|
||||
: base(file, file.ComputeFullName(parent, proto.Name), index)
|
||||
{
|
||||
this.proto = proto;
|
||||
this.containingType = parent;
|
||||
file.DescriptorPool.AddSymbol(this);
|
||||
this.accessor = this.CreateAccessor(clrName);
|
||||
}
|
||||
|
||||
// Token: 0x170001A9 RID: 425
|
||||
// (get) Token: 0x060005E3 RID: 1507 RVA: 0x00014BA5 File Offset: 0x00012DA5
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.proto.Name;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001AA RID: 426
|
||||
// (get) Token: 0x060005E4 RID: 1508 RVA: 0x00014BB2 File Offset: 0x00012DB2
|
||||
public MessageDescriptor ContainingType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.containingType;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001AB RID: 427
|
||||
// (get) Token: 0x060005E5 RID: 1509 RVA: 0x00014BBA File Offset: 0x00012DBA
|
||||
public IList<FieldDescriptor> Fields
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.fields;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001AC RID: 428
|
||||
// (get) Token: 0x060005E6 RID: 1510 RVA: 0x00014BC2 File Offset: 0x00012DC2
|
||||
public OneofAccessor Accessor
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.accessor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060005E7 RID: 1511 RVA: 0x00014BCC File Offset: 0x00012DCC
|
||||
internal void CrossLink()
|
||||
{
|
||||
List<FieldDescriptor> list = new List<FieldDescriptor>();
|
||||
foreach (FieldDescriptor fieldDescriptor in this.ContainingType.Fields.InDeclarationOrder())
|
||||
{
|
||||
if (fieldDescriptor.ContainingOneof == this)
|
||||
{
|
||||
list.Add(fieldDescriptor);
|
||||
}
|
||||
}
|
||||
this.fields = new ReadOnlyCollection<FieldDescriptor>(list);
|
||||
}
|
||||
|
||||
// Token: 0x060005E8 RID: 1512 RVA: 0x00014C40 File Offset: 0x00012E40
|
||||
private OneofAccessor CreateAccessor(string clrName)
|
||||
{
|
||||
PropertyInfo property = this.containingType.ClrType.GetProperty(clrName + "Case");
|
||||
if (property == null)
|
||||
{
|
||||
throw new DescriptorValidationException(this, string.Format("Property {0}Case not found in {1}", clrName, this.containingType.ClrType));
|
||||
}
|
||||
MethodInfo method = this.containingType.ClrType.GetMethod("Clear" + clrName);
|
||||
if (method == null)
|
||||
{
|
||||
throw new DescriptorValidationException(this, string.Format("Method Clear{0} not found in {1}", clrName, this.containingType.ClrType));
|
||||
}
|
||||
return new OneofAccessor(property, method, this);
|
||||
}
|
||||
|
||||
// Token: 0x04000257 RID: 599
|
||||
private readonly OneofDescriptorProto proto;
|
||||
|
||||
// Token: 0x04000258 RID: 600
|
||||
private MessageDescriptor containingType;
|
||||
|
||||
// Token: 0x04000259 RID: 601
|
||||
private IList<FieldDescriptor> fields;
|
||||
|
||||
// Token: 0x0400025A RID: 602
|
||||
private readonly OneofAccessor accessor;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,231 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000045 RID: 69
|
||||
internal sealed class OneofDescriptorProto : IMessage<OneofDescriptorProto>, IMessage, IEquatable<OneofDescriptorProto>, IDeepCloneable<OneofDescriptorProto>
|
||||
{
|
||||
// Token: 0x170000F3 RID: 243
|
||||
// (get) Token: 0x060003FD RID: 1021 RVA: 0x0000FA85 File Offset: 0x0000DC85
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<OneofDescriptorProto> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return OneofDescriptorProto._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000F4 RID: 244
|
||||
// (get) Token: 0x060003FE RID: 1022 RVA: 0x0000FA8C File Offset: 0x0000DC8C
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorReflection.Descriptor.MessageTypes[4];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000F5 RID: 245
|
||||
// (get) Token: 0x060003FF RID: 1023 RVA: 0x0000FA9E File Offset: 0x0000DC9E
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return OneofDescriptorProto.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000400 RID: 1024 RVA: 0x0000FAA5 File Offset: 0x0000DCA5
|
||||
[DebuggerNonUserCode]
|
||||
public OneofDescriptorProto()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000401 RID: 1025 RVA: 0x0000FAB8 File Offset: 0x0000DCB8
|
||||
[DebuggerNonUserCode]
|
||||
public OneofDescriptorProto(OneofDescriptorProto other)
|
||||
: this()
|
||||
{
|
||||
this.name_ = other.name_;
|
||||
this.Options = ((other.options_ != null) ? other.Options.Clone() : null);
|
||||
}
|
||||
|
||||
// Token: 0x06000402 RID: 1026 RVA: 0x0000FAE8 File Offset: 0x0000DCE8
|
||||
[DebuggerNonUserCode]
|
||||
public OneofDescriptorProto Clone()
|
||||
{
|
||||
return new OneofDescriptorProto(this);
|
||||
}
|
||||
|
||||
// Token: 0x170000F6 RID: 246
|
||||
// (get) Token: 0x06000403 RID: 1027 RVA: 0x0000FAF0 File Offset: 0x0000DCF0
|
||||
// (set) Token: 0x06000404 RID: 1028 RVA: 0x0000FAF8 File Offset: 0x0000DCF8
|
||||
[DebuggerNonUserCode]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.name_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000F7 RID: 247
|
||||
// (get) Token: 0x06000405 RID: 1029 RVA: 0x0000FB0B File Offset: 0x0000DD0B
|
||||
// (set) Token: 0x06000406 RID: 1030 RVA: 0x0000FB13 File Offset: 0x0000DD13
|
||||
[DebuggerNonUserCode]
|
||||
public OneofOptions Options
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.options_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.options_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000407 RID: 1031 RVA: 0x0000FB1C File Offset: 0x0000DD1C
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as OneofDescriptorProto);
|
||||
}
|
||||
|
||||
// Token: 0x06000408 RID: 1032 RVA: 0x0000FB2A File Offset: 0x0000DD2A
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(OneofDescriptorProto other)
|
||||
{
|
||||
return other != null && (other == this || (!(this.Name != other.Name) && object.Equals(this.Options, other.Options)));
|
||||
}
|
||||
|
||||
// Token: 0x06000409 RID: 1033 RVA: 0x0000FB64 File Offset: 0x0000DD64
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
num ^= this.Name.GetHashCode();
|
||||
}
|
||||
if (this.options_ != null)
|
||||
{
|
||||
num ^= this.Options.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0600040A RID: 1034 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x0600040B RID: 1035 RVA: 0x0000FBA5 File Offset: 0x0000DDA5
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(this.Name);
|
||||
}
|
||||
if (this.options_ != null)
|
||||
{
|
||||
output.WriteRawTag(18);
|
||||
output.WriteMessage(this.Options);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600040C RID: 1036 RVA: 0x0000FBE4 File Offset: 0x0000DDE4
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.Name);
|
||||
}
|
||||
if (this.options_ != null)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeMessageSize(this.Options);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0600040D RID: 1037 RVA: 0x0000FC2C File Offset: 0x0000DE2C
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(OneofDescriptorProto other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Name.Length != 0)
|
||||
{
|
||||
this.Name = other.Name;
|
||||
}
|
||||
if (other.options_ != null)
|
||||
{
|
||||
if (this.options_ == null)
|
||||
{
|
||||
this.options_ = new OneofOptions();
|
||||
}
|
||||
this.Options.MergeFrom(other.Options);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600040E RID: 1038 RVA: 0x0000FC84 File Offset: 0x0000DE84
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 10U)
|
||||
{
|
||||
if (num != 18U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.options_ == null)
|
||||
{
|
||||
this.options_ = new OneofOptions();
|
||||
}
|
||||
input.ReadMessage(this.options_);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Name = input.ReadString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400016B RID: 363
|
||||
private static readonly MessageParser<OneofDescriptorProto> _parser = new MessageParser<OneofDescriptorProto>(() => new OneofDescriptorProto());
|
||||
|
||||
// Token: 0x0400016C RID: 364
|
||||
public const int NameFieldNumber = 1;
|
||||
|
||||
// Token: 0x0400016D RID: 365
|
||||
private string name_ = "";
|
||||
|
||||
// Token: 0x0400016E RID: 366
|
||||
public const int OptionsFieldNumber = 2;
|
||||
|
||||
// Token: 0x0400016F RID: 367
|
||||
private OneofOptions options_;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,158 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Collections;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x0200004D RID: 77
|
||||
internal sealed class OneofOptions : IMessage<OneofOptions>, IMessage, IEquatable<OneofOptions>, IDeepCloneable<OneofOptions>
|
||||
{
|
||||
// Token: 0x17000137 RID: 311
|
||||
// (get) Token: 0x060004C9 RID: 1225 RVA: 0x00012103 File Offset: 0x00010303
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<OneofOptions> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return OneofOptions._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000138 RID: 312
|
||||
// (get) Token: 0x060004CA RID: 1226 RVA: 0x0001210A File Offset: 0x0001030A
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorReflection.Descriptor.MessageTypes[12];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000139 RID: 313
|
||||
// (get) Token: 0x060004CB RID: 1227 RVA: 0x0001211D File Offset: 0x0001031D
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return OneofOptions.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060004CC RID: 1228 RVA: 0x00012124 File Offset: 0x00010324
|
||||
[DebuggerNonUserCode]
|
||||
public OneofOptions()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060004CD RID: 1229 RVA: 0x00012137 File Offset: 0x00010337
|
||||
[DebuggerNonUserCode]
|
||||
public OneofOptions(OneofOptions other)
|
||||
: this()
|
||||
{
|
||||
this.uninterpretedOption_ = other.uninterpretedOption_.Clone();
|
||||
}
|
||||
|
||||
// Token: 0x060004CE RID: 1230 RVA: 0x00012150 File Offset: 0x00010350
|
||||
[DebuggerNonUserCode]
|
||||
public OneofOptions Clone()
|
||||
{
|
||||
return new OneofOptions(this);
|
||||
}
|
||||
|
||||
// Token: 0x1700013A RID: 314
|
||||
// (get) Token: 0x060004CF RID: 1231 RVA: 0x00012158 File Offset: 0x00010358
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<UninterpretedOption> UninterpretedOption
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.uninterpretedOption_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060004D0 RID: 1232 RVA: 0x00012160 File Offset: 0x00010360
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as OneofOptions);
|
||||
}
|
||||
|
||||
// Token: 0x060004D1 RID: 1233 RVA: 0x0001216E File Offset: 0x0001036E
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(OneofOptions other)
|
||||
{
|
||||
return other != null && (other == this || this.uninterpretedOption_.Equals(other.uninterpretedOption_));
|
||||
}
|
||||
|
||||
// Token: 0x060004D2 RID: 1234 RVA: 0x00012191 File Offset: 0x00010391
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return 1 ^ this.uninterpretedOption_.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x060004D3 RID: 1235 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x060004D4 RID: 1236 RVA: 0x000121A0 File Offset: 0x000103A0
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
this.uninterpretedOption_.WriteTo(output, OneofOptions._repeated_uninterpretedOption_codec);
|
||||
}
|
||||
|
||||
// Token: 0x060004D5 RID: 1237 RVA: 0x000121B3 File Offset: 0x000103B3
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
return 0 + this.uninterpretedOption_.CalculateSize(OneofOptions._repeated_uninterpretedOption_codec);
|
||||
}
|
||||
|
||||
// Token: 0x060004D6 RID: 1238 RVA: 0x000121C7 File Offset: 0x000103C7
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(OneofOptions other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.uninterpretedOption_.Add(other.uninterpretedOption_);
|
||||
}
|
||||
|
||||
// Token: 0x060004D7 RID: 1239 RVA: 0x000121E0 File Offset: 0x000103E0
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 7994U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.uninterpretedOption_.AddEntriesFrom(input, OneofOptions._repeated_uninterpretedOption_codec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040001D0 RID: 464
|
||||
private static readonly MessageParser<OneofOptions> _parser = new MessageParser<OneofOptions>(() => new OneofOptions());
|
||||
|
||||
// Token: 0x040001D1 RID: 465
|
||||
public const int UninterpretedOptionFieldNumber = 999;
|
||||
|
||||
// Token: 0x040001D2 RID: 466
|
||||
private static readonly FieldCodec<UninterpretedOption> _repeated_uninterpretedOption_codec = FieldCodec.ForMessage<UninterpretedOption>(7994U, Google.Protobuf.Reflection.UninterpretedOption.Parser);
|
||||
|
||||
// Token: 0x040001D3 RID: 467
|
||||
private readonly RepeatedField<UninterpretedOption> uninterpretedOption_ = new RepeatedField<UninterpretedOption>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000067 RID: 103
|
||||
[AttributeUsage(AttributeTargets.Field)]
|
||||
public class OriginalNameAttribute : Attribute
|
||||
{
|
||||
// Token: 0x170001AD RID: 429
|
||||
// (get) Token: 0x060005E9 RID: 1513 RVA: 0x00014CCB File Offset: 0x00012ECB
|
||||
// (set) Token: 0x060005EA RID: 1514 RVA: 0x00014CD3 File Offset: 0x00012ED3
|
||||
public string Name { get; set; }
|
||||
|
||||
// Token: 0x060005EB RID: 1515 RVA: 0x00014CDC File Offset: 0x00012EDC
|
||||
public OriginalNameAttribute(string name)
|
||||
{
|
||||
this.Name = ProtoPreconditions.CheckNotNull<string>(name, "name");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000068 RID: 104
|
||||
internal sealed class PackageDescriptor : IDescriptor
|
||||
{
|
||||
// Token: 0x060005EC RID: 1516 RVA: 0x00014CF5 File Offset: 0x00012EF5
|
||||
internal PackageDescriptor(string name, string fullName, FileDescriptor file)
|
||||
{
|
||||
this.file = file;
|
||||
this.fullName = fullName;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
// Token: 0x170001AE RID: 430
|
||||
// (get) Token: 0x060005ED RID: 1517 RVA: 0x00014D12 File Offset: 0x00012F12
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001AF RID: 431
|
||||
// (get) Token: 0x060005EE RID: 1518 RVA: 0x00014D1A File Offset: 0x00012F1A
|
||||
public string FullName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.fullName;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001B0 RID: 432
|
||||
// (get) Token: 0x060005EF RID: 1519 RVA: 0x00014D22 File Offset: 0x00012F22
|
||||
public FileDescriptor File
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.file;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400025C RID: 604
|
||||
private readonly string name;
|
||||
|
||||
// Token: 0x0400025D RID: 605
|
||||
private readonly string fullName;
|
||||
|
||||
// Token: 0x0400025E RID: 606
|
||||
private readonly FileDescriptor file;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000069 RID: 105
|
||||
internal static class ReflectionUtil
|
||||
{
|
||||
// Token: 0x060005F0 RID: 1520 RVA: 0x00014D2C File Offset: 0x00012F2C
|
||||
internal static Func<IMessage, object> CreateFuncIMessageObject(MethodInfo method)
|
||||
{
|
||||
ParameterExpression parameterExpression;
|
||||
return Expression.Lambda<Func<IMessage, object>>(Expression.Convert(Expression.Call(Expression.Convert(parameterExpression, method.DeclaringType), method), typeof(object)), new ParameterExpression[] { parameterExpression }).Compile();
|
||||
}
|
||||
|
||||
// Token: 0x060005F1 RID: 1521 RVA: 0x00014D84 File Offset: 0x00012F84
|
||||
internal static Func<IMessage, T> CreateFuncIMessageT<T>(MethodInfo method)
|
||||
{
|
||||
ParameterExpression parameterExpression;
|
||||
return Expression.Lambda<Func<IMessage, T>>(Expression.Convert(Expression.Call(Expression.Convert(parameterExpression, method.DeclaringType), method), typeof(T)), new ParameterExpression[] { parameterExpression }).Compile();
|
||||
}
|
||||
|
||||
// Token: 0x060005F2 RID: 1522 RVA: 0x00014DDC File Offset: 0x00012FDC
|
||||
internal static Action<IMessage, object> CreateActionIMessageObject(MethodInfo method)
|
||||
{
|
||||
ParameterExpression parameterExpression = Expression.Parameter(typeof(IMessage), "target");
|
||||
ParameterExpression parameterExpression2 = Expression.Parameter(typeof(object), "arg");
|
||||
Expression expression = Expression.Convert(parameterExpression, method.DeclaringType);
|
||||
Expression expression2 = Expression.Convert(parameterExpression2, method.GetParameters()[0].ParameterType);
|
||||
return Expression.Lambda<Action<IMessage, object>>(Expression.Call(expression, method, new Expression[] { expression2 }), new ParameterExpression[] { parameterExpression, parameterExpression2 }).Compile();
|
||||
}
|
||||
|
||||
// Token: 0x060005F3 RID: 1523 RVA: 0x00014E5C File Offset: 0x0001305C
|
||||
internal static Action<IMessage> CreateActionIMessage(MethodInfo method)
|
||||
{
|
||||
ParameterExpression parameterExpression;
|
||||
return Expression.Lambda<Action<IMessage>>(Expression.Call(Expression.Convert(parameterExpression, method.DeclaringType), method), new ParameterExpression[] { parameterExpression }).Compile();
|
||||
}
|
||||
|
||||
// Token: 0x0400025F RID: 607
|
||||
internal static readonly Type[] EmptyTypes = new Type[0];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x0200006A RID: 106
|
||||
internal sealed class RepeatedFieldAccessor : FieldAccessorBase
|
||||
{
|
||||
// Token: 0x060005F5 RID: 1525 RVA: 0x0001454A File Offset: 0x0001274A
|
||||
internal RepeatedFieldAccessor(PropertyInfo property, FieldDescriptor descriptor)
|
||||
: base(property, descriptor)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060005F6 RID: 1526 RVA: 0x00014EB1 File Offset: 0x000130B1
|
||||
public override void Clear(IMessage message)
|
||||
{
|
||||
((IList)base.GetValue(message)).Clear();
|
||||
}
|
||||
|
||||
// Token: 0x060005F7 RID: 1527 RVA: 0x00014EC4 File Offset: 0x000130C4
|
||||
public override void SetValue(IMessage message, object value)
|
||||
{
|
||||
throw new InvalidOperationException("SetValue is not implemented for repeated fields");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x0200006B RID: 107
|
||||
public sealed class ServiceDescriptor : DescriptorBase
|
||||
{
|
||||
// Token: 0x060005F8 RID: 1528 RVA: 0x00014ED0 File Offset: 0x000130D0
|
||||
internal ServiceDescriptor(ServiceDescriptorProto proto, FileDescriptor file, int index)
|
||||
: base(file, file.ComputeFullName(null, proto.Name), index)
|
||||
{
|
||||
ServiceDescriptor <>4__this = this;
|
||||
this.proto = proto;
|
||||
this.methods = DescriptorUtil.ConvertAndMakeReadOnly<MethodDescriptorProto, MethodDescriptor>(proto.Method, (MethodDescriptorProto method, int i) => new MethodDescriptor(method, file, <>4__this, i));
|
||||
file.DescriptorPool.AddSymbol(this);
|
||||
}
|
||||
|
||||
// Token: 0x170001B1 RID: 433
|
||||
// (get) Token: 0x060005F9 RID: 1529 RVA: 0x00014F45 File Offset: 0x00013145
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.proto.Name;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001B2 RID: 434
|
||||
// (get) Token: 0x060005FA RID: 1530 RVA: 0x00014F52 File Offset: 0x00013152
|
||||
internal ServiceDescriptorProto Proto
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.proto;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001B3 RID: 435
|
||||
// (get) Token: 0x060005FB RID: 1531 RVA: 0x00014F5A File Offset: 0x0001315A
|
||||
public IList<MethodDescriptor> Methods
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.methods;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060005FC RID: 1532 RVA: 0x00014F62 File Offset: 0x00013162
|
||||
public MethodDescriptor FindMethodByName(string name)
|
||||
{
|
||||
return base.File.DescriptorPool.FindSymbol<MethodDescriptor>(base.FullName + "." + name);
|
||||
}
|
||||
|
||||
// Token: 0x060005FD RID: 1533 RVA: 0x00014F88 File Offset: 0x00013188
|
||||
internal void CrossLink()
|
||||
{
|
||||
foreach (MethodDescriptor methodDescriptor in this.methods)
|
||||
{
|
||||
methodDescriptor.CrossLink();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000260 RID: 608
|
||||
private readonly ServiceDescriptorProto proto;
|
||||
|
||||
// Token: 0x04000261 RID: 609
|
||||
private readonly IList<MethodDescriptor> methods;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,264 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Collections;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000048 RID: 72
|
||||
internal sealed class ServiceDescriptorProto : IMessage<ServiceDescriptorProto>, IMessage, IEquatable<ServiceDescriptorProto>, IDeepCloneable<ServiceDescriptorProto>
|
||||
{
|
||||
// Token: 0x17000104 RID: 260
|
||||
// (get) Token: 0x06000439 RID: 1081 RVA: 0x0001035F File Offset: 0x0000E55F
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<ServiceDescriptorProto> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return ServiceDescriptorProto._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000105 RID: 261
|
||||
// (get) Token: 0x0600043A RID: 1082 RVA: 0x00010366 File Offset: 0x0000E566
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorReflection.Descriptor.MessageTypes[7];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000106 RID: 262
|
||||
// (get) Token: 0x0600043B RID: 1083 RVA: 0x00010378 File Offset: 0x0000E578
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return ServiceDescriptorProto.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600043C RID: 1084 RVA: 0x0001037F File Offset: 0x0000E57F
|
||||
[DebuggerNonUserCode]
|
||||
public ServiceDescriptorProto()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600043D RID: 1085 RVA: 0x000103A0 File Offset: 0x0000E5A0
|
||||
[DebuggerNonUserCode]
|
||||
public ServiceDescriptorProto(ServiceDescriptorProto other)
|
||||
: this()
|
||||
{
|
||||
this.name_ = other.name_;
|
||||
this.method_ = other.method_.Clone();
|
||||
this.Options = ((other.options_ != null) ? other.Options.Clone() : null);
|
||||
}
|
||||
|
||||
// Token: 0x0600043E RID: 1086 RVA: 0x000103EC File Offset: 0x0000E5EC
|
||||
[DebuggerNonUserCode]
|
||||
public ServiceDescriptorProto Clone()
|
||||
{
|
||||
return new ServiceDescriptorProto(this);
|
||||
}
|
||||
|
||||
// Token: 0x17000107 RID: 263
|
||||
// (get) Token: 0x0600043F RID: 1087 RVA: 0x000103F4 File Offset: 0x0000E5F4
|
||||
// (set) Token: 0x06000440 RID: 1088 RVA: 0x000103FC File Offset: 0x0000E5FC
|
||||
[DebuggerNonUserCode]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.name_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000108 RID: 264
|
||||
// (get) Token: 0x06000441 RID: 1089 RVA: 0x0001040F File Offset: 0x0000E60F
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<MethodDescriptorProto> Method
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.method_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000109 RID: 265
|
||||
// (get) Token: 0x06000442 RID: 1090 RVA: 0x00010417 File Offset: 0x0000E617
|
||||
// (set) Token: 0x06000443 RID: 1091 RVA: 0x0001041F File Offset: 0x0000E61F
|
||||
[DebuggerNonUserCode]
|
||||
public ServiceOptions Options
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.options_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.options_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000444 RID: 1092 RVA: 0x00010428 File Offset: 0x0000E628
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as ServiceDescriptorProto);
|
||||
}
|
||||
|
||||
// Token: 0x06000445 RID: 1093 RVA: 0x00010438 File Offset: 0x0000E638
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(ServiceDescriptorProto other)
|
||||
{
|
||||
return other != null && (other == this || (!(this.Name != other.Name) && this.method_.Equals(other.method_) && object.Equals(this.Options, other.Options)));
|
||||
}
|
||||
|
||||
// Token: 0x06000446 RID: 1094 RVA: 0x00010490 File Offset: 0x0000E690
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
num ^= this.Name.GetHashCode();
|
||||
}
|
||||
num ^= this.method_.GetHashCode();
|
||||
if (this.options_ != null)
|
||||
{
|
||||
num ^= this.Options.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000447 RID: 1095 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x06000448 RID: 1096 RVA: 0x000104E0 File Offset: 0x0000E6E0
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(this.Name);
|
||||
}
|
||||
this.method_.WriteTo(output, ServiceDescriptorProto._repeated_method_codec);
|
||||
if (this.options_ != null)
|
||||
{
|
||||
output.WriteRawTag(26);
|
||||
output.WriteMessage(this.Options);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000449 RID: 1097 RVA: 0x0001053C File Offset: 0x0000E73C
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.Name);
|
||||
}
|
||||
num += this.method_.CalculateSize(ServiceDescriptorProto._repeated_method_codec);
|
||||
if (this.options_ != null)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeMessageSize(this.Options);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0600044A RID: 1098 RVA: 0x00010594 File Offset: 0x0000E794
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(ServiceDescriptorProto other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Name.Length != 0)
|
||||
{
|
||||
this.Name = other.Name;
|
||||
}
|
||||
this.method_.Add(other.method_);
|
||||
if (other.options_ != null)
|
||||
{
|
||||
if (this.options_ == null)
|
||||
{
|
||||
this.options_ = new ServiceOptions();
|
||||
}
|
||||
this.Options.MergeFrom(other.Options);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600044B RID: 1099 RVA: 0x000105FC File Offset: 0x0000E7FC
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 10U)
|
||||
{
|
||||
if (num != 18U)
|
||||
{
|
||||
if (num != 26U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.options_ == null)
|
||||
{
|
||||
this.options_ = new ServiceOptions();
|
||||
}
|
||||
input.ReadMessage(this.options_);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.method_.AddEntriesFrom(input, ServiceDescriptorProto._repeated_method_codec);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Name = input.ReadString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400017F RID: 383
|
||||
private static readonly MessageParser<ServiceDescriptorProto> _parser = new MessageParser<ServiceDescriptorProto>(() => new ServiceDescriptorProto());
|
||||
|
||||
// Token: 0x04000180 RID: 384
|
||||
public const int NameFieldNumber = 1;
|
||||
|
||||
// Token: 0x04000181 RID: 385
|
||||
private string name_ = "";
|
||||
|
||||
// Token: 0x04000182 RID: 386
|
||||
public const int MethodFieldNumber = 2;
|
||||
|
||||
// Token: 0x04000183 RID: 387
|
||||
private static readonly FieldCodec<MethodDescriptorProto> _repeated_method_codec = FieldCodec.ForMessage<MethodDescriptorProto>(18U, MethodDescriptorProto.Parser);
|
||||
|
||||
// Token: 0x04000184 RID: 388
|
||||
private readonly RepeatedField<MethodDescriptorProto> method_ = new RepeatedField<MethodDescriptorProto>();
|
||||
|
||||
// Token: 0x04000185 RID: 389
|
||||
public const int OptionsFieldNumber = 3;
|
||||
|
||||
// Token: 0x04000186 RID: 390
|
||||
private ServiceOptions options_;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Collections;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000050 RID: 80
|
||||
internal sealed class ServiceOptions : IMessage<ServiceOptions>, IMessage, IEquatable<ServiceOptions>, IDeepCloneable<ServiceOptions>
|
||||
{
|
||||
// Token: 0x17000146 RID: 326
|
||||
// (get) Token: 0x060004FF RID: 1279 RVA: 0x000126F0 File Offset: 0x000108F0
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<ServiceOptions> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return ServiceOptions._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000147 RID: 327
|
||||
// (get) Token: 0x06000500 RID: 1280 RVA: 0x000126F7 File Offset: 0x000108F7
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorReflection.Descriptor.MessageTypes[15];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000148 RID: 328
|
||||
// (get) Token: 0x06000501 RID: 1281 RVA: 0x0001270A File Offset: 0x0001090A
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return ServiceOptions.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000502 RID: 1282 RVA: 0x00012711 File Offset: 0x00010911
|
||||
[DebuggerNonUserCode]
|
||||
public ServiceOptions()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000503 RID: 1283 RVA: 0x00012724 File Offset: 0x00010924
|
||||
[DebuggerNonUserCode]
|
||||
public ServiceOptions(ServiceOptions other)
|
||||
: this()
|
||||
{
|
||||
this.deprecated_ = other.deprecated_;
|
||||
this.uninterpretedOption_ = other.uninterpretedOption_.Clone();
|
||||
}
|
||||
|
||||
// Token: 0x06000504 RID: 1284 RVA: 0x00012749 File Offset: 0x00010949
|
||||
[DebuggerNonUserCode]
|
||||
public ServiceOptions Clone()
|
||||
{
|
||||
return new ServiceOptions(this);
|
||||
}
|
||||
|
||||
// Token: 0x17000149 RID: 329
|
||||
// (get) Token: 0x06000505 RID: 1285 RVA: 0x00012751 File Offset: 0x00010951
|
||||
// (set) Token: 0x06000506 RID: 1286 RVA: 0x00012759 File Offset: 0x00010959
|
||||
[DebuggerNonUserCode]
|
||||
public bool Deprecated
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.deprecated_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.deprecated_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700014A RID: 330
|
||||
// (get) Token: 0x06000507 RID: 1287 RVA: 0x00012762 File Offset: 0x00010962
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<UninterpretedOption> UninterpretedOption
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.uninterpretedOption_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000508 RID: 1288 RVA: 0x0001276A File Offset: 0x0001096A
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as ServiceOptions);
|
||||
}
|
||||
|
||||
// Token: 0x06000509 RID: 1289 RVA: 0x00012778 File Offset: 0x00010978
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(ServiceOptions other)
|
||||
{
|
||||
return other != null && (other == this || (this.Deprecated == other.Deprecated && this.uninterpretedOption_.Equals(other.uninterpretedOption_)));
|
||||
}
|
||||
|
||||
// Token: 0x0600050A RID: 1290 RVA: 0x000127AC File Offset: 0x000109AC
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Deprecated)
|
||||
{
|
||||
num ^= this.Deprecated.GetHashCode();
|
||||
}
|
||||
return num ^ this.uninterpretedOption_.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x0600050B RID: 1291 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x0600050C RID: 1292 RVA: 0x000127E3 File Offset: 0x000109E3
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Deprecated)
|
||||
{
|
||||
output.WriteRawTag(136, 2);
|
||||
output.WriteBool(this.Deprecated);
|
||||
}
|
||||
this.uninterpretedOption_.WriteTo(output, ServiceOptions._repeated_uninterpretedOption_codec);
|
||||
}
|
||||
|
||||
// Token: 0x0600050D RID: 1293 RVA: 0x00012818 File Offset: 0x00010A18
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Deprecated)
|
||||
{
|
||||
num += 3;
|
||||
}
|
||||
return num + this.uninterpretedOption_.CalculateSize(ServiceOptions._repeated_uninterpretedOption_codec);
|
||||
}
|
||||
|
||||
// Token: 0x0600050E RID: 1294 RVA: 0x00012847 File Offset: 0x00010A47
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(ServiceOptions other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Deprecated)
|
||||
{
|
||||
this.Deprecated = other.Deprecated;
|
||||
}
|
||||
this.uninterpretedOption_.Add(other.uninterpretedOption_);
|
||||
}
|
||||
|
||||
// Token: 0x0600050F RID: 1295 RVA: 0x00012874 File Offset: 0x00010A74
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 264U)
|
||||
{
|
||||
if (num != 7994U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.uninterpretedOption_.AddEntriesFrom(input, ServiceOptions._repeated_uninterpretedOption_codec);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Deprecated = input.ReadBool();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040001E2 RID: 482
|
||||
private static readonly MessageParser<ServiceOptions> _parser = new MessageParser<ServiceOptions>(() => new ServiceOptions());
|
||||
|
||||
// Token: 0x040001E3 RID: 483
|
||||
public const int DeprecatedFieldNumber = 33;
|
||||
|
||||
// Token: 0x040001E4 RID: 484
|
||||
private bool deprecated_;
|
||||
|
||||
// Token: 0x040001E5 RID: 485
|
||||
public const int UninterpretedOptionFieldNumber = 999;
|
||||
|
||||
// Token: 0x040001E6 RID: 486
|
||||
private static readonly FieldCodec<UninterpretedOption> _repeated_uninterpretedOption_codec = FieldCodec.ForMessage<UninterpretedOption>(7994U, Google.Protobuf.Reflection.UninterpretedOption.Parser);
|
||||
|
||||
// Token: 0x040001E7 RID: 487
|
||||
private readonly RepeatedField<UninterpretedOption> uninterpretedOption_ = new RepeatedField<UninterpretedOption>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x0200006C RID: 108
|
||||
internal sealed class SingleFieldAccessor : FieldAccessorBase
|
||||
{
|
||||
// Token: 0x060005FE RID: 1534 RVA: 0x00014FD4 File Offset: 0x000131D4
|
||||
internal SingleFieldAccessor(PropertyInfo property, FieldDescriptor descriptor)
|
||||
: base(property, descriptor)
|
||||
{
|
||||
if (!property.CanWrite)
|
||||
{
|
||||
throw new ArgumentException("Not all required properties/methods available");
|
||||
}
|
||||
this.setValueDelegate = ReflectionUtil.CreateActionIMessageObject(property.GetSetMethod());
|
||||
Type propertyType = property.PropertyType;
|
||||
object defaultValue = ((descriptor.FieldType == FieldType.Message) ? null : ((propertyType == typeof(string)) ? "" : ((propertyType == typeof(ByteString)) ? ByteString.Empty : Activator.CreateInstance(propertyType))));
|
||||
this.clearDelegate = delegate(IMessage message)
|
||||
{
|
||||
this.SetValue(message, defaultValue);
|
||||
};
|
||||
}
|
||||
|
||||
// Token: 0x060005FF RID: 1535 RVA: 0x00015074 File Offset: 0x00013274
|
||||
public override void Clear(IMessage message)
|
||||
{
|
||||
this.clearDelegate(message);
|
||||
}
|
||||
|
||||
// Token: 0x06000600 RID: 1536 RVA: 0x00015082 File Offset: 0x00013282
|
||||
public override void SetValue(IMessage message, object value)
|
||||
{
|
||||
this.setValueDelegate(message, value);
|
||||
}
|
||||
|
||||
// Token: 0x04000262 RID: 610
|
||||
private readonly Action<IMessage, object> setValueDelegate;
|
||||
|
||||
// Token: 0x04000263 RID: 611
|
||||
private readonly Action<IMessage> clearDelegate;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,480 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Collections;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000053 RID: 83
|
||||
internal sealed class SourceCodeInfo : IMessage<SourceCodeInfo>, IMessage, IEquatable<SourceCodeInfo>, IDeepCloneable<SourceCodeInfo>
|
||||
{
|
||||
// Token: 0x1700015A RID: 346
|
||||
// (get) Token: 0x0600053F RID: 1343 RVA: 0x00013102 File Offset: 0x00011302
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<SourceCodeInfo> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return SourceCodeInfo._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700015B RID: 347
|
||||
// (get) Token: 0x06000540 RID: 1344 RVA: 0x00013109 File Offset: 0x00011309
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorReflection.Descriptor.MessageTypes[18];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700015C RID: 348
|
||||
// (get) Token: 0x06000541 RID: 1345 RVA: 0x0001311C File Offset: 0x0001131C
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return SourceCodeInfo.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000542 RID: 1346 RVA: 0x00013123 File Offset: 0x00011323
|
||||
[DebuggerNonUserCode]
|
||||
public SourceCodeInfo()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000543 RID: 1347 RVA: 0x00013136 File Offset: 0x00011336
|
||||
[DebuggerNonUserCode]
|
||||
public SourceCodeInfo(SourceCodeInfo other)
|
||||
: this()
|
||||
{
|
||||
this.location_ = other.location_.Clone();
|
||||
}
|
||||
|
||||
// Token: 0x06000544 RID: 1348 RVA: 0x0001314F File Offset: 0x0001134F
|
||||
[DebuggerNonUserCode]
|
||||
public SourceCodeInfo Clone()
|
||||
{
|
||||
return new SourceCodeInfo(this);
|
||||
}
|
||||
|
||||
// Token: 0x1700015D RID: 349
|
||||
// (get) Token: 0x06000545 RID: 1349 RVA: 0x00013157 File Offset: 0x00011357
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<SourceCodeInfo.Types.Location> Location
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.location_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000546 RID: 1350 RVA: 0x0001315F File Offset: 0x0001135F
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as SourceCodeInfo);
|
||||
}
|
||||
|
||||
// Token: 0x06000547 RID: 1351 RVA: 0x0001316D File Offset: 0x0001136D
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(SourceCodeInfo other)
|
||||
{
|
||||
return other != null && (other == this || this.location_.Equals(other.location_));
|
||||
}
|
||||
|
||||
// Token: 0x06000548 RID: 1352 RVA: 0x00013190 File Offset: 0x00011390
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return 1 ^ this.location_.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x06000549 RID: 1353 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x0600054A RID: 1354 RVA: 0x0001319F File Offset: 0x0001139F
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
this.location_.WriteTo(output, SourceCodeInfo._repeated_location_codec);
|
||||
}
|
||||
|
||||
// Token: 0x0600054B RID: 1355 RVA: 0x000131B2 File Offset: 0x000113B2
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
return 0 + this.location_.CalculateSize(SourceCodeInfo._repeated_location_codec);
|
||||
}
|
||||
|
||||
// Token: 0x0600054C RID: 1356 RVA: 0x000131C6 File Offset: 0x000113C6
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(SourceCodeInfo other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.location_.Add(other.location_);
|
||||
}
|
||||
|
||||
// Token: 0x0600054D RID: 1357 RVA: 0x000131E0 File Offset: 0x000113E0
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 10U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.location_.AddEntriesFrom(input, SourceCodeInfo._repeated_location_codec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040001FE RID: 510
|
||||
private static readonly MessageParser<SourceCodeInfo> _parser = new MessageParser<SourceCodeInfo>(() => new SourceCodeInfo());
|
||||
|
||||
// Token: 0x040001FF RID: 511
|
||||
public const int LocationFieldNumber = 1;
|
||||
|
||||
// Token: 0x04000200 RID: 512
|
||||
private static readonly FieldCodec<SourceCodeInfo.Types.Location> _repeated_location_codec = FieldCodec.ForMessage<SourceCodeInfo.Types.Location>(10U, SourceCodeInfo.Types.Location.Parser);
|
||||
|
||||
// Token: 0x04000201 RID: 513
|
||||
private readonly RepeatedField<SourceCodeInfo.Types.Location> location_ = new RepeatedField<SourceCodeInfo.Types.Location>();
|
||||
|
||||
// Token: 0x020000B9 RID: 185
|
||||
[DebuggerNonUserCode]
|
||||
public static class Types
|
||||
{
|
||||
// Token: 0x020000DD RID: 221
|
||||
internal sealed class Location : IMessage<SourceCodeInfo.Types.Location>, IMessage, IEquatable<SourceCodeInfo.Types.Location>, IDeepCloneable<SourceCodeInfo.Types.Location>
|
||||
{
|
||||
// Token: 0x170001EE RID: 494
|
||||
// (get) Token: 0x060007EC RID: 2028 RVA: 0x00018361 File Offset: 0x00016561
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<SourceCodeInfo.Types.Location> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return SourceCodeInfo.Types.Location._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001EF RID: 495
|
||||
// (get) Token: 0x060007ED RID: 2029 RVA: 0x00018368 File Offset: 0x00016568
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return SourceCodeInfo.Descriptor.NestedTypes[0];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001F0 RID: 496
|
||||
// (get) Token: 0x060007EE RID: 2030 RVA: 0x0001837A File Offset: 0x0001657A
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return SourceCodeInfo.Types.Location.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060007EF RID: 2031 RVA: 0x00018381 File Offset: 0x00016581
|
||||
[DebuggerNonUserCode]
|
||||
public Location()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060007F0 RID: 2032 RVA: 0x000183C0 File Offset: 0x000165C0
|
||||
[DebuggerNonUserCode]
|
||||
public Location(SourceCodeInfo.Types.Location other)
|
||||
: this()
|
||||
{
|
||||
this.path_ = other.path_.Clone();
|
||||
this.span_ = other.span_.Clone();
|
||||
this.leadingComments_ = other.leadingComments_;
|
||||
this.trailingComments_ = other.trailingComments_;
|
||||
this.leadingDetachedComments_ = other.leadingDetachedComments_.Clone();
|
||||
}
|
||||
|
||||
// Token: 0x060007F1 RID: 2033 RVA: 0x0001841E File Offset: 0x0001661E
|
||||
[DebuggerNonUserCode]
|
||||
public SourceCodeInfo.Types.Location Clone()
|
||||
{
|
||||
return new SourceCodeInfo.Types.Location(this);
|
||||
}
|
||||
|
||||
// Token: 0x170001F1 RID: 497
|
||||
// (get) Token: 0x060007F2 RID: 2034 RVA: 0x00018426 File Offset: 0x00016626
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<int> Path
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.path_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001F2 RID: 498
|
||||
// (get) Token: 0x060007F3 RID: 2035 RVA: 0x0001842E File Offset: 0x0001662E
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<int> Span
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.span_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001F3 RID: 499
|
||||
// (get) Token: 0x060007F4 RID: 2036 RVA: 0x00018436 File Offset: 0x00016636
|
||||
// (set) Token: 0x060007F5 RID: 2037 RVA: 0x0001843E File Offset: 0x0001663E
|
||||
[DebuggerNonUserCode]
|
||||
public string LeadingComments
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.leadingComments_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.leadingComments_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001F4 RID: 500
|
||||
// (get) Token: 0x060007F6 RID: 2038 RVA: 0x00018451 File Offset: 0x00016651
|
||||
// (set) Token: 0x060007F7 RID: 2039 RVA: 0x00018459 File Offset: 0x00016659
|
||||
[DebuggerNonUserCode]
|
||||
public string TrailingComments
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.trailingComments_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.trailingComments_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001F5 RID: 501
|
||||
// (get) Token: 0x060007F8 RID: 2040 RVA: 0x0001846C File Offset: 0x0001666C
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<string> LeadingDetachedComments
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.leadingDetachedComments_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060007F9 RID: 2041 RVA: 0x00018474 File Offset: 0x00016674
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as SourceCodeInfo.Types.Location);
|
||||
}
|
||||
|
||||
// Token: 0x060007FA RID: 2042 RVA: 0x00018484 File Offset: 0x00016684
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(SourceCodeInfo.Types.Location other)
|
||||
{
|
||||
return other != null && (other == this || (this.path_.Equals(other.path_) && this.span_.Equals(other.span_) && !(this.LeadingComments != other.LeadingComments) && !(this.TrailingComments != other.TrailingComments) && this.leadingDetachedComments_.Equals(other.leadingDetachedComments_)));
|
||||
}
|
||||
|
||||
// Token: 0x060007FB RID: 2043 RVA: 0x00018508 File Offset: 0x00016708
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
num ^= this.path_.GetHashCode();
|
||||
num ^= this.span_.GetHashCode();
|
||||
if (this.LeadingComments.Length != 0)
|
||||
{
|
||||
num ^= this.LeadingComments.GetHashCode();
|
||||
}
|
||||
if (this.TrailingComments.Length != 0)
|
||||
{
|
||||
num ^= this.TrailingComments.GetHashCode();
|
||||
}
|
||||
return num ^ this.leadingDetachedComments_.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x060007FC RID: 2044 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x060007FD RID: 2045 RVA: 0x00018578 File Offset: 0x00016778
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
this.path_.WriteTo(output, SourceCodeInfo.Types.Location._repeated_path_codec);
|
||||
this.span_.WriteTo(output, SourceCodeInfo.Types.Location._repeated_span_codec);
|
||||
if (this.LeadingComments.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(26);
|
||||
output.WriteString(this.LeadingComments);
|
||||
}
|
||||
if (this.TrailingComments.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(34);
|
||||
output.WriteString(this.TrailingComments);
|
||||
}
|
||||
this.leadingDetachedComments_.WriteTo(output, SourceCodeInfo.Types.Location._repeated_leadingDetachedComments_codec);
|
||||
}
|
||||
|
||||
// Token: 0x060007FE RID: 2046 RVA: 0x000185FC File Offset: 0x000167FC
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
num += this.path_.CalculateSize(SourceCodeInfo.Types.Location._repeated_path_codec);
|
||||
num += this.span_.CalculateSize(SourceCodeInfo.Types.Location._repeated_span_codec);
|
||||
if (this.LeadingComments.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.LeadingComments);
|
||||
}
|
||||
if (this.TrailingComments.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.TrailingComments);
|
||||
}
|
||||
return num + this.leadingDetachedComments_.CalculateSize(SourceCodeInfo.Types.Location._repeated_leadingDetachedComments_codec);
|
||||
}
|
||||
|
||||
// Token: 0x060007FF RID: 2047 RVA: 0x00018680 File Offset: 0x00016880
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(SourceCodeInfo.Types.Location other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.path_.Add(other.path_);
|
||||
this.span_.Add(other.span_);
|
||||
if (other.LeadingComments.Length != 0)
|
||||
{
|
||||
this.LeadingComments = other.LeadingComments;
|
||||
}
|
||||
if (other.TrailingComments.Length != 0)
|
||||
{
|
||||
this.TrailingComments = other.TrailingComments;
|
||||
}
|
||||
this.leadingDetachedComments_.Add(other.leadingDetachedComments_);
|
||||
}
|
||||
|
||||
// Token: 0x06000800 RID: 2048 RVA: 0x000186F8 File Offset: 0x000168F8
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num <= 16U)
|
||||
{
|
||||
if (num == 8U || num == 10U)
|
||||
{
|
||||
this.path_.AddEntriesFrom(input, SourceCodeInfo.Types.Location._repeated_path_codec);
|
||||
continue;
|
||||
}
|
||||
if (num == 16U)
|
||||
{
|
||||
goto IL_50;
|
||||
}
|
||||
}
|
||||
else if (num <= 26U)
|
||||
{
|
||||
if (num == 18U)
|
||||
{
|
||||
goto IL_50;
|
||||
}
|
||||
if (num == 26U)
|
||||
{
|
||||
this.LeadingComments = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num == 34U)
|
||||
{
|
||||
this.TrailingComments = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
if (num == 50U)
|
||||
{
|
||||
this.leadingDetachedComments_.AddEntriesFrom(input, SourceCodeInfo.Types.Location._repeated_leadingDetachedComments_codec);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
input.SkipLastField();
|
||||
continue;
|
||||
IL_50:
|
||||
this.span_.AddEntriesFrom(input, SourceCodeInfo.Types.Location._repeated_span_codec);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000376 RID: 886
|
||||
private static readonly MessageParser<SourceCodeInfo.Types.Location> _parser = new MessageParser<SourceCodeInfo.Types.Location>(() => new SourceCodeInfo.Types.Location());
|
||||
|
||||
// Token: 0x04000377 RID: 887
|
||||
public const int PathFieldNumber = 1;
|
||||
|
||||
// Token: 0x04000378 RID: 888
|
||||
private static readonly FieldCodec<int> _repeated_path_codec = FieldCodec.ForInt32(10U);
|
||||
|
||||
// Token: 0x04000379 RID: 889
|
||||
private readonly RepeatedField<int> path_ = new RepeatedField<int>();
|
||||
|
||||
// Token: 0x0400037A RID: 890
|
||||
public const int SpanFieldNumber = 2;
|
||||
|
||||
// Token: 0x0400037B RID: 891
|
||||
private static readonly FieldCodec<int> _repeated_span_codec = FieldCodec.ForInt32(18U);
|
||||
|
||||
// Token: 0x0400037C RID: 892
|
||||
private readonly RepeatedField<int> span_ = new RepeatedField<int>();
|
||||
|
||||
// Token: 0x0400037D RID: 893
|
||||
public const int LeadingCommentsFieldNumber = 3;
|
||||
|
||||
// Token: 0x0400037E RID: 894
|
||||
private string leadingComments_ = "";
|
||||
|
||||
// Token: 0x0400037F RID: 895
|
||||
public const int TrailingCommentsFieldNumber = 4;
|
||||
|
||||
// Token: 0x04000380 RID: 896
|
||||
private string trailingComments_ = "";
|
||||
|
||||
// Token: 0x04000381 RID: 897
|
||||
public const int LeadingDetachedCommentsFieldNumber = 6;
|
||||
|
||||
// Token: 0x04000382 RID: 898
|
||||
private static readonly FieldCodec<string> _repeated_leadingDetachedComments_codec = FieldCodec.ForString(50U);
|
||||
|
||||
// Token: 0x04000383 RID: 899
|
||||
private readonly RepeatedField<string> leadingDetachedComments_ = new RepeatedField<string>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x0200006D RID: 109
|
||||
public sealed class TypeRegistry
|
||||
{
|
||||
// Token: 0x170001B4 RID: 436
|
||||
// (get) Token: 0x06000601 RID: 1537 RVA: 0x00015091 File Offset: 0x00013291
|
||||
public static TypeRegistry Empty { get; } = new TypeRegistry(new Dictionary<string, MessageDescriptor>());
|
||||
|
||||
// Token: 0x06000602 RID: 1538 RVA: 0x00015098 File Offset: 0x00013298
|
||||
private TypeRegistry(Dictionary<string, MessageDescriptor> fullNameToMessageMap)
|
||||
{
|
||||
this.fullNameToMessageMap = fullNameToMessageMap;
|
||||
}
|
||||
|
||||
// Token: 0x06000603 RID: 1539 RVA: 0x000150A8 File Offset: 0x000132A8
|
||||
public MessageDescriptor Find(string fullName)
|
||||
{
|
||||
MessageDescriptor messageDescriptor;
|
||||
this.fullNameToMessageMap.TryGetValue(fullName, out messageDescriptor);
|
||||
return messageDescriptor;
|
||||
}
|
||||
|
||||
// Token: 0x06000604 RID: 1540 RVA: 0x000150C5 File Offset: 0x000132C5
|
||||
public static TypeRegistry FromFiles(params FileDescriptor[] fileDescriptors)
|
||||
{
|
||||
return TypeRegistry.FromFiles(fileDescriptors);
|
||||
}
|
||||
|
||||
// Token: 0x06000605 RID: 1541 RVA: 0x000150D0 File Offset: 0x000132D0
|
||||
public static TypeRegistry FromFiles(IEnumerable<FileDescriptor> fileDescriptors)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<IEnumerable<FileDescriptor>>(fileDescriptors, "fileDescriptors");
|
||||
TypeRegistry.Builder builder = new TypeRegistry.Builder();
|
||||
foreach (FileDescriptor fileDescriptor in fileDescriptors)
|
||||
{
|
||||
builder.AddFile(fileDescriptor);
|
||||
}
|
||||
return builder.Build();
|
||||
}
|
||||
|
||||
// Token: 0x06000606 RID: 1542 RVA: 0x00015130 File Offset: 0x00013330
|
||||
public static TypeRegistry FromMessages(params MessageDescriptor[] messageDescriptors)
|
||||
{
|
||||
return TypeRegistry.FromMessages(messageDescriptors);
|
||||
}
|
||||
|
||||
// Token: 0x06000607 RID: 1543 RVA: 0x00015138 File Offset: 0x00013338
|
||||
public static TypeRegistry FromMessages(IEnumerable<MessageDescriptor> messageDescriptors)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<IEnumerable<MessageDescriptor>>(messageDescriptors, "messageDescriptors");
|
||||
return TypeRegistry.FromFiles(messageDescriptors.Select((MessageDescriptor md) => md.File));
|
||||
}
|
||||
|
||||
// Token: 0x04000265 RID: 613
|
||||
private readonly Dictionary<string, MessageDescriptor> fullNameToMessageMap;
|
||||
|
||||
// Token: 0x020000C6 RID: 198
|
||||
private class Builder
|
||||
{
|
||||
// Token: 0x06000780 RID: 1920 RVA: 0x00017801 File Offset: 0x00015A01
|
||||
internal Builder()
|
||||
{
|
||||
this.types = new Dictionary<string, MessageDescriptor>();
|
||||
this.fileDescriptorNames = new HashSet<string>();
|
||||
}
|
||||
|
||||
// Token: 0x06000781 RID: 1921 RVA: 0x00017820 File Offset: 0x00015A20
|
||||
internal void AddFile(FileDescriptor fileDescriptor)
|
||||
{
|
||||
if (!this.fileDescriptorNames.Add(fileDescriptor.Name))
|
||||
{
|
||||
return;
|
||||
}
|
||||
foreach (FileDescriptor fileDescriptor2 in fileDescriptor.Dependencies)
|
||||
{
|
||||
this.AddFile(fileDescriptor2);
|
||||
}
|
||||
foreach (MessageDescriptor messageDescriptor in fileDescriptor.MessageTypes)
|
||||
{
|
||||
this.AddMessage(messageDescriptor);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000782 RID: 1922 RVA: 0x000178C0 File Offset: 0x00015AC0
|
||||
private void AddMessage(MessageDescriptor messageDescriptor)
|
||||
{
|
||||
foreach (MessageDescriptor messageDescriptor2 in messageDescriptor.NestedTypes)
|
||||
{
|
||||
this.AddMessage(messageDescriptor2);
|
||||
}
|
||||
this.types[messageDescriptor.FullName] = messageDescriptor;
|
||||
}
|
||||
|
||||
// Token: 0x06000783 RID: 1923 RVA: 0x00017920 File Offset: 0x00015B20
|
||||
internal TypeRegistry Build()
|
||||
{
|
||||
return new TypeRegistry(this.types);
|
||||
}
|
||||
|
||||
// Token: 0x04000301 RID: 769
|
||||
private readonly Dictionary<string, MessageDescriptor> types;
|
||||
|
||||
// Token: 0x04000302 RID: 770
|
||||
private readonly HashSet<string> fileDescriptorNames;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,662 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Collections;
|
||||
|
||||
namespace Google.Protobuf.Reflection
|
||||
{
|
||||
// Token: 0x02000052 RID: 82
|
||||
internal sealed class UninterpretedOption : IMessage<UninterpretedOption>, IMessage, IEquatable<UninterpretedOption>, IDeepCloneable<UninterpretedOption>
|
||||
{
|
||||
// Token: 0x17000150 RID: 336
|
||||
// (get) Token: 0x06000523 RID: 1315 RVA: 0x00012AF8 File Offset: 0x00010CF8
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<UninterpretedOption> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return UninterpretedOption._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000151 RID: 337
|
||||
// (get) Token: 0x06000524 RID: 1316 RVA: 0x00012AFF File Offset: 0x00010CFF
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DescriptorReflection.Descriptor.MessageTypes[17];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000152 RID: 338
|
||||
// (get) Token: 0x06000525 RID: 1317 RVA: 0x00012B12 File Offset: 0x00010D12
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return UninterpretedOption.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000526 RID: 1318 RVA: 0x00012B19 File Offset: 0x00010D19
|
||||
[DebuggerNonUserCode]
|
||||
public UninterpretedOption()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000527 RID: 1319 RVA: 0x00012B50 File Offset: 0x00010D50
|
||||
[DebuggerNonUserCode]
|
||||
public UninterpretedOption(UninterpretedOption other)
|
||||
: this()
|
||||
{
|
||||
this.name_ = other.name_.Clone();
|
||||
this.identifierValue_ = other.identifierValue_;
|
||||
this.positiveIntValue_ = other.positiveIntValue_;
|
||||
this.negativeIntValue_ = other.negativeIntValue_;
|
||||
this.doubleValue_ = other.doubleValue_;
|
||||
this.stringValue_ = other.stringValue_;
|
||||
this.aggregateValue_ = other.aggregateValue_;
|
||||
}
|
||||
|
||||
// Token: 0x06000528 RID: 1320 RVA: 0x00012BBC File Offset: 0x00010DBC
|
||||
[DebuggerNonUserCode]
|
||||
public UninterpretedOption Clone()
|
||||
{
|
||||
return new UninterpretedOption(this);
|
||||
}
|
||||
|
||||
// Token: 0x17000153 RID: 339
|
||||
// (get) Token: 0x06000529 RID: 1321 RVA: 0x00012BC4 File Offset: 0x00010DC4
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<UninterpretedOption.Types.NamePart> Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000154 RID: 340
|
||||
// (get) Token: 0x0600052A RID: 1322 RVA: 0x00012BCC File Offset: 0x00010DCC
|
||||
// (set) Token: 0x0600052B RID: 1323 RVA: 0x00012BD4 File Offset: 0x00010DD4
|
||||
[DebuggerNonUserCode]
|
||||
public string IdentifierValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.identifierValue_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.identifierValue_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000155 RID: 341
|
||||
// (get) Token: 0x0600052C RID: 1324 RVA: 0x00012BE7 File Offset: 0x00010DE7
|
||||
// (set) Token: 0x0600052D RID: 1325 RVA: 0x00012BEF File Offset: 0x00010DEF
|
||||
[DebuggerNonUserCode]
|
||||
public ulong PositiveIntValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.positiveIntValue_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.positiveIntValue_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000156 RID: 342
|
||||
// (get) Token: 0x0600052E RID: 1326 RVA: 0x00012BF8 File Offset: 0x00010DF8
|
||||
// (set) Token: 0x0600052F RID: 1327 RVA: 0x00012C00 File Offset: 0x00010E00
|
||||
[DebuggerNonUserCode]
|
||||
public long NegativeIntValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.negativeIntValue_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.negativeIntValue_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000157 RID: 343
|
||||
// (get) Token: 0x06000530 RID: 1328 RVA: 0x00012C09 File Offset: 0x00010E09
|
||||
// (set) Token: 0x06000531 RID: 1329 RVA: 0x00012C11 File Offset: 0x00010E11
|
||||
[DebuggerNonUserCode]
|
||||
public double DoubleValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.doubleValue_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.doubleValue_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000158 RID: 344
|
||||
// (get) Token: 0x06000532 RID: 1330 RVA: 0x00012C1A File Offset: 0x00010E1A
|
||||
// (set) Token: 0x06000533 RID: 1331 RVA: 0x00012C22 File Offset: 0x00010E22
|
||||
[DebuggerNonUserCode]
|
||||
public ByteString StringValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.stringValue_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.stringValue_ = ProtoPreconditions.CheckNotNull<ByteString>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000159 RID: 345
|
||||
// (get) Token: 0x06000534 RID: 1332 RVA: 0x00012C35 File Offset: 0x00010E35
|
||||
// (set) Token: 0x06000535 RID: 1333 RVA: 0x00012C3D File Offset: 0x00010E3D
|
||||
[DebuggerNonUserCode]
|
||||
public string AggregateValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.aggregateValue_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.aggregateValue_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000536 RID: 1334 RVA: 0x00012C50 File Offset: 0x00010E50
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as UninterpretedOption);
|
||||
}
|
||||
|
||||
// Token: 0x06000537 RID: 1335 RVA: 0x00012C60 File Offset: 0x00010E60
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(UninterpretedOption other)
|
||||
{
|
||||
return other != null && (other == this || (this.name_.Equals(other.name_) && !(this.IdentifierValue != other.IdentifierValue) && this.PositiveIntValue == other.PositiveIntValue && this.NegativeIntValue == other.NegativeIntValue && this.DoubleValue == other.DoubleValue && !(this.StringValue != other.StringValue) && !(this.AggregateValue != other.AggregateValue)));
|
||||
}
|
||||
|
||||
// Token: 0x06000538 RID: 1336 RVA: 0x00012D00 File Offset: 0x00010F00
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
num ^= this.name_.GetHashCode();
|
||||
if (this.IdentifierValue.Length != 0)
|
||||
{
|
||||
num ^= this.IdentifierValue.GetHashCode();
|
||||
}
|
||||
if (this.PositiveIntValue != 0UL)
|
||||
{
|
||||
num ^= this.PositiveIntValue.GetHashCode();
|
||||
}
|
||||
if (this.NegativeIntValue != 0L)
|
||||
{
|
||||
num ^= this.NegativeIntValue.GetHashCode();
|
||||
}
|
||||
if (this.DoubleValue != 0.0)
|
||||
{
|
||||
num ^= this.DoubleValue.GetHashCode();
|
||||
}
|
||||
if (this.StringValue.Length != 0)
|
||||
{
|
||||
num ^= this.StringValue.GetHashCode();
|
||||
}
|
||||
if (this.AggregateValue.Length != 0)
|
||||
{
|
||||
num ^= this.AggregateValue.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000539 RID: 1337 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x0600053A RID: 1338 RVA: 0x00012DC4 File Offset: 0x00010FC4
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
this.name_.WriteTo(output, UninterpretedOption._repeated_name_codec);
|
||||
if (this.IdentifierValue.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(26);
|
||||
output.WriteString(this.IdentifierValue);
|
||||
}
|
||||
if (this.PositiveIntValue != 0UL)
|
||||
{
|
||||
output.WriteRawTag(32);
|
||||
output.WriteUInt64(this.PositiveIntValue);
|
||||
}
|
||||
if (this.NegativeIntValue != 0L)
|
||||
{
|
||||
output.WriteRawTag(40);
|
||||
output.WriteInt64(this.NegativeIntValue);
|
||||
}
|
||||
if (this.DoubleValue != 0.0)
|
||||
{
|
||||
output.WriteRawTag(49);
|
||||
output.WriteDouble(this.DoubleValue);
|
||||
}
|
||||
if (this.StringValue.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(58);
|
||||
output.WriteBytes(this.StringValue);
|
||||
}
|
||||
if (this.AggregateValue.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(66);
|
||||
output.WriteString(this.AggregateValue);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600053B RID: 1339 RVA: 0x00012EA4 File Offset: 0x000110A4
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
num += this.name_.CalculateSize(UninterpretedOption._repeated_name_codec);
|
||||
if (this.IdentifierValue.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.IdentifierValue);
|
||||
}
|
||||
if (this.PositiveIntValue != 0UL)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeUInt64Size(this.PositiveIntValue);
|
||||
}
|
||||
if (this.NegativeIntValue != 0L)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeInt64Size(this.NegativeIntValue);
|
||||
}
|
||||
if (this.DoubleValue != 0.0)
|
||||
{
|
||||
num += 9;
|
||||
}
|
||||
if (this.StringValue.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeBytesSize(this.StringValue);
|
||||
}
|
||||
if (this.AggregateValue.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.AggregateValue);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0600053C RID: 1340 RVA: 0x00012F64 File Offset: 0x00011164
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(UninterpretedOption other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.name_.Add(other.name_);
|
||||
if (other.IdentifierValue.Length != 0)
|
||||
{
|
||||
this.IdentifierValue = other.IdentifierValue;
|
||||
}
|
||||
if (other.PositiveIntValue != 0UL)
|
||||
{
|
||||
this.PositiveIntValue = other.PositiveIntValue;
|
||||
}
|
||||
if (other.NegativeIntValue != 0L)
|
||||
{
|
||||
this.NegativeIntValue = other.NegativeIntValue;
|
||||
}
|
||||
if (other.DoubleValue != 0.0)
|
||||
{
|
||||
this.DoubleValue = other.DoubleValue;
|
||||
}
|
||||
if (other.StringValue.Length != 0)
|
||||
{
|
||||
this.StringValue = other.StringValue;
|
||||
}
|
||||
if (other.AggregateValue.Length != 0)
|
||||
{
|
||||
this.AggregateValue = other.AggregateValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600053D RID: 1341 RVA: 0x00013018 File Offset: 0x00011218
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num <= 32U)
|
||||
{
|
||||
if (num == 18U)
|
||||
{
|
||||
this.name_.AddEntriesFrom(input, UninterpretedOption._repeated_name_codec);
|
||||
continue;
|
||||
}
|
||||
if (num == 26U)
|
||||
{
|
||||
this.IdentifierValue = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
if (num == 32U)
|
||||
{
|
||||
this.PositiveIntValue = input.ReadUInt64();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (num <= 49U)
|
||||
{
|
||||
if (num == 40U)
|
||||
{
|
||||
this.NegativeIntValue = input.ReadInt64();
|
||||
continue;
|
||||
}
|
||||
if (num == 49U)
|
||||
{
|
||||
this.DoubleValue = input.ReadDouble();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num == 58U)
|
||||
{
|
||||
this.StringValue = input.ReadBytes();
|
||||
continue;
|
||||
}
|
||||
if (num == 66U)
|
||||
{
|
||||
this.AggregateValue = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
input.SkipLastField();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040001EE RID: 494
|
||||
private static readonly MessageParser<UninterpretedOption> _parser = new MessageParser<UninterpretedOption>(() => new UninterpretedOption());
|
||||
|
||||
// Token: 0x040001EF RID: 495
|
||||
public const int NameFieldNumber = 2;
|
||||
|
||||
// Token: 0x040001F0 RID: 496
|
||||
private static readonly FieldCodec<UninterpretedOption.Types.NamePart> _repeated_name_codec = FieldCodec.ForMessage<UninterpretedOption.Types.NamePart>(18U, UninterpretedOption.Types.NamePart.Parser);
|
||||
|
||||
// Token: 0x040001F1 RID: 497
|
||||
private readonly RepeatedField<UninterpretedOption.Types.NamePart> name_ = new RepeatedField<UninterpretedOption.Types.NamePart>();
|
||||
|
||||
// Token: 0x040001F2 RID: 498
|
||||
public const int IdentifierValueFieldNumber = 3;
|
||||
|
||||
// Token: 0x040001F3 RID: 499
|
||||
private string identifierValue_ = "";
|
||||
|
||||
// Token: 0x040001F4 RID: 500
|
||||
public const int PositiveIntValueFieldNumber = 4;
|
||||
|
||||
// Token: 0x040001F5 RID: 501
|
||||
private ulong positiveIntValue_;
|
||||
|
||||
// Token: 0x040001F6 RID: 502
|
||||
public const int NegativeIntValueFieldNumber = 5;
|
||||
|
||||
// Token: 0x040001F7 RID: 503
|
||||
private long negativeIntValue_;
|
||||
|
||||
// Token: 0x040001F8 RID: 504
|
||||
public const int DoubleValueFieldNumber = 6;
|
||||
|
||||
// Token: 0x040001F9 RID: 505
|
||||
private double doubleValue_;
|
||||
|
||||
// Token: 0x040001FA RID: 506
|
||||
public const int StringValueFieldNumber = 7;
|
||||
|
||||
// Token: 0x040001FB RID: 507
|
||||
private ByteString stringValue_ = ByteString.Empty;
|
||||
|
||||
// Token: 0x040001FC RID: 508
|
||||
public const int AggregateValueFieldNumber = 8;
|
||||
|
||||
// Token: 0x040001FD RID: 509
|
||||
private string aggregateValue_ = "";
|
||||
|
||||
// Token: 0x020000B7 RID: 183
|
||||
[DebuggerNonUserCode]
|
||||
public static class Types
|
||||
{
|
||||
// Token: 0x020000DC RID: 220
|
||||
internal sealed class NamePart : IMessage<UninterpretedOption.Types.NamePart>, IMessage, IEquatable<UninterpretedOption.Types.NamePart>, IDeepCloneable<UninterpretedOption.Types.NamePart>
|
||||
{
|
||||
// Token: 0x170001E9 RID: 489
|
||||
// (get) Token: 0x060007D9 RID: 2009 RVA: 0x00018148 File Offset: 0x00016348
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<UninterpretedOption.Types.NamePart> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return UninterpretedOption.Types.NamePart._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001EA RID: 490
|
||||
// (get) Token: 0x060007DA RID: 2010 RVA: 0x0001814F File Offset: 0x0001634F
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return UninterpretedOption.Descriptor.NestedTypes[0];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001EB RID: 491
|
||||
// (get) Token: 0x060007DB RID: 2011 RVA: 0x00018161 File Offset: 0x00016361
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return UninterpretedOption.Types.NamePart.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060007DC RID: 2012 RVA: 0x00018168 File Offset: 0x00016368
|
||||
[DebuggerNonUserCode]
|
||||
public NamePart()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060007DD RID: 2013 RVA: 0x0001817B File Offset: 0x0001637B
|
||||
[DebuggerNonUserCode]
|
||||
public NamePart(UninterpretedOption.Types.NamePart other)
|
||||
: this()
|
||||
{
|
||||
this.namePart_ = other.namePart_;
|
||||
this.isExtension_ = other.isExtension_;
|
||||
}
|
||||
|
||||
// Token: 0x060007DE RID: 2014 RVA: 0x0001819B File Offset: 0x0001639B
|
||||
[DebuggerNonUserCode]
|
||||
public UninterpretedOption.Types.NamePart Clone()
|
||||
{
|
||||
return new UninterpretedOption.Types.NamePart(this);
|
||||
}
|
||||
|
||||
// Token: 0x170001EC RID: 492
|
||||
// (get) Token: 0x060007DF RID: 2015 RVA: 0x000181A3 File Offset: 0x000163A3
|
||||
// (set) Token: 0x060007E0 RID: 2016 RVA: 0x000181AB File Offset: 0x000163AB
|
||||
[DebuggerNonUserCode]
|
||||
public string NamePart_
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.namePart_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.namePart_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001ED RID: 493
|
||||
// (get) Token: 0x060007E1 RID: 2017 RVA: 0x000181BE File Offset: 0x000163BE
|
||||
// (set) Token: 0x060007E2 RID: 2018 RVA: 0x000181C6 File Offset: 0x000163C6
|
||||
[DebuggerNonUserCode]
|
||||
public bool IsExtension
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.isExtension_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.isExtension_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060007E3 RID: 2019 RVA: 0x000181CF File Offset: 0x000163CF
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as UninterpretedOption.Types.NamePart);
|
||||
}
|
||||
|
||||
// Token: 0x060007E4 RID: 2020 RVA: 0x000181DD File Offset: 0x000163DD
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(UninterpretedOption.Types.NamePart other)
|
||||
{
|
||||
return other != null && (other == this || (!(this.NamePart_ != other.NamePart_) && this.IsExtension == other.IsExtension));
|
||||
}
|
||||
|
||||
// Token: 0x060007E5 RID: 2021 RVA: 0x00018210 File Offset: 0x00016410
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.NamePart_.Length != 0)
|
||||
{
|
||||
num ^= this.NamePart_.GetHashCode();
|
||||
}
|
||||
if (this.IsExtension)
|
||||
{
|
||||
num ^= this.IsExtension.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x060007E6 RID: 2022 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x060007E7 RID: 2023 RVA: 0x00018254 File Offset: 0x00016454
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.NamePart_.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(this.NamePart_);
|
||||
}
|
||||
if (this.IsExtension)
|
||||
{
|
||||
output.WriteRawTag(16);
|
||||
output.WriteBool(this.IsExtension);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060007E8 RID: 2024 RVA: 0x00018294 File Offset: 0x00016494
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.NamePart_.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.NamePart_);
|
||||
}
|
||||
if (this.IsExtension)
|
||||
{
|
||||
num += 2;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x060007E9 RID: 2025 RVA: 0x000182CD File Offset: 0x000164CD
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(UninterpretedOption.Types.NamePart other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.NamePart_.Length != 0)
|
||||
{
|
||||
this.NamePart_ = other.NamePart_;
|
||||
}
|
||||
if (other.IsExtension)
|
||||
{
|
||||
this.IsExtension = other.IsExtension;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060007EA RID: 2026 RVA: 0x00018300 File Offset: 0x00016500
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 10U)
|
||||
{
|
||||
if (num != 16U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.IsExtension = input.ReadBool();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.NamePart_ = input.ReadString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000371 RID: 881
|
||||
private static readonly MessageParser<UninterpretedOption.Types.NamePart> _parser = new MessageParser<UninterpretedOption.Types.NamePart>(() => new UninterpretedOption.Types.NamePart());
|
||||
|
||||
// Token: 0x04000372 RID: 882
|
||||
public const int NamePart_FieldNumber = 1;
|
||||
|
||||
// Token: 0x04000373 RID: 883
|
||||
private string namePart_ = "";
|
||||
|
||||
// Token: 0x04000374 RID: 884
|
||||
public const int IsExtensionFieldNumber = 2;
|
||||
|
||||
// Token: 0x04000375 RID: 885
|
||||
private bool isExtension_;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,278 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x0200001A RID: 26
|
||||
public sealed class Any : IMessage<Any>, IMessage, IEquatable<Any>, IDeepCloneable<Any>
|
||||
{
|
||||
// Token: 0x1700002A RID: 42
|
||||
// (get) Token: 0x06000154 RID: 340 RVA: 0x00007AD9 File Offset: 0x00005CD9
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<Any> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return Any._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700002B RID: 43
|
||||
// (get) Token: 0x06000155 RID: 341 RVA: 0x00007AE0 File Offset: 0x00005CE0
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return AnyReflection.Descriptor.MessageTypes[0];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700002C RID: 44
|
||||
// (get) Token: 0x06000156 RID: 342 RVA: 0x00007AF2 File Offset: 0x00005CF2
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return Any.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000157 RID: 343 RVA: 0x00007AF9 File Offset: 0x00005CF9
|
||||
[DebuggerNonUserCode]
|
||||
public Any()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000158 RID: 344 RVA: 0x00007B17 File Offset: 0x00005D17
|
||||
[DebuggerNonUserCode]
|
||||
public Any(Any other)
|
||||
: this()
|
||||
{
|
||||
this.typeUrl_ = other.typeUrl_;
|
||||
this.value_ = other.value_;
|
||||
}
|
||||
|
||||
// Token: 0x06000159 RID: 345 RVA: 0x00007B37 File Offset: 0x00005D37
|
||||
[DebuggerNonUserCode]
|
||||
public Any Clone()
|
||||
{
|
||||
return new Any(this);
|
||||
}
|
||||
|
||||
// Token: 0x1700002D RID: 45
|
||||
// (get) Token: 0x0600015A RID: 346 RVA: 0x00007B3F File Offset: 0x00005D3F
|
||||
// (set) Token: 0x0600015B RID: 347 RVA: 0x00007B47 File Offset: 0x00005D47
|
||||
[DebuggerNonUserCode]
|
||||
public string TypeUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.typeUrl_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.typeUrl_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700002E RID: 46
|
||||
// (get) Token: 0x0600015C RID: 348 RVA: 0x00007B5A File Offset: 0x00005D5A
|
||||
// (set) Token: 0x0600015D RID: 349 RVA: 0x00007B62 File Offset: 0x00005D62
|
||||
[DebuggerNonUserCode]
|
||||
public ByteString Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.value_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.value_ = ProtoPreconditions.CheckNotNull<ByteString>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600015E RID: 350 RVA: 0x00007B75 File Offset: 0x00005D75
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as Any);
|
||||
}
|
||||
|
||||
// Token: 0x0600015F RID: 351 RVA: 0x00007B83 File Offset: 0x00005D83
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(Any other)
|
||||
{
|
||||
return other != null && (other == this || (!(this.TypeUrl != other.TypeUrl) && !(this.Value != other.Value)));
|
||||
}
|
||||
|
||||
// Token: 0x06000160 RID: 352 RVA: 0x00007BBC File Offset: 0x00005DBC
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.TypeUrl.Length != 0)
|
||||
{
|
||||
num ^= this.TypeUrl.GetHashCode();
|
||||
}
|
||||
if (this.Value.Length != 0)
|
||||
{
|
||||
num ^= this.Value.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000161 RID: 353 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x06000162 RID: 354 RVA: 0x00007C0C File Offset: 0x00005E0C
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.TypeUrl.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(this.TypeUrl);
|
||||
}
|
||||
if (this.Value.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(18);
|
||||
output.WriteBytes(this.Value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000163 RID: 355 RVA: 0x00007C5C File Offset: 0x00005E5C
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.TypeUrl.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.TypeUrl);
|
||||
}
|
||||
if (this.Value.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeBytesSize(this.Value);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000164 RID: 356 RVA: 0x00007CA6 File Offset: 0x00005EA6
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(Any other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.TypeUrl.Length != 0)
|
||||
{
|
||||
this.TypeUrl = other.TypeUrl;
|
||||
}
|
||||
if (other.Value.Length != 0)
|
||||
{
|
||||
this.Value = other.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000165 RID: 357 RVA: 0x00007CE0 File Offset: 0x00005EE0
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 10U)
|
||||
{
|
||||
if (num != 18U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Value = input.ReadBytes();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.TypeUrl = input.ReadString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000166 RID: 358 RVA: 0x00007D25 File Offset: 0x00005F25
|
||||
private static string GetTypeUrl(MessageDescriptor descriptor, string prefix)
|
||||
{
|
||||
if (!prefix.EndsWith("/"))
|
||||
{
|
||||
return prefix + "/" + descriptor.FullName;
|
||||
}
|
||||
return prefix + descriptor.FullName;
|
||||
}
|
||||
|
||||
// Token: 0x06000167 RID: 359 RVA: 0x00007D54 File Offset: 0x00005F54
|
||||
internal static string GetTypeName(string typeUrl)
|
||||
{
|
||||
int num = typeUrl.LastIndexOf('/');
|
||||
if (num != -1)
|
||||
{
|
||||
return typeUrl.Substring(num + 1);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
// Token: 0x06000168 RID: 360 RVA: 0x00007D80 File Offset: 0x00005F80
|
||||
public T Unpack<T>() where T : IMessage, new()
|
||||
{
|
||||
T t = new T();
|
||||
if (Any.GetTypeName(this.TypeUrl) != t.Descriptor.FullName)
|
||||
{
|
||||
throw new InvalidProtocolBufferException(string.Format("Full type name for {0} is {1}; Any message's type url is {2}", t.Descriptor.Name, t.Descriptor.FullName, this.TypeUrl));
|
||||
}
|
||||
t.MergeFrom(this.Value);
|
||||
return t;
|
||||
}
|
||||
|
||||
// Token: 0x06000169 RID: 361 RVA: 0x00007E03 File Offset: 0x00006003
|
||||
public static Any Pack(IMessage message)
|
||||
{
|
||||
return Any.Pack(message, "type.googleapis.com");
|
||||
}
|
||||
|
||||
// Token: 0x0600016A RID: 362 RVA: 0x00007E10 File Offset: 0x00006010
|
||||
public static Any Pack(IMessage message, string typeUrlPrefix)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<IMessage>(message, "message");
|
||||
ProtoPreconditions.CheckNotNull<string>(typeUrlPrefix, "typeUrlPrefix");
|
||||
return new Any
|
||||
{
|
||||
TypeUrl = Any.GetTypeUrl(message.Descriptor, typeUrlPrefix),
|
||||
Value = message.ToByteString()
|
||||
};
|
||||
}
|
||||
|
||||
// Token: 0x0400004F RID: 79
|
||||
private static readonly MessageParser<Any> _parser = new MessageParser<Any>(() => new Any());
|
||||
|
||||
// Token: 0x04000050 RID: 80
|
||||
public const int TypeUrlFieldNumber = 1;
|
||||
|
||||
// Token: 0x04000051 RID: 81
|
||||
private string typeUrl_ = "";
|
||||
|
||||
// Token: 0x04000052 RID: 82
|
||||
public const int ValueFieldNumber = 2;
|
||||
|
||||
// Token: 0x04000053 RID: 83
|
||||
private ByteString value_ = ByteString.Empty;
|
||||
|
||||
// Token: 0x04000054 RID: 84
|
||||
private const string DefaultPrefix = "type.googleapis.com";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x02000019 RID: 25
|
||||
public static class AnyReflection
|
||||
{
|
||||
// Token: 0x17000029 RID: 41
|
||||
// (get) Token: 0x06000152 RID: 338 RVA: 0x00007A40 File Offset: 0x00005C40
|
||||
public static FileDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return AnyReflection.descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400004E RID: 78
|
||||
private static FileDescriptor descriptor = FileDescriptor.FromGeneratedCode(Convert.FromBase64String(string.Concat(new string[] { "Chlnb29nbGUvcHJvdG9idWYvYW55LnByb3RvEg9nb29nbGUucHJvdG9idWYi", "JgoDQW55EhAKCHR5cGVfdXJsGAEgASgJEg0KBXZhbHVlGAIgASgMQm8KE2Nv", "bS5nb29nbGUucHJvdG9idWZCCEFueVByb3RvUAFaJWdpdGh1Yi5jb20vZ29s", "YW5nL3Byb3RvYnVmL3B0eXBlcy9hbnmiAgNHUEKqAh5Hb29nbGUuUHJvdG9i", "dWYuV2VsbEtub3duVHlwZXNiBnByb3RvMw==" })), new FileDescriptor[0], new GeneratedClrTypeInfo(null, new GeneratedClrTypeInfo[]
|
||||
{
|
||||
new GeneratedClrTypeInfo(typeof(Any), Any.Parser, new string[] { "TypeUrl", "Value" }, null, null, null)
|
||||
}));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,418 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Collections;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x0200001C RID: 28
|
||||
public sealed class Api : IMessage<Api>, IMessage, IEquatable<Api>, IDeepCloneable<Api>
|
||||
{
|
||||
// Token: 0x17000030 RID: 48
|
||||
// (get) Token: 0x0600016E RID: 366 RVA: 0x00008021 File Offset: 0x00006221
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<Api> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return Api._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000031 RID: 49
|
||||
// (get) Token: 0x0600016F RID: 367 RVA: 0x00008028 File Offset: 0x00006228
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return ApiReflection.Descriptor.MessageTypes[0];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000032 RID: 50
|
||||
// (get) Token: 0x06000170 RID: 368 RVA: 0x0000803A File Offset: 0x0000623A
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return Api.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000171 RID: 369 RVA: 0x00008041 File Offset: 0x00006241
|
||||
[DebuggerNonUserCode]
|
||||
public Api()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000172 RID: 370 RVA: 0x00008080 File Offset: 0x00006280
|
||||
[DebuggerNonUserCode]
|
||||
public Api(Api other)
|
||||
: this()
|
||||
{
|
||||
this.name_ = other.name_;
|
||||
this.methods_ = other.methods_.Clone();
|
||||
this.options_ = other.options_.Clone();
|
||||
this.version_ = other.version_;
|
||||
this.SourceContext = ((other.sourceContext_ != null) ? other.SourceContext.Clone() : null);
|
||||
this.mixins_ = other.mixins_.Clone();
|
||||
this.syntax_ = other.syntax_;
|
||||
}
|
||||
|
||||
// Token: 0x06000173 RID: 371 RVA: 0x00008106 File Offset: 0x00006306
|
||||
[DebuggerNonUserCode]
|
||||
public Api Clone()
|
||||
{
|
||||
return new Api(this);
|
||||
}
|
||||
|
||||
// Token: 0x17000033 RID: 51
|
||||
// (get) Token: 0x06000174 RID: 372 RVA: 0x0000810E File Offset: 0x0000630E
|
||||
// (set) Token: 0x06000175 RID: 373 RVA: 0x00008116 File Offset: 0x00006316
|
||||
[DebuggerNonUserCode]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.name_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000034 RID: 52
|
||||
// (get) Token: 0x06000176 RID: 374 RVA: 0x00008129 File Offset: 0x00006329
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<Method> Methods
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.methods_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000035 RID: 53
|
||||
// (get) Token: 0x06000177 RID: 375 RVA: 0x00008131 File Offset: 0x00006331
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<Option> Options
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.options_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000036 RID: 54
|
||||
// (get) Token: 0x06000178 RID: 376 RVA: 0x00008139 File Offset: 0x00006339
|
||||
// (set) Token: 0x06000179 RID: 377 RVA: 0x00008141 File Offset: 0x00006341
|
||||
[DebuggerNonUserCode]
|
||||
public string Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.version_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.version_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000037 RID: 55
|
||||
// (get) Token: 0x0600017A RID: 378 RVA: 0x00008154 File Offset: 0x00006354
|
||||
// (set) Token: 0x0600017B RID: 379 RVA: 0x0000815C File Offset: 0x0000635C
|
||||
[DebuggerNonUserCode]
|
||||
public SourceContext SourceContext
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.sourceContext_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.sourceContext_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000038 RID: 56
|
||||
// (get) Token: 0x0600017C RID: 380 RVA: 0x00008165 File Offset: 0x00006365
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<Mixin> Mixins
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.mixins_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000039 RID: 57
|
||||
// (get) Token: 0x0600017D RID: 381 RVA: 0x0000816D File Offset: 0x0000636D
|
||||
// (set) Token: 0x0600017E RID: 382 RVA: 0x00008175 File Offset: 0x00006375
|
||||
[DebuggerNonUserCode]
|
||||
public Syntax Syntax
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.syntax_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.syntax_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600017F RID: 383 RVA: 0x0000817E File Offset: 0x0000637E
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as Api);
|
||||
}
|
||||
|
||||
// Token: 0x06000180 RID: 384 RVA: 0x0000818C File Offset: 0x0000638C
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(Api other)
|
||||
{
|
||||
return other != null && (other == this || (!(this.Name != other.Name) && this.methods_.Equals(other.methods_) && this.options_.Equals(other.options_) && !(this.Version != other.Version) && object.Equals(this.SourceContext, other.SourceContext) && this.mixins_.Equals(other.mixins_) && this.Syntax == other.Syntax));
|
||||
}
|
||||
|
||||
// Token: 0x06000181 RID: 385 RVA: 0x00008234 File Offset: 0x00006434
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
num ^= this.Name.GetHashCode();
|
||||
}
|
||||
num ^= this.methods_.GetHashCode();
|
||||
num ^= this.options_.GetHashCode();
|
||||
if (this.Version.Length != 0)
|
||||
{
|
||||
num ^= this.Version.GetHashCode();
|
||||
}
|
||||
if (this.sourceContext_ != null)
|
||||
{
|
||||
num ^= this.SourceContext.GetHashCode();
|
||||
}
|
||||
num ^= this.mixins_.GetHashCode();
|
||||
if (this.Syntax != Syntax.Proto2)
|
||||
{
|
||||
num ^= this.Syntax.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000182 RID: 386 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x06000183 RID: 387 RVA: 0x000082DC File Offset: 0x000064DC
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(this.Name);
|
||||
}
|
||||
this.methods_.WriteTo(output, Api._repeated_methods_codec);
|
||||
this.options_.WriteTo(output, Api._repeated_options_codec);
|
||||
if (this.Version.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(34);
|
||||
output.WriteString(this.Version);
|
||||
}
|
||||
if (this.sourceContext_ != null)
|
||||
{
|
||||
output.WriteRawTag(42);
|
||||
output.WriteMessage(this.SourceContext);
|
||||
}
|
||||
this.mixins_.WriteTo(output, Api._repeated_mixins_codec);
|
||||
if (this.Syntax != Syntax.Proto2)
|
||||
{
|
||||
output.WriteRawTag(56);
|
||||
output.WriteEnum((int)this.Syntax);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000184 RID: 388 RVA: 0x00008398 File Offset: 0x00006598
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.Name);
|
||||
}
|
||||
num += this.methods_.CalculateSize(Api._repeated_methods_codec);
|
||||
num += this.options_.CalculateSize(Api._repeated_options_codec);
|
||||
if (this.Version.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.Version);
|
||||
}
|
||||
if (this.sourceContext_ != null)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeMessageSize(this.SourceContext);
|
||||
}
|
||||
num += this.mixins_.CalculateSize(Api._repeated_mixins_codec);
|
||||
if (this.Syntax != Syntax.Proto2)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Syntax);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000185 RID: 389 RVA: 0x0000844C File Offset: 0x0000664C
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(Api other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Name.Length != 0)
|
||||
{
|
||||
this.Name = other.Name;
|
||||
}
|
||||
this.methods_.Add(other.methods_);
|
||||
this.options_.Add(other.options_);
|
||||
if (other.Version.Length != 0)
|
||||
{
|
||||
this.Version = other.Version;
|
||||
}
|
||||
if (other.sourceContext_ != null)
|
||||
{
|
||||
if (this.sourceContext_ == null)
|
||||
{
|
||||
this.sourceContext_ = new SourceContext();
|
||||
}
|
||||
this.SourceContext.MergeFrom(other.SourceContext);
|
||||
}
|
||||
this.mixins_.Add(other.mixins_);
|
||||
if (other.Syntax != Syntax.Proto2)
|
||||
{
|
||||
this.Syntax = other.Syntax;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000186 RID: 390 RVA: 0x00008504 File Offset: 0x00006704
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num <= 26U)
|
||||
{
|
||||
if (num == 10U)
|
||||
{
|
||||
this.Name = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
if (num == 18U)
|
||||
{
|
||||
this.methods_.AddEntriesFrom(input, Api._repeated_methods_codec);
|
||||
continue;
|
||||
}
|
||||
if (num == 26U)
|
||||
{
|
||||
this.options_.AddEntriesFrom(input, Api._repeated_options_codec);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (num <= 42U)
|
||||
{
|
||||
if (num == 34U)
|
||||
{
|
||||
this.Version = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
if (num == 42U)
|
||||
{
|
||||
if (this.sourceContext_ == null)
|
||||
{
|
||||
this.sourceContext_ = new SourceContext();
|
||||
}
|
||||
input.ReadMessage(this.sourceContext_);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num == 50U)
|
||||
{
|
||||
this.mixins_.AddEntriesFrom(input, Api._repeated_mixins_codec);
|
||||
continue;
|
||||
}
|
||||
if (num == 56U)
|
||||
{
|
||||
this.syntax_ = (Syntax)input.ReadEnum();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
input.SkipLastField();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000056 RID: 86
|
||||
private static readonly MessageParser<Api> _parser = new MessageParser<Api>(() => new Api());
|
||||
|
||||
// Token: 0x04000057 RID: 87
|
||||
public const int NameFieldNumber = 1;
|
||||
|
||||
// Token: 0x04000058 RID: 88
|
||||
private string name_ = "";
|
||||
|
||||
// Token: 0x04000059 RID: 89
|
||||
public const int MethodsFieldNumber = 2;
|
||||
|
||||
// Token: 0x0400005A RID: 90
|
||||
private static readonly FieldCodec<Method> _repeated_methods_codec = FieldCodec.ForMessage<Method>(18U, Method.Parser);
|
||||
|
||||
// Token: 0x0400005B RID: 91
|
||||
private readonly RepeatedField<Method> methods_ = new RepeatedField<Method>();
|
||||
|
||||
// Token: 0x0400005C RID: 92
|
||||
public const int OptionsFieldNumber = 3;
|
||||
|
||||
// Token: 0x0400005D RID: 93
|
||||
private static readonly FieldCodec<Option> _repeated_options_codec = FieldCodec.ForMessage<Option>(26U, Option.Parser);
|
||||
|
||||
// Token: 0x0400005E RID: 94
|
||||
private readonly RepeatedField<Option> options_ = new RepeatedField<Option>();
|
||||
|
||||
// Token: 0x0400005F RID: 95
|
||||
public const int VersionFieldNumber = 4;
|
||||
|
||||
// Token: 0x04000060 RID: 96
|
||||
private string version_ = "";
|
||||
|
||||
// Token: 0x04000061 RID: 97
|
||||
public const int SourceContextFieldNumber = 5;
|
||||
|
||||
// Token: 0x04000062 RID: 98
|
||||
private SourceContext sourceContext_;
|
||||
|
||||
// Token: 0x04000063 RID: 99
|
||||
public const int MixinsFieldNumber = 6;
|
||||
|
||||
// Token: 0x04000064 RID: 100
|
||||
private static readonly FieldCodec<Mixin> _repeated_mixins_codec = FieldCodec.ForMessage<Mixin>(50U, Mixin.Parser);
|
||||
|
||||
// Token: 0x04000065 RID: 101
|
||||
private readonly RepeatedField<Mixin> mixins_ = new RepeatedField<Mixin>();
|
||||
|
||||
// Token: 0x04000066 RID: 102
|
||||
public const int SyntaxFieldNumber = 7;
|
||||
|
||||
// Token: 0x04000067 RID: 103
|
||||
private Syntax syntax_;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x0200001B RID: 27
|
||||
public static class ApiReflection
|
||||
{
|
||||
// Token: 0x1700002F RID: 47
|
||||
// (get) Token: 0x0600016C RID: 364 RVA: 0x00007E69 File Offset: 0x00006069
|
||||
public static FileDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return ApiReflection.descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000055 RID: 85
|
||||
private static FileDescriptor descriptor = FileDescriptor.FromGeneratedCode(Convert.FromBase64String(string.Concat(new string[]
|
||||
{
|
||||
"Chlnb29nbGUvcHJvdG9idWYvYXBpLnByb3RvEg9nb29nbGUucHJvdG9idWYa", "JGdvb2dsZS9wcm90b2J1Zi9zb3VyY2VfY29udGV4dC5wcm90bxoaZ29vZ2xl", "L3Byb3RvYnVmL3R5cGUucHJvdG8igQIKA0FwaRIMCgRuYW1lGAEgASgJEigK", "B21ldGhvZHMYAiADKAsyFy5nb29nbGUucHJvdG9idWYuTWV0aG9kEigKB29w", "dGlvbnMYAyADKAsyFy5nb29nbGUucHJvdG9idWYuT3B0aW9uEg8KB3ZlcnNp", "b24YBCABKAkSNgoOc291cmNlX2NvbnRleHQYBSABKAsyHi5nb29nbGUucHJv", "dG9idWYuU291cmNlQ29udGV4dBImCgZtaXhpbnMYBiADKAsyFi5nb29nbGUu", "cHJvdG9idWYuTWl4aW4SJwoGc3ludGF4GAcgASgOMhcuZ29vZ2xlLnByb3Rv", "YnVmLlN5bnRheCLVAQoGTWV0aG9kEgwKBG5hbWUYASABKAkSGAoQcmVxdWVz", "dF90eXBlX3VybBgCIAEoCRIZChFyZXF1ZXN0X3N0cmVhbWluZxgDIAEoCBIZ",
|
||||
"ChFyZXNwb25zZV90eXBlX3VybBgEIAEoCRIaChJyZXNwb25zZV9zdHJlYW1p", "bmcYBSABKAgSKAoHb3B0aW9ucxgGIAMoCzIXLmdvb2dsZS5wcm90b2J1Zi5P", "cHRpb24SJwoGc3ludGF4GAcgASgOMhcuZ29vZ2xlLnByb3RvYnVmLlN5bnRh", "eCIjCgVNaXhpbhIMCgRuYW1lGAEgASgJEgwKBHJvb3QYAiABKAlCSAoTY29t", "Lmdvb2dsZS5wcm90b2J1ZkIIQXBpUHJvdG9QAaICA0dQQqoCHkdvb2dsZS5Q", "cm90b2J1Zi5XZWxsS25vd25UeXBlc2IGcHJvdG8z"
|
||||
})), new FileDescriptor[]
|
||||
{
|
||||
SourceContextReflection.Descriptor,
|
||||
TypeReflection.Descriptor
|
||||
}, new GeneratedClrTypeInfo(null, new GeneratedClrTypeInfo[]
|
||||
{
|
||||
new GeneratedClrTypeInfo(typeof(Api), Api.Parser, new string[] { "Name", "Methods", "Options", "Version", "SourceContext", "Mixins", "Syntax" }, null, null, null),
|
||||
new GeneratedClrTypeInfo(typeof(Method), Method.Parser, new string[] { "Name", "RequestTypeUrl", "RequestStreaming", "ResponseTypeUrl", "ResponseStreaming", "Options", "Syntax" }, null, null, null),
|
||||
new GeneratedClrTypeInfo(typeof(Mixin), Mixin.Parser, new string[] { "Name", "Root" }, null, null, null)
|
||||
}));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x0200003D RID: 61
|
||||
public sealed class BoolValue : IMessage<BoolValue>, IMessage, IEquatable<BoolValue>, IDeepCloneable<BoolValue>
|
||||
{
|
||||
// Token: 0x170000B9 RID: 185
|
||||
// (get) Token: 0x06000359 RID: 857 RVA: 0x0000CEB5 File Offset: 0x0000B0B5
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<BoolValue> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return BoolValue._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000BA RID: 186
|
||||
// (get) Token: 0x0600035A RID: 858 RVA: 0x0000CEBC File Offset: 0x0000B0BC
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return WrappersReflection.Descriptor.MessageTypes[6];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000BB RID: 187
|
||||
// (get) Token: 0x0600035B RID: 859 RVA: 0x0000CECE File Offset: 0x0000B0CE
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return BoolValue.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600035C RID: 860 RVA: 0x00007601 File Offset: 0x00005801
|
||||
[DebuggerNonUserCode]
|
||||
public BoolValue()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600035D RID: 861 RVA: 0x0000CED5 File Offset: 0x0000B0D5
|
||||
[DebuggerNonUserCode]
|
||||
public BoolValue(BoolValue other)
|
||||
: this()
|
||||
{
|
||||
this.value_ = other.value_;
|
||||
}
|
||||
|
||||
// Token: 0x0600035E RID: 862 RVA: 0x0000CEE9 File Offset: 0x0000B0E9
|
||||
[DebuggerNonUserCode]
|
||||
public BoolValue Clone()
|
||||
{
|
||||
return new BoolValue(this);
|
||||
}
|
||||
|
||||
// Token: 0x170000BC RID: 188
|
||||
// (get) Token: 0x0600035F RID: 863 RVA: 0x0000CEF1 File Offset: 0x0000B0F1
|
||||
// (set) Token: 0x06000360 RID: 864 RVA: 0x0000CEF9 File Offset: 0x0000B0F9
|
||||
[DebuggerNonUserCode]
|
||||
public bool Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.value_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.value_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000361 RID: 865 RVA: 0x0000CF02 File Offset: 0x0000B102
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as BoolValue);
|
||||
}
|
||||
|
||||
// Token: 0x06000362 RID: 866 RVA: 0x0000CF10 File Offset: 0x0000B110
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(BoolValue other)
|
||||
{
|
||||
return other != null && (other == this || this.Value == other.Value);
|
||||
}
|
||||
|
||||
// Token: 0x06000363 RID: 867 RVA: 0x0000CF30 File Offset: 0x0000B130
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Value)
|
||||
{
|
||||
num ^= this.Value.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000364 RID: 868 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x06000365 RID: 869 RVA: 0x0000CF59 File Offset: 0x0000B159
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Value)
|
||||
{
|
||||
output.WriteRawTag(8);
|
||||
output.WriteBool(this.Value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000366 RID: 870 RVA: 0x0000CF78 File Offset: 0x0000B178
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Value)
|
||||
{
|
||||
num += 2;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000367 RID: 871 RVA: 0x0000CF94 File Offset: 0x0000B194
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(BoolValue other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Value)
|
||||
{
|
||||
this.Value = other.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000368 RID: 872 RVA: 0x0000CFB0 File Offset: 0x0000B1B0
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 8U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Value = input.ReadBool();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400010B RID: 267
|
||||
private static readonly MessageParser<BoolValue> _parser = new MessageParser<BoolValue>(() => new BoolValue());
|
||||
|
||||
// Token: 0x0400010C RID: 268
|
||||
public const int ValueFieldNumber = 1;
|
||||
|
||||
// Token: 0x0400010D RID: 269
|
||||
private bool value_;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x0200003F RID: 63
|
||||
public sealed class BytesValue : IMessage<BytesValue>, IMessage, IEquatable<BytesValue>, IDeepCloneable<BytesValue>
|
||||
{
|
||||
// Token: 0x170000C1 RID: 193
|
||||
// (get) Token: 0x0600037B RID: 891 RVA: 0x0000D182 File Offset: 0x0000B382
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<BytesValue> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return BytesValue._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000C2 RID: 194
|
||||
// (get) Token: 0x0600037C RID: 892 RVA: 0x0000D189 File Offset: 0x0000B389
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return WrappersReflection.Descriptor.MessageTypes[8];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000C3 RID: 195
|
||||
// (get) Token: 0x0600037D RID: 893 RVA: 0x0000D19B File Offset: 0x0000B39B
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return BytesValue.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600037E RID: 894 RVA: 0x0000D1A2 File Offset: 0x0000B3A2
|
||||
[DebuggerNonUserCode]
|
||||
public BytesValue()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600037F RID: 895 RVA: 0x0000D1B5 File Offset: 0x0000B3B5
|
||||
[DebuggerNonUserCode]
|
||||
public BytesValue(BytesValue other)
|
||||
: this()
|
||||
{
|
||||
this.value_ = other.value_;
|
||||
}
|
||||
|
||||
// Token: 0x06000380 RID: 896 RVA: 0x0000D1C9 File Offset: 0x0000B3C9
|
||||
[DebuggerNonUserCode]
|
||||
public BytesValue Clone()
|
||||
{
|
||||
return new BytesValue(this);
|
||||
}
|
||||
|
||||
// Token: 0x170000C4 RID: 196
|
||||
// (get) Token: 0x06000381 RID: 897 RVA: 0x0000D1D1 File Offset: 0x0000B3D1
|
||||
// (set) Token: 0x06000382 RID: 898 RVA: 0x0000D1D9 File Offset: 0x0000B3D9
|
||||
[DebuggerNonUserCode]
|
||||
public ByteString Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.value_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.value_ = ProtoPreconditions.CheckNotNull<ByteString>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000383 RID: 899 RVA: 0x0000D1EC File Offset: 0x0000B3EC
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as BytesValue);
|
||||
}
|
||||
|
||||
// Token: 0x06000384 RID: 900 RVA: 0x0000D1FA File Offset: 0x0000B3FA
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(BytesValue other)
|
||||
{
|
||||
return other != null && (other == this || !(this.Value != other.Value));
|
||||
}
|
||||
|
||||
// Token: 0x06000385 RID: 901 RVA: 0x0000D220 File Offset: 0x0000B420
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Value.Length != 0)
|
||||
{
|
||||
num ^= this.Value.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000386 RID: 902 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x06000387 RID: 903 RVA: 0x0000D24B File Offset: 0x0000B44B
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Value.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(10);
|
||||
output.WriteBytes(this.Value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000388 RID: 904 RVA: 0x0000D270 File Offset: 0x0000B470
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Value.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeBytesSize(this.Value);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000389 RID: 905 RVA: 0x0000D29D File Offset: 0x0000B49D
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(BytesValue other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Value.Length != 0)
|
||||
{
|
||||
this.Value = other.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600038A RID: 906 RVA: 0x0000D2BC File Offset: 0x0000B4BC
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 10U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Value = input.ReadBytes();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000111 RID: 273
|
||||
private static readonly MessageParser<BytesValue> _parser = new MessageParser<BytesValue>(() => new BytesValue());
|
||||
|
||||
// Token: 0x04000112 RID: 274
|
||||
public const int ValueFieldNumber = 1;
|
||||
|
||||
// Token: 0x04000113 RID: 275
|
||||
private ByteString value_ = ByteString.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x02000037 RID: 55
|
||||
public sealed class DoubleValue : IMessage<DoubleValue>, IMessage, IEquatable<DoubleValue>, IDeepCloneable<DoubleValue>
|
||||
{
|
||||
// Token: 0x170000A1 RID: 161
|
||||
// (get) Token: 0x060002F3 RID: 755 RVA: 0x0000C698 File Offset: 0x0000A898
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<DoubleValue> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return DoubleValue._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000A2 RID: 162
|
||||
// (get) Token: 0x060002F4 RID: 756 RVA: 0x0000C69F File Offset: 0x0000A89F
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return WrappersReflection.Descriptor.MessageTypes[0];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000A3 RID: 163
|
||||
// (get) Token: 0x060002F5 RID: 757 RVA: 0x0000C6B1 File Offset: 0x0000A8B1
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DoubleValue.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060002F6 RID: 758 RVA: 0x00007601 File Offset: 0x00005801
|
||||
[DebuggerNonUserCode]
|
||||
public DoubleValue()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060002F7 RID: 759 RVA: 0x0000C6B8 File Offset: 0x0000A8B8
|
||||
[DebuggerNonUserCode]
|
||||
public DoubleValue(DoubleValue other)
|
||||
: this()
|
||||
{
|
||||
this.value_ = other.value_;
|
||||
}
|
||||
|
||||
// Token: 0x060002F8 RID: 760 RVA: 0x0000C6CC File Offset: 0x0000A8CC
|
||||
[DebuggerNonUserCode]
|
||||
public DoubleValue Clone()
|
||||
{
|
||||
return new DoubleValue(this);
|
||||
}
|
||||
|
||||
// Token: 0x170000A4 RID: 164
|
||||
// (get) Token: 0x060002F9 RID: 761 RVA: 0x0000C6D4 File Offset: 0x0000A8D4
|
||||
// (set) Token: 0x060002FA RID: 762 RVA: 0x0000C6DC File Offset: 0x0000A8DC
|
||||
[DebuggerNonUserCode]
|
||||
public double Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.value_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.value_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060002FB RID: 763 RVA: 0x0000C6E5 File Offset: 0x0000A8E5
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as DoubleValue);
|
||||
}
|
||||
|
||||
// Token: 0x060002FC RID: 764 RVA: 0x0000C6F3 File Offset: 0x0000A8F3
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(DoubleValue other)
|
||||
{
|
||||
return other != null && (other == this || this.Value == other.Value);
|
||||
}
|
||||
|
||||
// Token: 0x060002FD RID: 765 RVA: 0x0000C714 File Offset: 0x0000A914
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Value != 0.0)
|
||||
{
|
||||
num ^= this.Value.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x060002FE RID: 766 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x060002FF RID: 767 RVA: 0x0000C746 File Offset: 0x0000A946
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Value != 0.0)
|
||||
{
|
||||
output.WriteRawTag(9);
|
||||
output.WriteDouble(this.Value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000300 RID: 768 RVA: 0x0000C770 File Offset: 0x0000A970
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Value != 0.0)
|
||||
{
|
||||
num += 9;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000301 RID: 769 RVA: 0x0000C796 File Offset: 0x0000A996
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(DoubleValue other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Value != 0.0)
|
||||
{
|
||||
this.Value = other.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000302 RID: 770 RVA: 0x0000C7BC File Offset: 0x0000A9BC
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 9U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Value = input.ReadDouble();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040000F9 RID: 249
|
||||
private static readonly MessageParser<DoubleValue> _parser = new MessageParser<DoubleValue>(() => new DoubleValue());
|
||||
|
||||
// Token: 0x040000FA RID: 250
|
||||
public const int ValueFieldNumber = 1;
|
||||
|
||||
// Token: 0x040000FB RID: 251
|
||||
private double value_;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,371 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x02000020 RID: 32
|
||||
public sealed class Duration : IMessage<Duration>, IMessage, IEquatable<Duration>, IDeepCloneable<Duration>, ICustomDiagnosticMessage
|
||||
{
|
||||
// Token: 0x1700004A RID: 74
|
||||
// (get) Token: 0x060001B9 RID: 441 RVA: 0x00008F1D File Offset: 0x0000711D
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<Duration> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return Duration._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700004B RID: 75
|
||||
// (get) Token: 0x060001BA RID: 442 RVA: 0x00008F24 File Offset: 0x00007124
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DurationReflection.Descriptor.MessageTypes[0];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700004C RID: 76
|
||||
// (get) Token: 0x060001BB RID: 443 RVA: 0x00008F36 File Offset: 0x00007136
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return Duration.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001BC RID: 444 RVA: 0x00007601 File Offset: 0x00005801
|
||||
[DebuggerNonUserCode]
|
||||
public Duration()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060001BD RID: 445 RVA: 0x00008F3D File Offset: 0x0000713D
|
||||
[DebuggerNonUserCode]
|
||||
public Duration(Duration other)
|
||||
: this()
|
||||
{
|
||||
this.seconds_ = other.seconds_;
|
||||
this.nanos_ = other.nanos_;
|
||||
}
|
||||
|
||||
// Token: 0x060001BE RID: 446 RVA: 0x00008F5D File Offset: 0x0000715D
|
||||
[DebuggerNonUserCode]
|
||||
public Duration Clone()
|
||||
{
|
||||
return new Duration(this);
|
||||
}
|
||||
|
||||
// Token: 0x1700004D RID: 77
|
||||
// (get) Token: 0x060001BF RID: 447 RVA: 0x00008F65 File Offset: 0x00007165
|
||||
// (set) Token: 0x060001C0 RID: 448 RVA: 0x00008F6D File Offset: 0x0000716D
|
||||
[DebuggerNonUserCode]
|
||||
public long Seconds
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.seconds_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.seconds_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700004E RID: 78
|
||||
// (get) Token: 0x060001C1 RID: 449 RVA: 0x00008F76 File Offset: 0x00007176
|
||||
// (set) Token: 0x060001C2 RID: 450 RVA: 0x00008F7E File Offset: 0x0000717E
|
||||
[DebuggerNonUserCode]
|
||||
public int Nanos
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.nanos_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.nanos_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001C3 RID: 451 RVA: 0x00008F87 File Offset: 0x00007187
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as Duration);
|
||||
}
|
||||
|
||||
// Token: 0x060001C4 RID: 452 RVA: 0x00008F95 File Offset: 0x00007195
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(Duration other)
|
||||
{
|
||||
return other != null && (other == this || (this.Seconds == other.Seconds && this.Nanos == other.Nanos));
|
||||
}
|
||||
|
||||
// Token: 0x060001C5 RID: 453 RVA: 0x00008FC4 File Offset: 0x000071C4
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Seconds != 0L)
|
||||
{
|
||||
num ^= this.Seconds.GetHashCode();
|
||||
}
|
||||
if (this.Nanos != 0)
|
||||
{
|
||||
num ^= this.Nanos.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x060001C6 RID: 454 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x060001C7 RID: 455 RVA: 0x00009006 File Offset: 0x00007206
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Seconds != 0L)
|
||||
{
|
||||
output.WriteRawTag(8);
|
||||
output.WriteInt64(this.Seconds);
|
||||
}
|
||||
if (this.Nanos != 0)
|
||||
{
|
||||
output.WriteRawTag(16);
|
||||
output.WriteInt32(this.Nanos);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001C8 RID: 456 RVA: 0x00009040 File Offset: 0x00007240
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Seconds != 0L)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeInt64Size(this.Seconds);
|
||||
}
|
||||
if (this.Nanos != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeInt32Size(this.Nanos);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x060001C9 RID: 457 RVA: 0x00009080 File Offset: 0x00007280
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(Duration other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Seconds != 0L)
|
||||
{
|
||||
this.Seconds = other.Seconds;
|
||||
}
|
||||
if (other.Nanos != 0)
|
||||
{
|
||||
this.Nanos = other.Nanos;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001CA RID: 458 RVA: 0x000090B0 File Offset: 0x000072B0
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 8U)
|
||||
{
|
||||
if (num != 16U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Nanos = input.ReadInt32();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Seconds = input.ReadInt64();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001CB RID: 459 RVA: 0x000090F4 File Offset: 0x000072F4
|
||||
internal static bool IsNormalized(long seconds, int nanoseconds)
|
||||
{
|
||||
return seconds >= -315576000000L && seconds <= 315576000000L && nanoseconds >= -999999999 && nanoseconds <= 999999999 && Math.Sign(seconds) * Math.Sign(nanoseconds) != -1;
|
||||
}
|
||||
|
||||
// Token: 0x060001CC RID: 460 RVA: 0x00009133 File Offset: 0x00007333
|
||||
public TimeSpan ToTimeSpan()
|
||||
{
|
||||
if (!Duration.IsNormalized(this.Seconds, this.Nanos))
|
||||
{
|
||||
throw new InvalidOperationException("Duration was not a valid normalized duration");
|
||||
}
|
||||
checked
|
||||
{
|
||||
return TimeSpan.FromTicks(this.Seconds * 10000000L + unchecked((long)(this.Nanos / 100)));
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001CD RID: 461 RVA: 0x00009170 File Offset: 0x00007370
|
||||
public static Duration FromTimeSpan(TimeSpan timeSpan)
|
||||
{
|
||||
long ticks = timeSpan.Ticks;
|
||||
long num = ticks / 10000000L;
|
||||
int num2 = checked((int)(ticks % 10000000L) * 100);
|
||||
return new Duration
|
||||
{
|
||||
Seconds = num,
|
||||
Nanos = num2
|
||||
};
|
||||
}
|
||||
|
||||
// Token: 0x060001CE RID: 462 RVA: 0x000091AC File Offset: 0x000073AC
|
||||
public static Duration operator -(Duration value)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<Duration>(value, "value");
|
||||
return checked(Duration.Normalize(0L - value.Seconds, 0 - value.Nanos));
|
||||
}
|
||||
|
||||
// Token: 0x060001CF RID: 463 RVA: 0x000091D0 File Offset: 0x000073D0
|
||||
public static Duration operator +(Duration lhs, Duration rhs)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<Duration>(lhs, "lhs");
|
||||
ProtoPreconditions.CheckNotNull<Duration>(rhs, "rhs");
|
||||
return checked(Duration.Normalize(lhs.Seconds + rhs.Seconds, lhs.Nanos + rhs.Nanos));
|
||||
}
|
||||
|
||||
// Token: 0x060001D0 RID: 464 RVA: 0x00009209 File Offset: 0x00007409
|
||||
public static Duration operator -(Duration lhs, Duration rhs)
|
||||
{
|
||||
ProtoPreconditions.CheckNotNull<Duration>(lhs, "lhs");
|
||||
ProtoPreconditions.CheckNotNull<Duration>(rhs, "rhs");
|
||||
return checked(Duration.Normalize(lhs.Seconds - rhs.Seconds, lhs.Nanos - rhs.Nanos));
|
||||
}
|
||||
|
||||
// Token: 0x060001D1 RID: 465 RVA: 0x00009244 File Offset: 0x00007444
|
||||
internal static Duration Normalize(long seconds, int nanoseconds)
|
||||
{
|
||||
int num = nanoseconds / 1000000000;
|
||||
seconds += (long)num;
|
||||
nanoseconds -= num * 1000000000;
|
||||
if (seconds < 0L && nanoseconds > 0)
|
||||
{
|
||||
seconds += 1L;
|
||||
nanoseconds -= 1000000000;
|
||||
}
|
||||
else if (seconds > 0L && nanoseconds < 0)
|
||||
{
|
||||
seconds -= 1L;
|
||||
nanoseconds += 1000000000;
|
||||
}
|
||||
return new Duration
|
||||
{
|
||||
Seconds = seconds,
|
||||
Nanos = nanoseconds
|
||||
};
|
||||
}
|
||||
|
||||
// Token: 0x060001D2 RID: 466 RVA: 0x000092B0 File Offset: 0x000074B0
|
||||
internal static string ToJson(long seconds, int nanoseconds, bool diagnosticOnly)
|
||||
{
|
||||
if (Duration.IsNormalized(seconds, nanoseconds))
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.Append('"');
|
||||
if (seconds == 0L && nanoseconds < 0)
|
||||
{
|
||||
stringBuilder.Append('-');
|
||||
}
|
||||
stringBuilder.Append(seconds.ToString("d", CultureInfo.InvariantCulture));
|
||||
Duration.AppendNanoseconds(stringBuilder, Math.Abs(nanoseconds));
|
||||
stringBuilder.Append("s\"");
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
if (diagnosticOnly)
|
||||
{
|
||||
return string.Format(CultureInfo.InvariantCulture, "{{ \"@warning\": \"Invalid Duration\", \"seconds\": \"{0}\", \"nanos\": {1} }}", new object[] { seconds, nanoseconds });
|
||||
}
|
||||
throw new InvalidOperationException("Non-normalized duration value");
|
||||
}
|
||||
|
||||
// Token: 0x060001D3 RID: 467 RVA: 0x00009351 File Offset: 0x00007551
|
||||
public string ToDiagnosticString()
|
||||
{
|
||||
return Duration.ToJson(this.Seconds, this.Nanos, true);
|
||||
}
|
||||
|
||||
// Token: 0x060001D4 RID: 468 RVA: 0x00009368 File Offset: 0x00007568
|
||||
internal static void AppendNanoseconds(StringBuilder builder, int nanos)
|
||||
{
|
||||
if (nanos != 0)
|
||||
{
|
||||
builder.Append('.');
|
||||
if (nanos % 1000000 == 0)
|
||||
{
|
||||
builder.Append((nanos / 1000000).ToString("d3", CultureInfo.InvariantCulture));
|
||||
return;
|
||||
}
|
||||
if (nanos % 1000 == 0)
|
||||
{
|
||||
builder.Append((nanos / 1000).ToString("d6", CultureInfo.InvariantCulture));
|
||||
return;
|
||||
}
|
||||
builder.Append(nanos.ToString("d9", CultureInfo.InvariantCulture));
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400007E RID: 126
|
||||
private static readonly MessageParser<Duration> _parser = new MessageParser<Duration>(() => new Duration());
|
||||
|
||||
// Token: 0x0400007F RID: 127
|
||||
public const int SecondsFieldNumber = 1;
|
||||
|
||||
// Token: 0x04000080 RID: 128
|
||||
private long seconds_;
|
||||
|
||||
// Token: 0x04000081 RID: 129
|
||||
public const int NanosFieldNumber = 2;
|
||||
|
||||
// Token: 0x04000082 RID: 130
|
||||
private int nanos_;
|
||||
|
||||
// Token: 0x04000083 RID: 131
|
||||
public const int NanosecondsPerSecond = 1000000000;
|
||||
|
||||
// Token: 0x04000084 RID: 132
|
||||
public const int NanosecondsPerTick = 100;
|
||||
|
||||
// Token: 0x04000085 RID: 133
|
||||
public const long MaxSeconds = 315576000000L;
|
||||
|
||||
// Token: 0x04000086 RID: 134
|
||||
public const long MinSeconds = -315576000000L;
|
||||
|
||||
// Token: 0x04000087 RID: 135
|
||||
internal const int MaxNanoseconds = 999999999;
|
||||
|
||||
// Token: 0x04000088 RID: 136
|
||||
internal const int MinNanoseconds = -999999999;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x0200001F RID: 31
|
||||
public static class DurationReflection
|
||||
{
|
||||
// Token: 0x17000049 RID: 73
|
||||
// (get) Token: 0x060001B7 RID: 439 RVA: 0x00008E7D File Offset: 0x0000707D
|
||||
public static FileDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return DurationReflection.descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400007D RID: 125
|
||||
private static FileDescriptor descriptor = FileDescriptor.FromGeneratedCode(Convert.FromBase64String(string.Concat(new string[] { "Ch5nb29nbGUvcHJvdG9idWYvZHVyYXRpb24ucHJvdG8SD2dvb2dsZS5wcm90", "b2J1ZiIqCghEdXJhdGlvbhIPCgdzZWNvbmRzGAEgASgDEg0KBW5hbm9zGAIg", "ASgFQnwKE2NvbS5nb29nbGUucHJvdG9idWZCDUR1cmF0aW9uUHJvdG9QAVoq", "Z2l0aHViLmNvbS9nb2xhbmcvcHJvdG9idWYvcHR5cGVzL2R1cmF0aW9u+AEB", "ogIDR1BCqgIeR29vZ2xlLlByb3RvYnVmLldlbGxLbm93blR5cGVzYgZwcm90", "bzM=" })), new FileDescriptor[0], new GeneratedClrTypeInfo(null, new GeneratedClrTypeInfo[]
|
||||
{
|
||||
new GeneratedClrTypeInfo(typeof(Duration), Duration.Parser, new string[] { "Seconds", "Nanos" }, null, null, null)
|
||||
}));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x02000022 RID: 34
|
||||
public sealed class Empty : IMessage<Empty>, IMessage, IEquatable<Empty>, IDeepCloneable<Empty>
|
||||
{
|
||||
// Token: 0x17000050 RID: 80
|
||||
// (get) Token: 0x060001D8 RID: 472 RVA: 0x0000948C File Offset: 0x0000768C
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<Empty> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return Empty._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000051 RID: 81
|
||||
// (get) Token: 0x060001D9 RID: 473 RVA: 0x00009493 File Offset: 0x00007693
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return EmptyReflection.Descriptor.MessageTypes[0];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000052 RID: 82
|
||||
// (get) Token: 0x060001DA RID: 474 RVA: 0x000094A5 File Offset: 0x000076A5
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return Empty.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001DB RID: 475 RVA: 0x00007601 File Offset: 0x00005801
|
||||
[DebuggerNonUserCode]
|
||||
public Empty()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060001DC RID: 476 RVA: 0x000094AC File Offset: 0x000076AC
|
||||
[DebuggerNonUserCode]
|
||||
public Empty(Empty other)
|
||||
: this()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060001DD RID: 477 RVA: 0x000094B4 File Offset: 0x000076B4
|
||||
[DebuggerNonUserCode]
|
||||
public Empty Clone()
|
||||
{
|
||||
return new Empty(this);
|
||||
}
|
||||
|
||||
// Token: 0x060001DE RID: 478 RVA: 0x000094BC File Offset: 0x000076BC
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as Empty);
|
||||
}
|
||||
|
||||
// Token: 0x060001DF RID: 479 RVA: 0x000094CA File Offset: 0x000076CA
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(Empty other)
|
||||
{
|
||||
return other != null;
|
||||
}
|
||||
|
||||
// Token: 0x060001E0 RID: 480 RVA: 0x0000324B File Offset: 0x0000144B
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Token: 0x060001E1 RID: 481 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x060001E2 RID: 482 RVA: 0x00007622 File Offset: 0x00005822
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060001E3 RID: 483 RVA: 0x0000761F File Offset: 0x0000581F
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Token: 0x060001E4 RID: 484 RVA: 0x000094D6 File Offset: 0x000076D6
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(Empty other)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060001E5 RID: 485 RVA: 0x000094DC File Offset: 0x000076DC
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
while (input.ReadTag() != 0U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400008A RID: 138
|
||||
private static readonly MessageParser<Empty> _parser = new MessageParser<Empty>(() => new Empty());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x02000021 RID: 33
|
||||
public static class EmptyReflection
|
||||
{
|
||||
// Token: 0x1700004F RID: 79
|
||||
// (get) Token: 0x060001D6 RID: 470 RVA: 0x00009409 File Offset: 0x00007609
|
||||
public static FileDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return EmptyReflection.descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000089 RID: 137
|
||||
private static FileDescriptor descriptor = FileDescriptor.FromGeneratedCode(Convert.FromBase64String(string.Concat(new string[] { "Chtnb29nbGUvcHJvdG9idWYvZW1wdHkucHJvdG8SD2dvb2dsZS5wcm90b2J1", "ZiIHCgVFbXB0eUJ2ChNjb20uZ29vZ2xlLnByb3RvYnVmQgpFbXB0eVByb3Rv", "UAFaJ2dpdGh1Yi5jb20vZ29sYW5nL3Byb3RvYnVmL3B0eXBlcy9lbXB0efgB", "AaICA0dQQqoCHkdvb2dsZS5Qcm90b2J1Zi5XZWxsS25vd25UeXBlc2IGcHJv", "dG8z" })), new FileDescriptor[0], new GeneratedClrTypeInfo(null, new GeneratedClrTypeInfo[]
|
||||
{
|
||||
new GeneratedClrTypeInfo(typeof(Empty), Empty.Parser, null, null, null, null)
|
||||
}));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,340 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Collections;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x02000033 RID: 51
|
||||
public sealed class Enum : IMessage<Enum>, IMessage, IEquatable<Enum>, IDeepCloneable<Enum>
|
||||
{
|
||||
// Token: 0x1700008D RID: 141
|
||||
// (get) Token: 0x060002B3 RID: 691 RVA: 0x0000BAA8 File Offset: 0x00009CA8
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<Enum> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return Enum._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700008E RID: 142
|
||||
// (get) Token: 0x060002B4 RID: 692 RVA: 0x0000BAAF File Offset: 0x00009CAF
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return TypeReflection.Descriptor.MessageTypes[2];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700008F RID: 143
|
||||
// (get) Token: 0x060002B5 RID: 693 RVA: 0x0000BAC1 File Offset: 0x00009CC1
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return Enum.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060002B6 RID: 694 RVA: 0x0000BAC8 File Offset: 0x00009CC8
|
||||
[DebuggerNonUserCode]
|
||||
public Enum()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060002B7 RID: 695 RVA: 0x0000BAF4 File Offset: 0x00009CF4
|
||||
[DebuggerNonUserCode]
|
||||
public Enum(Enum other)
|
||||
: this()
|
||||
{
|
||||
this.name_ = other.name_;
|
||||
this.enumvalue_ = other.enumvalue_.Clone();
|
||||
this.options_ = other.options_.Clone();
|
||||
this.SourceContext = ((other.sourceContext_ != null) ? other.SourceContext.Clone() : null);
|
||||
this.syntax_ = other.syntax_;
|
||||
}
|
||||
|
||||
// Token: 0x060002B8 RID: 696 RVA: 0x0000BB5D File Offset: 0x00009D5D
|
||||
[DebuggerNonUserCode]
|
||||
public Enum Clone()
|
||||
{
|
||||
return new Enum(this);
|
||||
}
|
||||
|
||||
// Token: 0x17000090 RID: 144
|
||||
// (get) Token: 0x060002B9 RID: 697 RVA: 0x0000BB65 File Offset: 0x00009D65
|
||||
// (set) Token: 0x060002BA RID: 698 RVA: 0x0000BB6D File Offset: 0x00009D6D
|
||||
[DebuggerNonUserCode]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.name_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000091 RID: 145
|
||||
// (get) Token: 0x060002BB RID: 699 RVA: 0x0000BB80 File Offset: 0x00009D80
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<EnumValue> Enumvalue
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.enumvalue_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000092 RID: 146
|
||||
// (get) Token: 0x060002BC RID: 700 RVA: 0x0000BB88 File Offset: 0x00009D88
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<Option> Options
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.options_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000093 RID: 147
|
||||
// (get) Token: 0x060002BD RID: 701 RVA: 0x0000BB90 File Offset: 0x00009D90
|
||||
// (set) Token: 0x060002BE RID: 702 RVA: 0x0000BB98 File Offset: 0x00009D98
|
||||
[DebuggerNonUserCode]
|
||||
public SourceContext SourceContext
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.sourceContext_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.sourceContext_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000094 RID: 148
|
||||
// (get) Token: 0x060002BF RID: 703 RVA: 0x0000BBA1 File Offset: 0x00009DA1
|
||||
// (set) Token: 0x060002C0 RID: 704 RVA: 0x0000BBA9 File Offset: 0x00009DA9
|
||||
[DebuggerNonUserCode]
|
||||
public Syntax Syntax
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.syntax_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.syntax_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060002C1 RID: 705 RVA: 0x0000BBB2 File Offset: 0x00009DB2
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as Enum);
|
||||
}
|
||||
|
||||
// Token: 0x060002C2 RID: 706 RVA: 0x0000BBC0 File Offset: 0x00009DC0
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(Enum other)
|
||||
{
|
||||
return other != null && (other == this || (!(this.Name != other.Name) && this.enumvalue_.Equals(other.enumvalue_) && this.options_.Equals(other.options_) && object.Equals(this.SourceContext, other.SourceContext) && this.Syntax == other.Syntax));
|
||||
}
|
||||
|
||||
// Token: 0x060002C3 RID: 707 RVA: 0x0000BC40 File Offset: 0x00009E40
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
num ^= this.Name.GetHashCode();
|
||||
}
|
||||
num ^= this.enumvalue_.GetHashCode();
|
||||
num ^= this.options_.GetHashCode();
|
||||
if (this.sourceContext_ != null)
|
||||
{
|
||||
num ^= this.SourceContext.GetHashCode();
|
||||
}
|
||||
if (this.Syntax != Syntax.Proto2)
|
||||
{
|
||||
num ^= this.Syntax.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x060002C4 RID: 708 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x060002C5 RID: 709 RVA: 0x0000BCBC File Offset: 0x00009EBC
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(this.Name);
|
||||
}
|
||||
this.enumvalue_.WriteTo(output, Enum._repeated_enumvalue_codec);
|
||||
this.options_.WriteTo(output, Enum._repeated_options_codec);
|
||||
if (this.sourceContext_ != null)
|
||||
{
|
||||
output.WriteRawTag(34);
|
||||
output.WriteMessage(this.SourceContext);
|
||||
}
|
||||
if (this.Syntax != Syntax.Proto2)
|
||||
{
|
||||
output.WriteRawTag(40);
|
||||
output.WriteEnum((int)this.Syntax);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060002C6 RID: 710 RVA: 0x0000BD44 File Offset: 0x00009F44
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.Name);
|
||||
}
|
||||
num += this.enumvalue_.CalculateSize(Enum._repeated_enumvalue_codec);
|
||||
num += this.options_.CalculateSize(Enum._repeated_options_codec);
|
||||
if (this.sourceContext_ != null)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeMessageSize(this.SourceContext);
|
||||
}
|
||||
if (this.Syntax != Syntax.Proto2)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Syntax);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x060002C7 RID: 711 RVA: 0x0000BDC8 File Offset: 0x00009FC8
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(Enum other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Name.Length != 0)
|
||||
{
|
||||
this.Name = other.Name;
|
||||
}
|
||||
this.enumvalue_.Add(other.enumvalue_);
|
||||
this.options_.Add(other.options_);
|
||||
if (other.sourceContext_ != null)
|
||||
{
|
||||
if (this.sourceContext_ == null)
|
||||
{
|
||||
this.sourceContext_ = new SourceContext();
|
||||
}
|
||||
this.SourceContext.MergeFrom(other.SourceContext);
|
||||
}
|
||||
if (other.Syntax != Syntax.Proto2)
|
||||
{
|
||||
this.Syntax = other.Syntax;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060002C8 RID: 712 RVA: 0x0000BE54 File Offset: 0x0000A054
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num <= 18U)
|
||||
{
|
||||
if (num == 10U)
|
||||
{
|
||||
this.Name = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
if (num == 18U)
|
||||
{
|
||||
this.enumvalue_.AddEntriesFrom(input, Enum._repeated_enumvalue_codec);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num == 26U)
|
||||
{
|
||||
this.options_.AddEntriesFrom(input, Enum._repeated_options_codec);
|
||||
continue;
|
||||
}
|
||||
if (num == 34U)
|
||||
{
|
||||
if (this.sourceContext_ == null)
|
||||
{
|
||||
this.sourceContext_ = new SourceContext();
|
||||
}
|
||||
input.ReadMessage(this.sourceContext_);
|
||||
continue;
|
||||
}
|
||||
if (num == 40U)
|
||||
{
|
||||
this.syntax_ = (Syntax)input.ReadEnum();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
input.SkipLastField();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040000DD RID: 221
|
||||
private static readonly MessageParser<Enum> _parser = new MessageParser<Enum>(() => new Enum());
|
||||
|
||||
// Token: 0x040000DE RID: 222
|
||||
public const int NameFieldNumber = 1;
|
||||
|
||||
// Token: 0x040000DF RID: 223
|
||||
private string name_ = "";
|
||||
|
||||
// Token: 0x040000E0 RID: 224
|
||||
public const int EnumvalueFieldNumber = 2;
|
||||
|
||||
// Token: 0x040000E1 RID: 225
|
||||
private static readonly FieldCodec<EnumValue> _repeated_enumvalue_codec = FieldCodec.ForMessage<EnumValue>(18U, EnumValue.Parser);
|
||||
|
||||
// Token: 0x040000E2 RID: 226
|
||||
private readonly RepeatedField<EnumValue> enumvalue_ = new RepeatedField<EnumValue>();
|
||||
|
||||
// Token: 0x040000E3 RID: 227
|
||||
public const int OptionsFieldNumber = 3;
|
||||
|
||||
// Token: 0x040000E4 RID: 228
|
||||
private static readonly FieldCodec<Option> _repeated_options_codec = FieldCodec.ForMessage<Option>(26U, Option.Parser);
|
||||
|
||||
// Token: 0x040000E5 RID: 229
|
||||
private readonly RepeatedField<Option> options_ = new RepeatedField<Option>();
|
||||
|
||||
// Token: 0x040000E6 RID: 230
|
||||
public const int SourceContextFieldNumber = 4;
|
||||
|
||||
// Token: 0x040000E7 RID: 231
|
||||
private SourceContext sourceContext_;
|
||||
|
||||
// Token: 0x040000E8 RID: 232
|
||||
public const int SyntaxFieldNumber = 5;
|
||||
|
||||
// Token: 0x040000E9 RID: 233
|
||||
private Syntax syntax_;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,255 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Collections;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x02000034 RID: 52
|
||||
public sealed class EnumValue : IMessage<EnumValue>, IMessage, IEquatable<EnumValue>, IDeepCloneable<EnumValue>
|
||||
{
|
||||
// Token: 0x17000095 RID: 149
|
||||
// (get) Token: 0x060002CA RID: 714 RVA: 0x0000BF3A File Offset: 0x0000A13A
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<EnumValue> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return EnumValue._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000096 RID: 150
|
||||
// (get) Token: 0x060002CB RID: 715 RVA: 0x0000BF41 File Offset: 0x0000A141
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return TypeReflection.Descriptor.MessageTypes[3];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000097 RID: 151
|
||||
// (get) Token: 0x060002CC RID: 716 RVA: 0x0000BF53 File Offset: 0x0000A153
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return EnumValue.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060002CD RID: 717 RVA: 0x0000BF5A File Offset: 0x0000A15A
|
||||
[DebuggerNonUserCode]
|
||||
public EnumValue()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060002CE RID: 718 RVA: 0x0000BF78 File Offset: 0x0000A178
|
||||
[DebuggerNonUserCode]
|
||||
public EnumValue(EnumValue other)
|
||||
: this()
|
||||
{
|
||||
this.name_ = other.name_;
|
||||
this.number_ = other.number_;
|
||||
this.options_ = other.options_.Clone();
|
||||
}
|
||||
|
||||
// Token: 0x060002CF RID: 719 RVA: 0x0000BFA9 File Offset: 0x0000A1A9
|
||||
[DebuggerNonUserCode]
|
||||
public EnumValue Clone()
|
||||
{
|
||||
return new EnumValue(this);
|
||||
}
|
||||
|
||||
// Token: 0x17000098 RID: 152
|
||||
// (get) Token: 0x060002D0 RID: 720 RVA: 0x0000BFB1 File Offset: 0x0000A1B1
|
||||
// (set) Token: 0x060002D1 RID: 721 RVA: 0x0000BFB9 File Offset: 0x0000A1B9
|
||||
[DebuggerNonUserCode]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.name_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000099 RID: 153
|
||||
// (get) Token: 0x060002D2 RID: 722 RVA: 0x0000BFCC File Offset: 0x0000A1CC
|
||||
// (set) Token: 0x060002D3 RID: 723 RVA: 0x0000BFD4 File Offset: 0x0000A1D4
|
||||
[DebuggerNonUserCode]
|
||||
public int Number
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.number_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.number_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700009A RID: 154
|
||||
// (get) Token: 0x060002D4 RID: 724 RVA: 0x0000BFDD File Offset: 0x0000A1DD
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<Option> Options
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.options_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060002D5 RID: 725 RVA: 0x0000BFE5 File Offset: 0x0000A1E5
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as EnumValue);
|
||||
}
|
||||
|
||||
// Token: 0x060002D6 RID: 726 RVA: 0x0000BFF4 File Offset: 0x0000A1F4
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(EnumValue other)
|
||||
{
|
||||
return other != null && (other == this || (!(this.Name != other.Name) && this.Number == other.Number && this.options_.Equals(other.options_)));
|
||||
}
|
||||
|
||||
// Token: 0x060002D7 RID: 727 RVA: 0x0000C048 File Offset: 0x0000A248
|
||||
[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();
|
||||
}
|
||||
return num ^ this.options_.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x060002D8 RID: 728 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x060002D9 RID: 729 RVA: 0x0000C09C File Offset: 0x0000A29C
|
||||
[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);
|
||||
}
|
||||
this.options_.WriteTo(output, EnumValue._repeated_options_codec);
|
||||
}
|
||||
|
||||
// Token: 0x060002DA RID: 730 RVA: 0x0000C0F8 File Offset: 0x0000A2F8
|
||||
[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);
|
||||
}
|
||||
return num + this.options_.CalculateSize(EnumValue._repeated_options_codec);
|
||||
}
|
||||
|
||||
// Token: 0x060002DB RID: 731 RVA: 0x0000C150 File Offset: 0x0000A350
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(EnumValue other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Name.Length != 0)
|
||||
{
|
||||
this.Name = other.Name;
|
||||
}
|
||||
if (other.Number != 0)
|
||||
{
|
||||
this.Number = other.Number;
|
||||
}
|
||||
this.options_.Add(other.options_);
|
||||
}
|
||||
|
||||
// Token: 0x060002DC RID: 732 RVA: 0x0000C1A0 File Offset: 0x0000A3A0
|
||||
[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
|
||||
{
|
||||
this.options_.AddEntriesFrom(input, EnumValue._repeated_options_codec);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Number = input.ReadInt32();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Name = input.ReadString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040000EA RID: 234
|
||||
private static readonly MessageParser<EnumValue> _parser = new MessageParser<EnumValue>(() => new EnumValue());
|
||||
|
||||
// Token: 0x040000EB RID: 235
|
||||
public const int NameFieldNumber = 1;
|
||||
|
||||
// Token: 0x040000EC RID: 236
|
||||
private string name_ = "";
|
||||
|
||||
// Token: 0x040000ED RID: 237
|
||||
public const int NumberFieldNumber = 2;
|
||||
|
||||
// Token: 0x040000EE RID: 238
|
||||
private int number_;
|
||||
|
||||
// Token: 0x040000EF RID: 239
|
||||
public const int OptionsFieldNumber = 3;
|
||||
|
||||
// Token: 0x040000F0 RID: 240
|
||||
private static readonly FieldCodec<Option> _repeated_options_codec = FieldCodec.ForMessage<Option>(26U, Option.Parser);
|
||||
|
||||
// Token: 0x040000F1 RID: 241
|
||||
private readonly RepeatedField<Option> options_ = new RepeatedField<Option>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,665 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Collections;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x02000032 RID: 50
|
||||
public sealed class Field : IMessage<Field>, IMessage, IEquatable<Field>, IDeepCloneable<Field>
|
||||
{
|
||||
// Token: 0x17000080 RID: 128
|
||||
// (get) Token: 0x06000291 RID: 657 RVA: 0x0000B299 File Offset: 0x00009499
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<Field> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return Field._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000081 RID: 129
|
||||
// (get) Token: 0x06000292 RID: 658 RVA: 0x0000B2A0 File Offset: 0x000094A0
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return TypeReflection.Descriptor.MessageTypes[1];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000082 RID: 130
|
||||
// (get) Token: 0x06000293 RID: 659 RVA: 0x0000B2B2 File Offset: 0x000094B2
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return Field.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000294 RID: 660 RVA: 0x0000B2B9 File Offset: 0x000094B9
|
||||
[DebuggerNonUserCode]
|
||||
public Field()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000295 RID: 661 RVA: 0x0000B2F8 File Offset: 0x000094F8
|
||||
[DebuggerNonUserCode]
|
||||
public Field(Field other)
|
||||
: this()
|
||||
{
|
||||
this.kind_ = other.kind_;
|
||||
this.cardinality_ = other.cardinality_;
|
||||
this.number_ = other.number_;
|
||||
this.name_ = other.name_;
|
||||
this.typeUrl_ = other.typeUrl_;
|
||||
this.oneofIndex_ = other.oneofIndex_;
|
||||
this.packed_ = other.packed_;
|
||||
this.options_ = other.options_.Clone();
|
||||
this.jsonName_ = other.jsonName_;
|
||||
this.defaultValue_ = other.defaultValue_;
|
||||
}
|
||||
|
||||
// Token: 0x06000296 RID: 662 RVA: 0x0000B388 File Offset: 0x00009588
|
||||
[DebuggerNonUserCode]
|
||||
public Field Clone()
|
||||
{
|
||||
return new Field(this);
|
||||
}
|
||||
|
||||
// Token: 0x17000083 RID: 131
|
||||
// (get) Token: 0x06000297 RID: 663 RVA: 0x0000B390 File Offset: 0x00009590
|
||||
// (set) Token: 0x06000298 RID: 664 RVA: 0x0000B398 File Offset: 0x00009598
|
||||
[DebuggerNonUserCode]
|
||||
public Field.Types.Kind Kind
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.kind_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.kind_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000084 RID: 132
|
||||
// (get) Token: 0x06000299 RID: 665 RVA: 0x0000B3A1 File Offset: 0x000095A1
|
||||
// (set) Token: 0x0600029A RID: 666 RVA: 0x0000B3A9 File Offset: 0x000095A9
|
||||
[DebuggerNonUserCode]
|
||||
public Field.Types.Cardinality Cardinality
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.cardinality_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.cardinality_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000085 RID: 133
|
||||
// (get) Token: 0x0600029B RID: 667 RVA: 0x0000B3B2 File Offset: 0x000095B2
|
||||
// (set) Token: 0x0600029C RID: 668 RVA: 0x0000B3BA File Offset: 0x000095BA
|
||||
[DebuggerNonUserCode]
|
||||
public int Number
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.number_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.number_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000086 RID: 134
|
||||
// (get) Token: 0x0600029D RID: 669 RVA: 0x0000B3C3 File Offset: 0x000095C3
|
||||
// (set) Token: 0x0600029E RID: 670 RVA: 0x0000B3CB File Offset: 0x000095CB
|
||||
[DebuggerNonUserCode]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.name_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000087 RID: 135
|
||||
// (get) Token: 0x0600029F RID: 671 RVA: 0x0000B3DE File Offset: 0x000095DE
|
||||
// (set) Token: 0x060002A0 RID: 672 RVA: 0x0000B3E6 File Offset: 0x000095E6
|
||||
[DebuggerNonUserCode]
|
||||
public string TypeUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.typeUrl_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.typeUrl_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000088 RID: 136
|
||||
// (get) Token: 0x060002A1 RID: 673 RVA: 0x0000B3F9 File Offset: 0x000095F9
|
||||
// (set) Token: 0x060002A2 RID: 674 RVA: 0x0000B401 File Offset: 0x00009601
|
||||
[DebuggerNonUserCode]
|
||||
public int OneofIndex
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.oneofIndex_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.oneofIndex_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000089 RID: 137
|
||||
// (get) Token: 0x060002A3 RID: 675 RVA: 0x0000B40A File Offset: 0x0000960A
|
||||
// (set) Token: 0x060002A4 RID: 676 RVA: 0x0000B412 File Offset: 0x00009612
|
||||
[DebuggerNonUserCode]
|
||||
public bool Packed
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.packed_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.packed_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700008A RID: 138
|
||||
// (get) Token: 0x060002A5 RID: 677 RVA: 0x0000B41B File Offset: 0x0000961B
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<Option> Options
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.options_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700008B RID: 139
|
||||
// (get) Token: 0x060002A6 RID: 678 RVA: 0x0000B423 File Offset: 0x00009623
|
||||
// (set) Token: 0x060002A7 RID: 679 RVA: 0x0000B42B File Offset: 0x0000962B
|
||||
[DebuggerNonUserCode]
|
||||
public string JsonName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.jsonName_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.jsonName_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700008C RID: 140
|
||||
// (get) Token: 0x060002A8 RID: 680 RVA: 0x0000B43E File Offset: 0x0000963E
|
||||
// (set) Token: 0x060002A9 RID: 681 RVA: 0x0000B446 File Offset: 0x00009646
|
||||
[DebuggerNonUserCode]
|
||||
public string DefaultValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.defaultValue_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.defaultValue_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060002AA RID: 682 RVA: 0x0000B459 File Offset: 0x00009659
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as Field);
|
||||
}
|
||||
|
||||
// Token: 0x060002AB RID: 683 RVA: 0x0000B468 File Offset: 0x00009668
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(Field other)
|
||||
{
|
||||
return other != null && (other == this || (this.Kind == other.Kind && this.Cardinality == other.Cardinality && this.Number == other.Number && !(this.Name != other.Name) && !(this.TypeUrl != other.TypeUrl) && this.OneofIndex == other.OneofIndex && this.Packed == other.Packed && this.options_.Equals(other.options_) && !(this.JsonName != other.JsonName) && !(this.DefaultValue != other.DefaultValue)));
|
||||
}
|
||||
|
||||
// Token: 0x060002AC RID: 684 RVA: 0x0000B53C File Offset: 0x0000973C
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Kind != Field.Types.Kind.TypeUnknown)
|
||||
{
|
||||
num ^= this.Kind.GetHashCode();
|
||||
}
|
||||
if (this.Cardinality != Field.Types.Cardinality.Unknown)
|
||||
{
|
||||
num ^= this.Cardinality.GetHashCode();
|
||||
}
|
||||
if (this.Number != 0)
|
||||
{
|
||||
num ^= this.Number.GetHashCode();
|
||||
}
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
num ^= this.Name.GetHashCode();
|
||||
}
|
||||
if (this.TypeUrl.Length != 0)
|
||||
{
|
||||
num ^= this.TypeUrl.GetHashCode();
|
||||
}
|
||||
if (this.OneofIndex != 0)
|
||||
{
|
||||
num ^= this.OneofIndex.GetHashCode();
|
||||
}
|
||||
if (this.Packed)
|
||||
{
|
||||
num ^= this.Packed.GetHashCode();
|
||||
}
|
||||
num ^= this.options_.GetHashCode();
|
||||
if (this.JsonName.Length != 0)
|
||||
{
|
||||
num ^= this.JsonName.GetHashCode();
|
||||
}
|
||||
if (this.DefaultValue.Length != 0)
|
||||
{
|
||||
num ^= this.DefaultValue.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x060002AD RID: 685 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x060002AE RID: 686 RVA: 0x0000B650 File Offset: 0x00009850
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Kind != Field.Types.Kind.TypeUnknown)
|
||||
{
|
||||
output.WriteRawTag(8);
|
||||
output.WriteEnum((int)this.Kind);
|
||||
}
|
||||
if (this.Cardinality != Field.Types.Cardinality.Unknown)
|
||||
{
|
||||
output.WriteRawTag(16);
|
||||
output.WriteEnum((int)this.Cardinality);
|
||||
}
|
||||
if (this.Number != 0)
|
||||
{
|
||||
output.WriteRawTag(24);
|
||||
output.WriteInt32(this.Number);
|
||||
}
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(34);
|
||||
output.WriteString(this.Name);
|
||||
}
|
||||
if (this.TypeUrl.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(50);
|
||||
output.WriteString(this.TypeUrl);
|
||||
}
|
||||
if (this.OneofIndex != 0)
|
||||
{
|
||||
output.WriteRawTag(56);
|
||||
output.WriteInt32(this.OneofIndex);
|
||||
}
|
||||
if (this.Packed)
|
||||
{
|
||||
output.WriteRawTag(64);
|
||||
output.WriteBool(this.Packed);
|
||||
}
|
||||
this.options_.WriteTo(output, Field._repeated_options_codec);
|
||||
if (this.JsonName.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(82);
|
||||
output.WriteString(this.JsonName);
|
||||
}
|
||||
if (this.DefaultValue.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(90);
|
||||
output.WriteString(this.DefaultValue);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060002AF RID: 687 RVA: 0x0000B780 File Offset: 0x00009980
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Kind != Field.Types.Kind.TypeUnknown)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Kind);
|
||||
}
|
||||
if (this.Cardinality != Field.Types.Cardinality.Unknown)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Cardinality);
|
||||
}
|
||||
if (this.Number != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeInt32Size(this.Number);
|
||||
}
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.Name);
|
||||
}
|
||||
if (this.TypeUrl.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.TypeUrl);
|
||||
}
|
||||
if (this.OneofIndex != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeInt32Size(this.OneofIndex);
|
||||
}
|
||||
if (this.Packed)
|
||||
{
|
||||
num += 2;
|
||||
}
|
||||
num += this.options_.CalculateSize(Field._repeated_options_codec);
|
||||
if (this.JsonName.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.JsonName);
|
||||
}
|
||||
if (this.DefaultValue.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.DefaultValue);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x060002B0 RID: 688 RVA: 0x0000B884 File Offset: 0x00009A84
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(Field other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Kind != Field.Types.Kind.TypeUnknown)
|
||||
{
|
||||
this.Kind = other.Kind;
|
||||
}
|
||||
if (other.Cardinality != Field.Types.Cardinality.Unknown)
|
||||
{
|
||||
this.Cardinality = other.Cardinality;
|
||||
}
|
||||
if (other.Number != 0)
|
||||
{
|
||||
this.Number = other.Number;
|
||||
}
|
||||
if (other.Name.Length != 0)
|
||||
{
|
||||
this.Name = other.Name;
|
||||
}
|
||||
if (other.TypeUrl.Length != 0)
|
||||
{
|
||||
this.TypeUrl = other.TypeUrl;
|
||||
}
|
||||
if (other.OneofIndex != 0)
|
||||
{
|
||||
this.OneofIndex = other.OneofIndex;
|
||||
}
|
||||
if (other.Packed)
|
||||
{
|
||||
this.Packed = other.Packed;
|
||||
}
|
||||
this.options_.Add(other.options_);
|
||||
if (other.JsonName.Length != 0)
|
||||
{
|
||||
this.JsonName = other.JsonName;
|
||||
}
|
||||
if (other.DefaultValue.Length != 0)
|
||||
{
|
||||
this.DefaultValue = other.DefaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060002B1 RID: 689 RVA: 0x0000B970 File Offset: 0x00009B70
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num <= 50U)
|
||||
{
|
||||
if (num <= 16U)
|
||||
{
|
||||
if (num == 8U)
|
||||
{
|
||||
this.kind_ = (Field.Types.Kind)input.ReadEnum();
|
||||
continue;
|
||||
}
|
||||
if (num == 16U)
|
||||
{
|
||||
this.cardinality_ = (Field.Types.Cardinality)input.ReadEnum();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num == 24U)
|
||||
{
|
||||
this.Number = input.ReadInt32();
|
||||
continue;
|
||||
}
|
||||
if (num == 34U)
|
||||
{
|
||||
this.Name = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
if (num == 50U)
|
||||
{
|
||||
this.TypeUrl = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (num <= 64U)
|
||||
{
|
||||
if (num == 56U)
|
||||
{
|
||||
this.OneofIndex = input.ReadInt32();
|
||||
continue;
|
||||
}
|
||||
if (num == 64U)
|
||||
{
|
||||
this.Packed = input.ReadBool();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num == 74U)
|
||||
{
|
||||
this.options_.AddEntriesFrom(input, Field._repeated_options_codec);
|
||||
continue;
|
||||
}
|
||||
if (num == 82U)
|
||||
{
|
||||
this.JsonName = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
if (num == 90U)
|
||||
{
|
||||
this.DefaultValue = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
input.SkipLastField();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040000C7 RID: 199
|
||||
private static readonly MessageParser<Field> _parser = new MessageParser<Field>(() => new Field());
|
||||
|
||||
// Token: 0x040000C8 RID: 200
|
||||
public const int KindFieldNumber = 1;
|
||||
|
||||
// Token: 0x040000C9 RID: 201
|
||||
private Field.Types.Kind kind_;
|
||||
|
||||
// Token: 0x040000CA RID: 202
|
||||
public const int CardinalityFieldNumber = 2;
|
||||
|
||||
// Token: 0x040000CB RID: 203
|
||||
private Field.Types.Cardinality cardinality_;
|
||||
|
||||
// Token: 0x040000CC RID: 204
|
||||
public const int NumberFieldNumber = 3;
|
||||
|
||||
// Token: 0x040000CD RID: 205
|
||||
private int number_;
|
||||
|
||||
// Token: 0x040000CE RID: 206
|
||||
public const int NameFieldNumber = 4;
|
||||
|
||||
// Token: 0x040000CF RID: 207
|
||||
private string name_ = "";
|
||||
|
||||
// Token: 0x040000D0 RID: 208
|
||||
public const int TypeUrlFieldNumber = 6;
|
||||
|
||||
// Token: 0x040000D1 RID: 209
|
||||
private string typeUrl_ = "";
|
||||
|
||||
// Token: 0x040000D2 RID: 210
|
||||
public const int OneofIndexFieldNumber = 7;
|
||||
|
||||
// Token: 0x040000D3 RID: 211
|
||||
private int oneofIndex_;
|
||||
|
||||
// Token: 0x040000D4 RID: 212
|
||||
public const int PackedFieldNumber = 8;
|
||||
|
||||
// Token: 0x040000D5 RID: 213
|
||||
private bool packed_;
|
||||
|
||||
// Token: 0x040000D6 RID: 214
|
||||
public const int OptionsFieldNumber = 9;
|
||||
|
||||
// Token: 0x040000D7 RID: 215
|
||||
private static readonly FieldCodec<Option> _repeated_options_codec = FieldCodec.ForMessage<Option>(74U, Option.Parser);
|
||||
|
||||
// Token: 0x040000D8 RID: 216
|
||||
private readonly RepeatedField<Option> options_ = new RepeatedField<Option>();
|
||||
|
||||
// Token: 0x040000D9 RID: 217
|
||||
public const int JsonNameFieldNumber = 10;
|
||||
|
||||
// Token: 0x040000DA RID: 218
|
||||
private string jsonName_ = "";
|
||||
|
||||
// Token: 0x040000DB RID: 219
|
||||
public const int DefaultValueFieldNumber = 11;
|
||||
|
||||
// Token: 0x040000DC RID: 220
|
||||
private string defaultValue_ = "";
|
||||
|
||||
// Token: 0x02000094 RID: 148
|
||||
[DebuggerNonUserCode]
|
||||
public static class Types
|
||||
{
|
||||
// Token: 0x020000D3 RID: 211
|
||||
public enum Kind
|
||||
{
|
||||
// Token: 0x0400032C RID: 812
|
||||
[OriginalName("TYPE_UNKNOWN")]
|
||||
TypeUnknown,
|
||||
// Token: 0x0400032D RID: 813
|
||||
[OriginalName("TYPE_DOUBLE")]
|
||||
TypeDouble,
|
||||
// Token: 0x0400032E RID: 814
|
||||
[OriginalName("TYPE_FLOAT")]
|
||||
TypeFloat,
|
||||
// Token: 0x0400032F RID: 815
|
||||
[OriginalName("TYPE_INT64")]
|
||||
TypeInt64,
|
||||
// Token: 0x04000330 RID: 816
|
||||
[OriginalName("TYPE_UINT64")]
|
||||
TypeUint64,
|
||||
// Token: 0x04000331 RID: 817
|
||||
[OriginalName("TYPE_INT32")]
|
||||
TypeInt32,
|
||||
// Token: 0x04000332 RID: 818
|
||||
[OriginalName("TYPE_FIXED64")]
|
||||
TypeFixed64,
|
||||
// Token: 0x04000333 RID: 819
|
||||
[OriginalName("TYPE_FIXED32")]
|
||||
TypeFixed32,
|
||||
// Token: 0x04000334 RID: 820
|
||||
[OriginalName("TYPE_BOOL")]
|
||||
TypeBool,
|
||||
// Token: 0x04000335 RID: 821
|
||||
[OriginalName("TYPE_STRING")]
|
||||
TypeString,
|
||||
// Token: 0x04000336 RID: 822
|
||||
[OriginalName("TYPE_GROUP")]
|
||||
TypeGroup,
|
||||
// Token: 0x04000337 RID: 823
|
||||
[OriginalName("TYPE_MESSAGE")]
|
||||
TypeMessage,
|
||||
// Token: 0x04000338 RID: 824
|
||||
[OriginalName("TYPE_BYTES")]
|
||||
TypeBytes,
|
||||
// Token: 0x04000339 RID: 825
|
||||
[OriginalName("TYPE_UINT32")]
|
||||
TypeUint32,
|
||||
// Token: 0x0400033A RID: 826
|
||||
[OriginalName("TYPE_ENUM")]
|
||||
TypeEnum,
|
||||
// Token: 0x0400033B RID: 827
|
||||
[OriginalName("TYPE_SFIXED32")]
|
||||
TypeSfixed32,
|
||||
// Token: 0x0400033C RID: 828
|
||||
[OriginalName("TYPE_SFIXED64")]
|
||||
TypeSfixed64,
|
||||
// Token: 0x0400033D RID: 829
|
||||
[OriginalName("TYPE_SINT32")]
|
||||
TypeSint32,
|
||||
// Token: 0x0400033E RID: 830
|
||||
[OriginalName("TYPE_SINT64")]
|
||||
TypeSint64
|
||||
}
|
||||
|
||||
// Token: 0x020000D4 RID: 212
|
||||
public enum Cardinality
|
||||
{
|
||||
// Token: 0x04000340 RID: 832
|
||||
[OriginalName("CARDINALITY_UNKNOWN")]
|
||||
Unknown,
|
||||
// Token: 0x04000341 RID: 833
|
||||
[OriginalName("CARDINALITY_OPTIONAL")]
|
||||
Optional,
|
||||
// Token: 0x04000342 RID: 834
|
||||
[OriginalName("CARDINALITY_REQUIRED")]
|
||||
Required,
|
||||
// Token: 0x04000343 RID: 835
|
||||
[OriginalName("CARDINALITY_REPEATED")]
|
||||
Repeated
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,213 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Google.Protobuf.Collections;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x02000024 RID: 36
|
||||
public sealed class FieldMask : IMessage<FieldMask>, IMessage, IEquatable<FieldMask>, IDeepCloneable<FieldMask>, ICustomDiagnosticMessage
|
||||
{
|
||||
// Token: 0x17000054 RID: 84
|
||||
// (get) Token: 0x060001E9 RID: 489 RVA: 0x0000958F File Offset: 0x0000778F
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<FieldMask> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return FieldMask._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000055 RID: 85
|
||||
// (get) Token: 0x060001EA RID: 490 RVA: 0x00009596 File Offset: 0x00007796
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return FieldMaskReflection.Descriptor.MessageTypes[0];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000056 RID: 86
|
||||
// (get) Token: 0x060001EB RID: 491 RVA: 0x000095A8 File Offset: 0x000077A8
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return FieldMask.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001EC RID: 492 RVA: 0x000095AF File Offset: 0x000077AF
|
||||
[DebuggerNonUserCode]
|
||||
public FieldMask()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060001ED RID: 493 RVA: 0x000095C2 File Offset: 0x000077C2
|
||||
[DebuggerNonUserCode]
|
||||
public FieldMask(FieldMask other)
|
||||
: this()
|
||||
{
|
||||
this.paths_ = other.paths_.Clone();
|
||||
}
|
||||
|
||||
// Token: 0x060001EE RID: 494 RVA: 0x000095DB File Offset: 0x000077DB
|
||||
[DebuggerNonUserCode]
|
||||
public FieldMask Clone()
|
||||
{
|
||||
return new FieldMask(this);
|
||||
}
|
||||
|
||||
// Token: 0x17000057 RID: 87
|
||||
// (get) Token: 0x060001EF RID: 495 RVA: 0x000095E3 File Offset: 0x000077E3
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<string> Paths
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.paths_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001F0 RID: 496 RVA: 0x000095EB File Offset: 0x000077EB
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as FieldMask);
|
||||
}
|
||||
|
||||
// Token: 0x060001F1 RID: 497 RVA: 0x000095F9 File Offset: 0x000077F9
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(FieldMask other)
|
||||
{
|
||||
return other != null && (other == this || this.paths_.Equals(other.paths_));
|
||||
}
|
||||
|
||||
// Token: 0x060001F2 RID: 498 RVA: 0x0000961C File Offset: 0x0000781C
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return 1 ^ this.paths_.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x060001F3 RID: 499 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x060001F4 RID: 500 RVA: 0x0000962B File Offset: 0x0000782B
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
this.paths_.WriteTo(output, FieldMask._repeated_paths_codec);
|
||||
}
|
||||
|
||||
// Token: 0x060001F5 RID: 501 RVA: 0x0000963E File Offset: 0x0000783E
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
return 0 + this.paths_.CalculateSize(FieldMask._repeated_paths_codec);
|
||||
}
|
||||
|
||||
// Token: 0x060001F6 RID: 502 RVA: 0x00009652 File Offset: 0x00007852
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(FieldMask other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.paths_.Add(other.paths_);
|
||||
}
|
||||
|
||||
// Token: 0x060001F7 RID: 503 RVA: 0x0000966C File Offset: 0x0000786C
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 10U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.paths_.AddEntriesFrom(input, FieldMask._repeated_paths_codec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001F8 RID: 504 RVA: 0x000096A4 File Offset: 0x000078A4
|
||||
internal static string ToJson(IList<string> paths, bool diagnosticOnly)
|
||||
{
|
||||
string text = paths.FirstOrDefault((string p) => !FieldMask.ValidatePath(p));
|
||||
if (text == null)
|
||||
{
|
||||
StringWriter stringWriter = new StringWriter();
|
||||
IEnumerable<string> enumerable = paths.Select(new Func<string, string>(JsonFormatter.ToCamelCase));
|
||||
JsonFormatter.WriteString(stringWriter, string.Join(",", enumerable.ToArray<string>()));
|
||||
return stringWriter.ToString();
|
||||
}
|
||||
if (diagnosticOnly)
|
||||
{
|
||||
StringWriter stringWriter2 = new StringWriter();
|
||||
stringWriter2.Write("{ \"@warning\": \"Invalid FieldMask\", \"paths\": ");
|
||||
JsonFormatter.Default.WriteList(stringWriter2, (IList)paths);
|
||||
stringWriter2.Write(" }");
|
||||
return stringWriter2.ToString();
|
||||
}
|
||||
throw new InvalidOperationException(string.Format("Invalid field mask to be converted to JSON: {0}", text));
|
||||
}
|
||||
|
||||
// Token: 0x060001F9 RID: 505 RVA: 0x00009758 File Offset: 0x00007958
|
||||
private static bool ValidatePath(string input)
|
||||
{
|
||||
for (int i = 0; i < input.Length; i++)
|
||||
{
|
||||
char c = input[i];
|
||||
if (c >= 'A' && c <= 'Z')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (c == '_' && i < input.Length - 1)
|
||||
{
|
||||
char c2 = input[i + 1];
|
||||
if (c2 < 'a' || c2 > 'z')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x060001FA RID: 506 RVA: 0x000097B1 File Offset: 0x000079B1
|
||||
public string ToDiagnosticString()
|
||||
{
|
||||
return FieldMask.ToJson(this.Paths, true);
|
||||
}
|
||||
|
||||
// Token: 0x0400008C RID: 140
|
||||
private static readonly MessageParser<FieldMask> _parser = new MessageParser<FieldMask>(() => new FieldMask());
|
||||
|
||||
// Token: 0x0400008D RID: 141
|
||||
public const int PathsFieldNumber = 1;
|
||||
|
||||
// Token: 0x0400008E RID: 142
|
||||
private static readonly FieldCodec<string> _repeated_paths_codec = FieldCodec.ForString(10U);
|
||||
|
||||
// Token: 0x0400008F RID: 143
|
||||
private readonly RepeatedField<string> paths_ = new RepeatedField<string>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x02000023 RID: 35
|
||||
public static class FieldMaskReflection
|
||||
{
|
||||
// Token: 0x17000053 RID: 83
|
||||
// (get) Token: 0x060001E7 RID: 487 RVA: 0x00009517 File Offset: 0x00007717
|
||||
public static FileDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return FieldMaskReflection.descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400008B RID: 139
|
||||
private static FileDescriptor descriptor = FileDescriptor.FromGeneratedCode(Convert.FromBase64String("CiBnb29nbGUvcHJvdG9idWYvZmllbGRfbWFzay5wcm90bxIPZ29vZ2xlLnBy" + "b3RvYnVmIhoKCUZpZWxkTWFzaxINCgVwYXRocxgBIAMoCUJOChNjb20uZ29v" + "Z2xlLnByb3RvYnVmQg5GaWVsZE1hc2tQcm90b1ABogIDR1BCqgIeR29vZ2xl" + "LlByb3RvYnVmLldlbGxLbm93blR5cGVzYgZwcm90bzM="), new FileDescriptor[0], new GeneratedClrTypeInfo(null, new GeneratedClrTypeInfo[]
|
||||
{
|
||||
new GeneratedClrTypeInfo(typeof(FieldMask), FieldMask.Parser, new string[] { "Paths" }, null, null, null)
|
||||
}));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x02000038 RID: 56
|
||||
public sealed class FloatValue : IMessage<FloatValue>, IMessage, IEquatable<FloatValue>, IDeepCloneable<FloatValue>
|
||||
{
|
||||
// Token: 0x170000A5 RID: 165
|
||||
// (get) Token: 0x06000304 RID: 772 RVA: 0x0000C80A File Offset: 0x0000AA0A
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<FloatValue> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return FloatValue._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000A6 RID: 166
|
||||
// (get) Token: 0x06000305 RID: 773 RVA: 0x0000C811 File Offset: 0x0000AA11
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return WrappersReflection.Descriptor.MessageTypes[1];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000A7 RID: 167
|
||||
// (get) Token: 0x06000306 RID: 774 RVA: 0x0000C823 File Offset: 0x0000AA23
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return FloatValue.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000307 RID: 775 RVA: 0x00007601 File Offset: 0x00005801
|
||||
[DebuggerNonUserCode]
|
||||
public FloatValue()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000308 RID: 776 RVA: 0x0000C82A File Offset: 0x0000AA2A
|
||||
[DebuggerNonUserCode]
|
||||
public FloatValue(FloatValue other)
|
||||
: this()
|
||||
{
|
||||
this.value_ = other.value_;
|
||||
}
|
||||
|
||||
// Token: 0x06000309 RID: 777 RVA: 0x0000C83E File Offset: 0x0000AA3E
|
||||
[DebuggerNonUserCode]
|
||||
public FloatValue Clone()
|
||||
{
|
||||
return new FloatValue(this);
|
||||
}
|
||||
|
||||
// Token: 0x170000A8 RID: 168
|
||||
// (get) Token: 0x0600030A RID: 778 RVA: 0x0000C846 File Offset: 0x0000AA46
|
||||
// (set) Token: 0x0600030B RID: 779 RVA: 0x0000C84E File Offset: 0x0000AA4E
|
||||
[DebuggerNonUserCode]
|
||||
public float Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.value_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.value_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600030C RID: 780 RVA: 0x0000C857 File Offset: 0x0000AA57
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as FloatValue);
|
||||
}
|
||||
|
||||
// Token: 0x0600030D RID: 781 RVA: 0x0000C865 File Offset: 0x0000AA65
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(FloatValue other)
|
||||
{
|
||||
return other != null && (other == this || this.Value == other.Value);
|
||||
}
|
||||
|
||||
// Token: 0x0600030E RID: 782 RVA: 0x0000C884 File Offset: 0x0000AA84
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Value != 0f)
|
||||
{
|
||||
num ^= this.Value.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0600030F RID: 783 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x06000310 RID: 784 RVA: 0x0000C8B2 File Offset: 0x0000AAB2
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Value != 0f)
|
||||
{
|
||||
output.WriteRawTag(13);
|
||||
output.WriteFloat(this.Value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000311 RID: 785 RVA: 0x0000C8D8 File Offset: 0x0000AAD8
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Value != 0f)
|
||||
{
|
||||
num += 5;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000312 RID: 786 RVA: 0x0000C8F9 File Offset: 0x0000AAF9
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(FloatValue other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Value != 0f)
|
||||
{
|
||||
this.Value = other.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000313 RID: 787 RVA: 0x0000C918 File Offset: 0x0000AB18
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 13U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Value = input.ReadFloat();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040000FC RID: 252
|
||||
private static readonly MessageParser<FloatValue> _parser = new MessageParser<FloatValue>(() => new FloatValue());
|
||||
|
||||
// Token: 0x040000FD RID: 253
|
||||
public const int ValueFieldNumber = 1;
|
||||
|
||||
// Token: 0x040000FE RID: 254
|
||||
private float value_;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x0200003B RID: 59
|
||||
public sealed class Int32Value : IMessage<Int32Value>, IMessage, IEquatable<Int32Value>, IDeepCloneable<Int32Value>
|
||||
{
|
||||
// Token: 0x170000B1 RID: 177
|
||||
// (get) Token: 0x06000337 RID: 823 RVA: 0x0000CC0D File Offset: 0x0000AE0D
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<Int32Value> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return Int32Value._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000B2 RID: 178
|
||||
// (get) Token: 0x06000338 RID: 824 RVA: 0x0000CC14 File Offset: 0x0000AE14
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return WrappersReflection.Descriptor.MessageTypes[4];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000B3 RID: 179
|
||||
// (get) Token: 0x06000339 RID: 825 RVA: 0x0000CC26 File Offset: 0x0000AE26
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return Int32Value.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600033A RID: 826 RVA: 0x00007601 File Offset: 0x00005801
|
||||
[DebuggerNonUserCode]
|
||||
public Int32Value()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600033B RID: 827 RVA: 0x0000CC2D File Offset: 0x0000AE2D
|
||||
[DebuggerNonUserCode]
|
||||
public Int32Value(Int32Value other)
|
||||
: this()
|
||||
{
|
||||
this.value_ = other.value_;
|
||||
}
|
||||
|
||||
// Token: 0x0600033C RID: 828 RVA: 0x0000CC41 File Offset: 0x0000AE41
|
||||
[DebuggerNonUserCode]
|
||||
public Int32Value Clone()
|
||||
{
|
||||
return new Int32Value(this);
|
||||
}
|
||||
|
||||
// Token: 0x170000B4 RID: 180
|
||||
// (get) Token: 0x0600033D RID: 829 RVA: 0x0000CC49 File Offset: 0x0000AE49
|
||||
// (set) Token: 0x0600033E RID: 830 RVA: 0x0000CC51 File Offset: 0x0000AE51
|
||||
[DebuggerNonUserCode]
|
||||
public int Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.value_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.value_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600033F RID: 831 RVA: 0x0000CC5A File Offset: 0x0000AE5A
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as Int32Value);
|
||||
}
|
||||
|
||||
// Token: 0x06000340 RID: 832 RVA: 0x0000CC68 File Offset: 0x0000AE68
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(Int32Value other)
|
||||
{
|
||||
return other != null && (other == this || this.Value == other.Value);
|
||||
}
|
||||
|
||||
// Token: 0x06000341 RID: 833 RVA: 0x0000CC88 File Offset: 0x0000AE88
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Value != 0)
|
||||
{
|
||||
num ^= this.Value.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000342 RID: 834 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x06000343 RID: 835 RVA: 0x0000CCB1 File Offset: 0x0000AEB1
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Value != 0)
|
||||
{
|
||||
output.WriteRawTag(8);
|
||||
output.WriteInt32(this.Value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000344 RID: 836 RVA: 0x0000CCD0 File Offset: 0x0000AED0
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Value != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeInt32Size(this.Value);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000345 RID: 837 RVA: 0x0000CCF8 File Offset: 0x0000AEF8
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(Int32Value other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Value != 0)
|
||||
{
|
||||
this.Value = other.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000346 RID: 838 RVA: 0x0000CD14 File Offset: 0x0000AF14
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 8U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Value = input.ReadInt32();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000105 RID: 261
|
||||
private static readonly MessageParser<Int32Value> _parser = new MessageParser<Int32Value>(() => new Int32Value());
|
||||
|
||||
// Token: 0x04000106 RID: 262
|
||||
public const int ValueFieldNumber = 1;
|
||||
|
||||
// Token: 0x04000107 RID: 263
|
||||
private int value_;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x02000039 RID: 57
|
||||
public sealed class Int64Value : IMessage<Int64Value>, IMessage, IEquatable<Int64Value>, IDeepCloneable<Int64Value>
|
||||
{
|
||||
// Token: 0x170000A9 RID: 169
|
||||
// (get) Token: 0x06000315 RID: 789 RVA: 0x0000C966 File Offset: 0x0000AB66
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<Int64Value> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return Int64Value._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000AA RID: 170
|
||||
// (get) Token: 0x06000316 RID: 790 RVA: 0x0000C96D File Offset: 0x0000AB6D
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return WrappersReflection.Descriptor.MessageTypes[2];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000AB RID: 171
|
||||
// (get) Token: 0x06000317 RID: 791 RVA: 0x0000C97F File Offset: 0x0000AB7F
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return Int64Value.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000318 RID: 792 RVA: 0x00007601 File Offset: 0x00005801
|
||||
[DebuggerNonUserCode]
|
||||
public Int64Value()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000319 RID: 793 RVA: 0x0000C986 File Offset: 0x0000AB86
|
||||
[DebuggerNonUserCode]
|
||||
public Int64Value(Int64Value other)
|
||||
: this()
|
||||
{
|
||||
this.value_ = other.value_;
|
||||
}
|
||||
|
||||
// Token: 0x0600031A RID: 794 RVA: 0x0000C99A File Offset: 0x0000AB9A
|
||||
[DebuggerNonUserCode]
|
||||
public Int64Value Clone()
|
||||
{
|
||||
return new Int64Value(this);
|
||||
}
|
||||
|
||||
// Token: 0x170000AC RID: 172
|
||||
// (get) Token: 0x0600031B RID: 795 RVA: 0x0000C9A2 File Offset: 0x0000ABA2
|
||||
// (set) Token: 0x0600031C RID: 796 RVA: 0x0000C9AA File Offset: 0x0000ABAA
|
||||
[DebuggerNonUserCode]
|
||||
public long Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.value_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.value_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600031D RID: 797 RVA: 0x0000C9B3 File Offset: 0x0000ABB3
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as Int64Value);
|
||||
}
|
||||
|
||||
// Token: 0x0600031E RID: 798 RVA: 0x0000C9C1 File Offset: 0x0000ABC1
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(Int64Value other)
|
||||
{
|
||||
return other != null && (other == this || this.Value == other.Value);
|
||||
}
|
||||
|
||||
// Token: 0x0600031F RID: 799 RVA: 0x0000C9E0 File Offset: 0x0000ABE0
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Value != 0L)
|
||||
{
|
||||
num ^= this.Value.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000320 RID: 800 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x06000321 RID: 801 RVA: 0x0000CA09 File Offset: 0x0000AC09
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Value != 0L)
|
||||
{
|
||||
output.WriteRawTag(8);
|
||||
output.WriteInt64(this.Value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000322 RID: 802 RVA: 0x0000CA28 File Offset: 0x0000AC28
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Value != 0L)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeInt64Size(this.Value);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000323 RID: 803 RVA: 0x0000CA50 File Offset: 0x0000AC50
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(Int64Value other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Value != 0L)
|
||||
{
|
||||
this.Value = other.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000324 RID: 804 RVA: 0x0000CA6C File Offset: 0x0000AC6C
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 8U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Value = input.ReadInt64();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040000FF RID: 255
|
||||
private static readonly MessageParser<Int64Value> _parser = new MessageParser<Int64Value>(() => new Int64Value());
|
||||
|
||||
// Token: 0x04000100 RID: 256
|
||||
public const int ValueFieldNumber = 1;
|
||||
|
||||
// Token: 0x04000101 RID: 257
|
||||
private long value_;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Collections;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x0200002B RID: 43
|
||||
public sealed class ListValue : IMessage<ListValue>, IMessage, IEquatable<ListValue>, IDeepCloneable<ListValue>
|
||||
{
|
||||
// Token: 0x1700006C RID: 108
|
||||
// (get) Token: 0x06000244 RID: 580 RVA: 0x0000A382 File Offset: 0x00008582
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<ListValue> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return ListValue._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700006D RID: 109
|
||||
// (get) Token: 0x06000245 RID: 581 RVA: 0x0000A389 File Offset: 0x00008589
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return StructReflection.Descriptor.MessageTypes[2];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700006E RID: 110
|
||||
// (get) Token: 0x06000246 RID: 582 RVA: 0x0000A39B File Offset: 0x0000859B
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return ListValue.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000247 RID: 583 RVA: 0x0000A3A2 File Offset: 0x000085A2
|
||||
[DebuggerNonUserCode]
|
||||
public ListValue()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000248 RID: 584 RVA: 0x0000A3B5 File Offset: 0x000085B5
|
||||
[DebuggerNonUserCode]
|
||||
public ListValue(ListValue other)
|
||||
: this()
|
||||
{
|
||||
this.values_ = other.values_.Clone();
|
||||
}
|
||||
|
||||
// Token: 0x06000249 RID: 585 RVA: 0x0000A3CE File Offset: 0x000085CE
|
||||
[DebuggerNonUserCode]
|
||||
public ListValue Clone()
|
||||
{
|
||||
return new ListValue(this);
|
||||
}
|
||||
|
||||
// Token: 0x1700006F RID: 111
|
||||
// (get) Token: 0x0600024A RID: 586 RVA: 0x0000A3D6 File Offset: 0x000085D6
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<Value> Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.values_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600024B RID: 587 RVA: 0x0000A3DE File Offset: 0x000085DE
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as ListValue);
|
||||
}
|
||||
|
||||
// Token: 0x0600024C RID: 588 RVA: 0x0000A3EC File Offset: 0x000085EC
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(ListValue other)
|
||||
{
|
||||
return other != null && (other == this || this.values_.Equals(other.values_));
|
||||
}
|
||||
|
||||
// Token: 0x0600024D RID: 589 RVA: 0x0000A40F File Offset: 0x0000860F
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return 1 ^ this.values_.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x0600024E RID: 590 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x0600024F RID: 591 RVA: 0x0000A41E File Offset: 0x0000861E
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
this.values_.WriteTo(output, ListValue._repeated_values_codec);
|
||||
}
|
||||
|
||||
// Token: 0x06000250 RID: 592 RVA: 0x0000A431 File Offset: 0x00008631
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
return 0 + this.values_.CalculateSize(ListValue._repeated_values_codec);
|
||||
}
|
||||
|
||||
// Token: 0x06000251 RID: 593 RVA: 0x0000A445 File Offset: 0x00008645
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(ListValue other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.values_.Add(other.values_);
|
||||
}
|
||||
|
||||
// Token: 0x06000252 RID: 594 RVA: 0x0000A45C File Offset: 0x0000865C
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 10U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.values_.AddEntriesFrom(input, ListValue._repeated_values_codec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040000A4 RID: 164
|
||||
private static readonly MessageParser<ListValue> _parser = new MessageParser<ListValue>(() => new ListValue());
|
||||
|
||||
// Token: 0x040000A5 RID: 165
|
||||
public const int ValuesFieldNumber = 1;
|
||||
|
||||
// Token: 0x040000A6 RID: 166
|
||||
private static readonly FieldCodec<Value> _repeated_values_codec = FieldCodec.ForMessage<Value>(10U, Value.Parser);
|
||||
|
||||
// Token: 0x040000A7 RID: 167
|
||||
private readonly RepeatedField<Value> values_ = new RepeatedField<Value>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,440 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Collections;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x0200001D RID: 29
|
||||
public sealed class Method : IMessage<Method>, IMessage, IEquatable<Method>, IDeepCloneable<Method>
|
||||
{
|
||||
// Token: 0x1700003A RID: 58
|
||||
// (get) Token: 0x06000188 RID: 392 RVA: 0x0000863E File Offset: 0x0000683E
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<Method> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return Method._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700003B RID: 59
|
||||
// (get) Token: 0x06000189 RID: 393 RVA: 0x00008645 File Offset: 0x00006845
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return ApiReflection.Descriptor.MessageTypes[1];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700003C RID: 60
|
||||
// (get) Token: 0x0600018A RID: 394 RVA: 0x00008657 File Offset: 0x00006857
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return Method.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600018B RID: 395 RVA: 0x0000865E File Offset: 0x0000685E
|
||||
[DebuggerNonUserCode]
|
||||
public Method()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600018C RID: 396 RVA: 0x00008694 File Offset: 0x00006894
|
||||
[DebuggerNonUserCode]
|
||||
public Method(Method other)
|
||||
: this()
|
||||
{
|
||||
this.name_ = other.name_;
|
||||
this.requestTypeUrl_ = other.requestTypeUrl_;
|
||||
this.requestStreaming_ = other.requestStreaming_;
|
||||
this.responseTypeUrl_ = other.responseTypeUrl_;
|
||||
this.responseStreaming_ = other.responseStreaming_;
|
||||
this.options_ = other.options_.Clone();
|
||||
this.syntax_ = other.syntax_;
|
||||
}
|
||||
|
||||
// Token: 0x0600018D RID: 397 RVA: 0x00008700 File Offset: 0x00006900
|
||||
[DebuggerNonUserCode]
|
||||
public Method Clone()
|
||||
{
|
||||
return new Method(this);
|
||||
}
|
||||
|
||||
// Token: 0x1700003D RID: 61
|
||||
// (get) Token: 0x0600018E RID: 398 RVA: 0x00008708 File Offset: 0x00006908
|
||||
// (set) Token: 0x0600018F RID: 399 RVA: 0x00008710 File Offset: 0x00006910
|
||||
[DebuggerNonUserCode]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.name_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700003E RID: 62
|
||||
// (get) Token: 0x06000190 RID: 400 RVA: 0x00008723 File Offset: 0x00006923
|
||||
// (set) Token: 0x06000191 RID: 401 RVA: 0x0000872B File Offset: 0x0000692B
|
||||
[DebuggerNonUserCode]
|
||||
public string RequestTypeUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.requestTypeUrl_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.requestTypeUrl_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700003F RID: 63
|
||||
// (get) Token: 0x06000192 RID: 402 RVA: 0x0000873E File Offset: 0x0000693E
|
||||
// (set) Token: 0x06000193 RID: 403 RVA: 0x00008746 File Offset: 0x00006946
|
||||
[DebuggerNonUserCode]
|
||||
public bool RequestStreaming
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.requestStreaming_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.requestStreaming_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000040 RID: 64
|
||||
// (get) Token: 0x06000194 RID: 404 RVA: 0x0000874F File Offset: 0x0000694F
|
||||
// (set) Token: 0x06000195 RID: 405 RVA: 0x00008757 File Offset: 0x00006957
|
||||
[DebuggerNonUserCode]
|
||||
public string ResponseTypeUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.responseTypeUrl_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.responseTypeUrl_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000041 RID: 65
|
||||
// (get) Token: 0x06000196 RID: 406 RVA: 0x0000876A File Offset: 0x0000696A
|
||||
// (set) Token: 0x06000197 RID: 407 RVA: 0x00008772 File Offset: 0x00006972
|
||||
[DebuggerNonUserCode]
|
||||
public bool ResponseStreaming
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.responseStreaming_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.responseStreaming_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000042 RID: 66
|
||||
// (get) Token: 0x06000198 RID: 408 RVA: 0x0000877B File Offset: 0x0000697B
|
||||
[DebuggerNonUserCode]
|
||||
public RepeatedField<Option> Options
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.options_;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000043 RID: 67
|
||||
// (get) Token: 0x06000199 RID: 409 RVA: 0x00008783 File Offset: 0x00006983
|
||||
// (set) Token: 0x0600019A RID: 410 RVA: 0x0000878B File Offset: 0x0000698B
|
||||
[DebuggerNonUserCode]
|
||||
public Syntax Syntax
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.syntax_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.syntax_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600019B RID: 411 RVA: 0x00008794 File Offset: 0x00006994
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as Method);
|
||||
}
|
||||
|
||||
// Token: 0x0600019C RID: 412 RVA: 0x000087A4 File Offset: 0x000069A4
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(Method other)
|
||||
{
|
||||
return other != null && (other == this || (!(this.Name != other.Name) && !(this.RequestTypeUrl != other.RequestTypeUrl) && this.RequestStreaming == other.RequestStreaming && !(this.ResponseTypeUrl != other.ResponseTypeUrl) && this.ResponseStreaming == other.ResponseStreaming && this.options_.Equals(other.options_) && this.Syntax == other.Syntax));
|
||||
}
|
||||
|
||||
// Token: 0x0600019D RID: 413 RVA: 0x00008844 File Offset: 0x00006A44
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
num ^= this.Name.GetHashCode();
|
||||
}
|
||||
if (this.RequestTypeUrl.Length != 0)
|
||||
{
|
||||
num ^= this.RequestTypeUrl.GetHashCode();
|
||||
}
|
||||
if (this.RequestStreaming)
|
||||
{
|
||||
num ^= this.RequestStreaming.GetHashCode();
|
||||
}
|
||||
if (this.ResponseTypeUrl.Length != 0)
|
||||
{
|
||||
num ^= this.ResponseTypeUrl.GetHashCode();
|
||||
}
|
||||
if (this.ResponseStreaming)
|
||||
{
|
||||
num ^= this.ResponseStreaming.GetHashCode();
|
||||
}
|
||||
num ^= this.options_.GetHashCode();
|
||||
if (this.Syntax != Syntax.Proto2)
|
||||
{
|
||||
num ^= this.Syntax.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0600019E RID: 414 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x0600019F RID: 415 RVA: 0x00008904 File Offset: 0x00006B04
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(this.Name);
|
||||
}
|
||||
if (this.RequestTypeUrl.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(18);
|
||||
output.WriteString(this.RequestTypeUrl);
|
||||
}
|
||||
if (this.RequestStreaming)
|
||||
{
|
||||
output.WriteRawTag(24);
|
||||
output.WriteBool(this.RequestStreaming);
|
||||
}
|
||||
if (this.ResponseTypeUrl.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(34);
|
||||
output.WriteString(this.ResponseTypeUrl);
|
||||
}
|
||||
if (this.ResponseStreaming)
|
||||
{
|
||||
output.WriteRawTag(40);
|
||||
output.WriteBool(this.ResponseStreaming);
|
||||
}
|
||||
this.options_.WriteTo(output, Method._repeated_options_codec);
|
||||
if (this.Syntax != Syntax.Proto2)
|
||||
{
|
||||
output.WriteRawTag(56);
|
||||
output.WriteEnum((int)this.Syntax);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001A0 RID: 416 RVA: 0x000089DC File Offset: 0x00006BDC
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.Name);
|
||||
}
|
||||
if (this.RequestTypeUrl.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.RequestTypeUrl);
|
||||
}
|
||||
if (this.RequestStreaming)
|
||||
{
|
||||
num += 2;
|
||||
}
|
||||
if (this.ResponseTypeUrl.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.ResponseTypeUrl);
|
||||
}
|
||||
if (this.ResponseStreaming)
|
||||
{
|
||||
num += 2;
|
||||
}
|
||||
num += this.options_.CalculateSize(Method._repeated_options_codec);
|
||||
if (this.Syntax != Syntax.Proto2)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Syntax);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x060001A1 RID: 417 RVA: 0x00008A88 File Offset: 0x00006C88
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(Method other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Name.Length != 0)
|
||||
{
|
||||
this.Name = other.Name;
|
||||
}
|
||||
if (other.RequestTypeUrl.Length != 0)
|
||||
{
|
||||
this.RequestTypeUrl = other.RequestTypeUrl;
|
||||
}
|
||||
if (other.RequestStreaming)
|
||||
{
|
||||
this.RequestStreaming = other.RequestStreaming;
|
||||
}
|
||||
if (other.ResponseTypeUrl.Length != 0)
|
||||
{
|
||||
this.ResponseTypeUrl = other.ResponseTypeUrl;
|
||||
}
|
||||
if (other.ResponseStreaming)
|
||||
{
|
||||
this.ResponseStreaming = other.ResponseStreaming;
|
||||
}
|
||||
this.options_.Add(other.options_);
|
||||
if (other.Syntax != Syntax.Proto2)
|
||||
{
|
||||
this.Syntax = other.Syntax;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001A2 RID: 418 RVA: 0x00008B34 File Offset: 0x00006D34
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num <= 24U)
|
||||
{
|
||||
if (num == 10U)
|
||||
{
|
||||
this.Name = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
if (num == 18U)
|
||||
{
|
||||
this.RequestTypeUrl = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
if (num == 24U)
|
||||
{
|
||||
this.RequestStreaming = input.ReadBool();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (num <= 40U)
|
||||
{
|
||||
if (num == 34U)
|
||||
{
|
||||
this.ResponseTypeUrl = input.ReadString();
|
||||
continue;
|
||||
}
|
||||
if (num == 40U)
|
||||
{
|
||||
this.ResponseStreaming = input.ReadBool();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num == 50U)
|
||||
{
|
||||
this.options_.AddEntriesFrom(input, Method._repeated_options_codec);
|
||||
continue;
|
||||
}
|
||||
if (num == 56U)
|
||||
{
|
||||
this.syntax_ = (Syntax)input.ReadEnum();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
input.SkipLastField();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000068 RID: 104
|
||||
private static readonly MessageParser<Method> _parser = new MessageParser<Method>(() => new Method());
|
||||
|
||||
// Token: 0x04000069 RID: 105
|
||||
public const int NameFieldNumber = 1;
|
||||
|
||||
// Token: 0x0400006A RID: 106
|
||||
private string name_ = "";
|
||||
|
||||
// Token: 0x0400006B RID: 107
|
||||
public const int RequestTypeUrlFieldNumber = 2;
|
||||
|
||||
// Token: 0x0400006C RID: 108
|
||||
private string requestTypeUrl_ = "";
|
||||
|
||||
// Token: 0x0400006D RID: 109
|
||||
public const int RequestStreamingFieldNumber = 3;
|
||||
|
||||
// Token: 0x0400006E RID: 110
|
||||
private bool requestStreaming_;
|
||||
|
||||
// Token: 0x0400006F RID: 111
|
||||
public const int ResponseTypeUrlFieldNumber = 4;
|
||||
|
||||
// Token: 0x04000070 RID: 112
|
||||
private string responseTypeUrl_ = "";
|
||||
|
||||
// Token: 0x04000071 RID: 113
|
||||
public const int ResponseStreamingFieldNumber = 5;
|
||||
|
||||
// Token: 0x04000072 RID: 114
|
||||
private bool responseStreaming_;
|
||||
|
||||
// Token: 0x04000073 RID: 115
|
||||
public const int OptionsFieldNumber = 6;
|
||||
|
||||
// Token: 0x04000074 RID: 116
|
||||
private static readonly FieldCodec<Option> _repeated_options_codec = FieldCodec.ForMessage<Option>(50U, Option.Parser);
|
||||
|
||||
// Token: 0x04000075 RID: 117
|
||||
private readonly RepeatedField<Option> options_ = new RepeatedField<Option>();
|
||||
|
||||
// Token: 0x04000076 RID: 118
|
||||
public const int SyntaxFieldNumber = 7;
|
||||
|
||||
// Token: 0x04000077 RID: 119
|
||||
private Syntax syntax_;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,224 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x0200001E RID: 30
|
||||
public sealed class Mixin : IMessage<Mixin>, IMessage, IEquatable<Mixin>, IDeepCloneable<Mixin>
|
||||
{
|
||||
// Token: 0x17000044 RID: 68
|
||||
// (get) Token: 0x060001A4 RID: 420 RVA: 0x00008C1E File Offset: 0x00006E1E
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<Mixin> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return Mixin._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000045 RID: 69
|
||||
// (get) Token: 0x060001A5 RID: 421 RVA: 0x00008C25 File Offset: 0x00006E25
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return ApiReflection.Descriptor.MessageTypes[2];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000046 RID: 70
|
||||
// (get) Token: 0x060001A6 RID: 422 RVA: 0x00008C37 File Offset: 0x00006E37
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return Mixin.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001A7 RID: 423 RVA: 0x00008C3E File Offset: 0x00006E3E
|
||||
[DebuggerNonUserCode]
|
||||
public Mixin()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060001A8 RID: 424 RVA: 0x00008C5C File Offset: 0x00006E5C
|
||||
[DebuggerNonUserCode]
|
||||
public Mixin(Mixin other)
|
||||
: this()
|
||||
{
|
||||
this.name_ = other.name_;
|
||||
this.root_ = other.root_;
|
||||
}
|
||||
|
||||
// Token: 0x060001A9 RID: 425 RVA: 0x00008C7C File Offset: 0x00006E7C
|
||||
[DebuggerNonUserCode]
|
||||
public Mixin Clone()
|
||||
{
|
||||
return new Mixin(this);
|
||||
}
|
||||
|
||||
// Token: 0x17000047 RID: 71
|
||||
// (get) Token: 0x060001AA RID: 426 RVA: 0x00008C84 File Offset: 0x00006E84
|
||||
// (set) Token: 0x060001AB RID: 427 RVA: 0x00008C8C File Offset: 0x00006E8C
|
||||
[DebuggerNonUserCode]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.name_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000048 RID: 72
|
||||
// (get) Token: 0x060001AC RID: 428 RVA: 0x00008C9F File Offset: 0x00006E9F
|
||||
// (set) Token: 0x060001AD RID: 429 RVA: 0x00008CA7 File Offset: 0x00006EA7
|
||||
[DebuggerNonUserCode]
|
||||
public string Root
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.root_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.root_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001AE RID: 430 RVA: 0x00008CBA File Offset: 0x00006EBA
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as Mixin);
|
||||
}
|
||||
|
||||
// Token: 0x060001AF RID: 431 RVA: 0x00008CC8 File Offset: 0x00006EC8
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(Mixin other)
|
||||
{
|
||||
return other != null && (other == this || (!(this.Name != other.Name) && !(this.Root != other.Root)));
|
||||
}
|
||||
|
||||
// Token: 0x060001B0 RID: 432 RVA: 0x00008D00 File Offset: 0x00006F00
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
num ^= this.Name.GetHashCode();
|
||||
}
|
||||
if (this.Root.Length != 0)
|
||||
{
|
||||
num ^= this.Root.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x060001B1 RID: 433 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x060001B2 RID: 434 RVA: 0x00008D48 File Offset: 0x00006F48
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(this.Name);
|
||||
}
|
||||
if (this.Root.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(18);
|
||||
output.WriteString(this.Root);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001B3 RID: 435 RVA: 0x00008D98 File Offset: 0x00006F98
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.Name);
|
||||
}
|
||||
if (this.Root.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.Root);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x060001B4 RID: 436 RVA: 0x00008DE2 File Offset: 0x00006FE2
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(Mixin other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Name.Length != 0)
|
||||
{
|
||||
this.Name = other.Name;
|
||||
}
|
||||
if (other.Root.Length != 0)
|
||||
{
|
||||
this.Root = other.Root;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001B5 RID: 437 RVA: 0x00008E1C File Offset: 0x0000701C
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 10U)
|
||||
{
|
||||
if (num != 18U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Root = input.ReadString();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Name = input.ReadString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000078 RID: 120
|
||||
private static readonly MessageParser<Mixin> _parser = new MessageParser<Mixin>(() => new Mixin());
|
||||
|
||||
// Token: 0x04000079 RID: 121
|
||||
public const int NameFieldNumber = 1;
|
||||
|
||||
// Token: 0x0400007A RID: 122
|
||||
private string name_ = "";
|
||||
|
||||
// Token: 0x0400007B RID: 123
|
||||
public const int RootFieldNumber = 2;
|
||||
|
||||
// Token: 0x0400007C RID: 124
|
||||
private string root_ = "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x02000028 RID: 40
|
||||
public enum NullValue
|
||||
{
|
||||
// Token: 0x04000096 RID: 150
|
||||
[OriginalName("NULL_VALUE")]
|
||||
NullValue
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,232 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x02000035 RID: 53
|
||||
public sealed class Option : IMessage<Option>, IMessage, IEquatable<Option>, IDeepCloneable<Option>
|
||||
{
|
||||
// Token: 0x1700009B RID: 155
|
||||
// (get) Token: 0x060002DE RID: 734 RVA: 0x0000C22A File Offset: 0x0000A42A
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<Option> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return Option._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700009C RID: 156
|
||||
// (get) Token: 0x060002DF RID: 735 RVA: 0x0000C231 File Offset: 0x0000A431
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return TypeReflection.Descriptor.MessageTypes[4];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700009D RID: 157
|
||||
// (get) Token: 0x060002E0 RID: 736 RVA: 0x0000C243 File Offset: 0x0000A443
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return Option.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060002E1 RID: 737 RVA: 0x0000C24A File Offset: 0x0000A44A
|
||||
[DebuggerNonUserCode]
|
||||
public Option()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060002E2 RID: 738 RVA: 0x0000C25D File Offset: 0x0000A45D
|
||||
[DebuggerNonUserCode]
|
||||
public Option(Option other)
|
||||
: this()
|
||||
{
|
||||
this.name_ = other.name_;
|
||||
this.Value = ((other.value_ != null) ? other.Value.Clone() : null);
|
||||
}
|
||||
|
||||
// Token: 0x060002E3 RID: 739 RVA: 0x0000C28D File Offset: 0x0000A48D
|
||||
[DebuggerNonUserCode]
|
||||
public Option Clone()
|
||||
{
|
||||
return new Option(this);
|
||||
}
|
||||
|
||||
// Token: 0x1700009E RID: 158
|
||||
// (get) Token: 0x060002E4 RID: 740 RVA: 0x0000C295 File Offset: 0x0000A495
|
||||
// (set) Token: 0x060002E5 RID: 741 RVA: 0x0000C29D File Offset: 0x0000A49D
|
||||
[DebuggerNonUserCode]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.name_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700009F RID: 159
|
||||
// (get) Token: 0x060002E6 RID: 742 RVA: 0x0000C2B0 File Offset: 0x0000A4B0
|
||||
// (set) Token: 0x060002E7 RID: 743 RVA: 0x0000C2B8 File Offset: 0x0000A4B8
|
||||
[DebuggerNonUserCode]
|
||||
public Any Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.value_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.value_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060002E8 RID: 744 RVA: 0x0000C2C1 File Offset: 0x0000A4C1
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as Option);
|
||||
}
|
||||
|
||||
// Token: 0x060002E9 RID: 745 RVA: 0x0000C2CF File Offset: 0x0000A4CF
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(Option other)
|
||||
{
|
||||
return other != null && (other == this || (!(this.Name != other.Name) && object.Equals(this.Value, other.Value)));
|
||||
}
|
||||
|
||||
// Token: 0x060002EA RID: 746 RVA: 0x0000C308 File Offset: 0x0000A508
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
num ^= this.Name.GetHashCode();
|
||||
}
|
||||
if (this.value_ != null)
|
||||
{
|
||||
num ^= this.Value.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x060002EB RID: 747 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x060002EC RID: 748 RVA: 0x0000C349 File Offset: 0x0000A549
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(this.Name);
|
||||
}
|
||||
if (this.value_ != null)
|
||||
{
|
||||
output.WriteRawTag(18);
|
||||
output.WriteMessage(this.Value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060002ED RID: 749 RVA: 0x0000C388 File Offset: 0x0000A588
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Name.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.Name);
|
||||
}
|
||||
if (this.value_ != null)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeMessageSize(this.Value);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x060002EE RID: 750 RVA: 0x0000C3D0 File Offset: 0x0000A5D0
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(Option other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Name.Length != 0)
|
||||
{
|
||||
this.Name = other.Name;
|
||||
}
|
||||
if (other.value_ != null)
|
||||
{
|
||||
if (this.value_ == null)
|
||||
{
|
||||
this.value_ = new Any();
|
||||
}
|
||||
this.Value.MergeFrom(other.Value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060002EF RID: 751 RVA: 0x0000C428 File Offset: 0x0000A628
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 10U)
|
||||
{
|
||||
if (num != 18U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.value_ == null)
|
||||
{
|
||||
this.value_ = new Any();
|
||||
}
|
||||
input.ReadMessage(this.value_);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Name = input.ReadString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040000F2 RID: 242
|
||||
private static readonly MessageParser<Option> _parser = new MessageParser<Option>(() => new Option());
|
||||
|
||||
// Token: 0x040000F3 RID: 243
|
||||
public const int NameFieldNumber = 1;
|
||||
|
||||
// Token: 0x040000F4 RID: 244
|
||||
private string name_ = "";
|
||||
|
||||
// Token: 0x040000F5 RID: 245
|
||||
public const int ValueFieldNumber = 2;
|
||||
|
||||
// Token: 0x040000F6 RID: 246
|
||||
private Any value_;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x02000026 RID: 38
|
||||
public sealed class SourceContext : IMessage<SourceContext>, IMessage, IEquatable<SourceContext>, IDeepCloneable<SourceContext>
|
||||
{
|
||||
// Token: 0x17000059 RID: 89
|
||||
// (get) Token: 0x060001FE RID: 510 RVA: 0x00009879 File Offset: 0x00007A79
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<SourceContext> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return SourceContext._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700005A RID: 90
|
||||
// (get) Token: 0x060001FF RID: 511 RVA: 0x00009880 File Offset: 0x00007A80
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return SourceContextReflection.Descriptor.MessageTypes[0];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700005B RID: 91
|
||||
// (get) Token: 0x06000200 RID: 512 RVA: 0x00009892 File Offset: 0x00007A92
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return SourceContext.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000201 RID: 513 RVA: 0x00009899 File Offset: 0x00007A99
|
||||
[DebuggerNonUserCode]
|
||||
public SourceContext()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000202 RID: 514 RVA: 0x000098AC File Offset: 0x00007AAC
|
||||
[DebuggerNonUserCode]
|
||||
public SourceContext(SourceContext other)
|
||||
: this()
|
||||
{
|
||||
this.fileName_ = other.fileName_;
|
||||
}
|
||||
|
||||
// Token: 0x06000203 RID: 515 RVA: 0x000098C0 File Offset: 0x00007AC0
|
||||
[DebuggerNonUserCode]
|
||||
public SourceContext Clone()
|
||||
{
|
||||
return new SourceContext(this);
|
||||
}
|
||||
|
||||
// Token: 0x1700005C RID: 92
|
||||
// (get) Token: 0x06000204 RID: 516 RVA: 0x000098C8 File Offset: 0x00007AC8
|
||||
// (set) Token: 0x06000205 RID: 517 RVA: 0x000098D0 File Offset: 0x00007AD0
|
||||
[DebuggerNonUserCode]
|
||||
public string FileName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.fileName_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.fileName_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000206 RID: 518 RVA: 0x000098E3 File Offset: 0x00007AE3
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as SourceContext);
|
||||
}
|
||||
|
||||
// Token: 0x06000207 RID: 519 RVA: 0x000098F1 File Offset: 0x00007AF1
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(SourceContext other)
|
||||
{
|
||||
return other != null && (other == this || !(this.FileName != other.FileName));
|
||||
}
|
||||
|
||||
// Token: 0x06000208 RID: 520 RVA: 0x00009914 File Offset: 0x00007B14
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.FileName.Length != 0)
|
||||
{
|
||||
num ^= this.FileName.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000209 RID: 521 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x0600020A RID: 522 RVA: 0x0000993F File Offset: 0x00007B3F
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.FileName.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(this.FileName);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600020B RID: 523 RVA: 0x00009964 File Offset: 0x00007B64
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.FileName.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.FileName);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0600020C RID: 524 RVA: 0x00009991 File Offset: 0x00007B91
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(SourceContext other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.FileName.Length != 0)
|
||||
{
|
||||
this.FileName = other.FileName;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600020D RID: 525 RVA: 0x000099B0 File Offset: 0x00007BB0
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 10U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.FileName = input.ReadString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000091 RID: 145
|
||||
private static readonly MessageParser<SourceContext> _parser = new MessageParser<SourceContext>(() => new SourceContext());
|
||||
|
||||
// Token: 0x04000092 RID: 146
|
||||
public const int FileNameFieldNumber = 1;
|
||||
|
||||
// Token: 0x04000093 RID: 147
|
||||
private string fileName_ = "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x02000025 RID: 37
|
||||
public static class SourceContextReflection
|
||||
{
|
||||
// Token: 0x17000058 RID: 88
|
||||
// (get) Token: 0x060001FC RID: 508 RVA: 0x000097E7 File Offset: 0x000079E7
|
||||
public static FileDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return SourceContextReflection.descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000090 RID: 144
|
||||
private static FileDescriptor descriptor = FileDescriptor.FromGeneratedCode(Convert.FromBase64String(string.Concat(new string[] { "CiRnb29nbGUvcHJvdG9idWYvc291cmNlX2NvbnRleHQucHJvdG8SD2dvb2ds", "ZS5wcm90b2J1ZiIiCg1Tb3VyY2VDb250ZXh0EhEKCWZpbGVfbmFtZRgBIAEo", "CUJSChNjb20uZ29vZ2xlLnByb3RvYnVmQhJTb3VyY2VDb250ZXh0UHJvdG9Q", "AaICA0dQQqoCHkdvb2dsZS5Qcm90b2J1Zi5XZWxsS25vd25UeXBlc2IGcHJv", "dG8z" })), new FileDescriptor[0], new GeneratedClrTypeInfo(null, new GeneratedClrTypeInfo[]
|
||||
{
|
||||
new GeneratedClrTypeInfo(typeof(SourceContext), SourceContext.Parser, new string[] { "FileName" }, null, null, null)
|
||||
}));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Google.Protobuf.Reflection;
|
||||
|
||||
namespace Google.Protobuf.WellKnownTypes
|
||||
{
|
||||
// Token: 0x0200003E RID: 62
|
||||
public sealed class StringValue : IMessage<StringValue>, IMessage, IEquatable<StringValue>, IDeepCloneable<StringValue>
|
||||
{
|
||||
// Token: 0x170000BD RID: 189
|
||||
// (get) Token: 0x0600036A RID: 874 RVA: 0x0000CFFD File Offset: 0x0000B1FD
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageParser<StringValue> Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return StringValue._parser;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000BE RID: 190
|
||||
// (get) Token: 0x0600036B RID: 875 RVA: 0x0000D004 File Offset: 0x0000B204
|
||||
[DebuggerNonUserCode]
|
||||
public static MessageDescriptor Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return WrappersReflection.Descriptor.MessageTypes[7];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000BF RID: 191
|
||||
// (get) Token: 0x0600036C RID: 876 RVA: 0x0000D016 File Offset: 0x0000B216
|
||||
[DebuggerNonUserCode]
|
||||
MessageDescriptor IMessage.Descriptor
|
||||
{
|
||||
get
|
||||
{
|
||||
return StringValue.Descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600036D RID: 877 RVA: 0x0000D01D File Offset: 0x0000B21D
|
||||
[DebuggerNonUserCode]
|
||||
public StringValue()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600036E RID: 878 RVA: 0x0000D030 File Offset: 0x0000B230
|
||||
[DebuggerNonUserCode]
|
||||
public StringValue(StringValue other)
|
||||
: this()
|
||||
{
|
||||
this.value_ = other.value_;
|
||||
}
|
||||
|
||||
// Token: 0x0600036F RID: 879 RVA: 0x0000D044 File Offset: 0x0000B244
|
||||
[DebuggerNonUserCode]
|
||||
public StringValue Clone()
|
||||
{
|
||||
return new StringValue(this);
|
||||
}
|
||||
|
||||
// Token: 0x170000C0 RID: 192
|
||||
// (get) Token: 0x06000370 RID: 880 RVA: 0x0000D04C File Offset: 0x0000B24C
|
||||
// (set) Token: 0x06000371 RID: 881 RVA: 0x0000D054 File Offset: 0x0000B254
|
||||
[DebuggerNonUserCode]
|
||||
public string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.value_;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.value_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000372 RID: 882 RVA: 0x0000D067 File Offset: 0x0000B267
|
||||
[DebuggerNonUserCode]
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return this.Equals(other as StringValue);
|
||||
}
|
||||
|
||||
// Token: 0x06000373 RID: 883 RVA: 0x0000D075 File Offset: 0x0000B275
|
||||
[DebuggerNonUserCode]
|
||||
public bool Equals(StringValue other)
|
||||
{
|
||||
return other != null && (other == this || !(this.Value != other.Value));
|
||||
}
|
||||
|
||||
// Token: 0x06000374 RID: 884 RVA: 0x0000D098 File Offset: 0x0000B298
|
||||
[DebuggerNonUserCode]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 1;
|
||||
if (this.Value.Length != 0)
|
||||
{
|
||||
num ^= this.Value.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000375 RID: 885 RVA: 0x00007C02 File Offset: 0x00005E02
|
||||
[DebuggerNonUserCode]
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
// Token: 0x06000376 RID: 886 RVA: 0x0000D0C3 File Offset: 0x0000B2C3
|
||||
[DebuggerNonUserCode]
|
||||
public void WriteTo(CodedOutputStream output)
|
||||
{
|
||||
if (this.Value.Length != 0)
|
||||
{
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(this.Value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000377 RID: 887 RVA: 0x0000D0E8 File Offset: 0x0000B2E8
|
||||
[DebuggerNonUserCode]
|
||||
public int CalculateSize()
|
||||
{
|
||||
int num = 0;
|
||||
if (this.Value.Length != 0)
|
||||
{
|
||||
num += 1 + CodedOutputStream.ComputeStringSize(this.Value);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000378 RID: 888 RVA: 0x0000D115 File Offset: 0x0000B315
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(StringValue other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.Value.Length != 0)
|
||||
{
|
||||
this.Value = other.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000379 RID: 889 RVA: 0x0000D134 File Offset: 0x0000B334
|
||||
[DebuggerNonUserCode]
|
||||
public void MergeFrom(CodedInputStream input)
|
||||
{
|
||||
uint num;
|
||||
while ((num = input.ReadTag()) != 0U)
|
||||
{
|
||||
if (num != 10U)
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Value = input.ReadString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400010E RID: 270
|
||||
private static readonly MessageParser<StringValue> _parser = new MessageParser<StringValue>(() => new StringValue());
|
||||
|
||||
// Token: 0x0400010F RID: 271
|
||||
public const int ValueFieldNumber = 1;
|
||||
|
||||
// Token: 0x04000110 RID: 272
|
||||
private string value_ = "";
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user