160 lines
4.0 KiB
C#
160 lines
4.0 KiB
C#
using System;
|
|
using System.Diagnostics;
|
|
using Google.Protobuf.Collections;
|
|
using Google.Protobuf.Reflection;
|
|
|
|
namespace Google.Protobuf.WellKnownTypes
|
|
{
|
|
// Token: 0x02000029 RID: 41
|
|
public sealed class Struct : IMessage<Struct>, IMessage, IEquatable<Struct>, IDeepCloneable<Struct>
|
|
{
|
|
// Token: 0x1700005E RID: 94
|
|
// (get) Token: 0x06000211 RID: 529 RVA: 0x00009B84 File Offset: 0x00007D84
|
|
[DebuggerNonUserCode]
|
|
public static MessageParser<Struct> Parser
|
|
{
|
|
get
|
|
{
|
|
return Struct._parser;
|
|
}
|
|
}
|
|
|
|
// Token: 0x1700005F RID: 95
|
|
// (get) Token: 0x06000212 RID: 530 RVA: 0x00009B8B File Offset: 0x00007D8B
|
|
[DebuggerNonUserCode]
|
|
public static MessageDescriptor Descriptor
|
|
{
|
|
get
|
|
{
|
|
return StructReflection.Descriptor.MessageTypes[0];
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000060 RID: 96
|
|
// (get) Token: 0x06000213 RID: 531 RVA: 0x00009B9D File Offset: 0x00007D9D
|
|
[DebuggerNonUserCode]
|
|
MessageDescriptor IMessage.Descriptor
|
|
{
|
|
get
|
|
{
|
|
return Struct.Descriptor;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000214 RID: 532 RVA: 0x00009BA4 File Offset: 0x00007DA4
|
|
[DebuggerNonUserCode]
|
|
public Struct()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06000215 RID: 533 RVA: 0x00009BB7 File Offset: 0x00007DB7
|
|
[DebuggerNonUserCode]
|
|
public Struct(Struct other)
|
|
: this()
|
|
{
|
|
this.fields_ = other.fields_.Clone();
|
|
}
|
|
|
|
// Token: 0x06000216 RID: 534 RVA: 0x00009BD0 File Offset: 0x00007DD0
|
|
[DebuggerNonUserCode]
|
|
public Struct Clone()
|
|
{
|
|
return new Struct(this);
|
|
}
|
|
|
|
// Token: 0x17000061 RID: 97
|
|
// (get) Token: 0x06000217 RID: 535 RVA: 0x00009BD8 File Offset: 0x00007DD8
|
|
[DebuggerNonUserCode]
|
|
public MapField<string, Value> Fields
|
|
{
|
|
get
|
|
{
|
|
return this.fields_;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000218 RID: 536 RVA: 0x00009BE0 File Offset: 0x00007DE0
|
|
[DebuggerNonUserCode]
|
|
public override bool Equals(object other)
|
|
{
|
|
return this.Equals(other as Struct);
|
|
}
|
|
|
|
// Token: 0x06000219 RID: 537 RVA: 0x00009BEE File Offset: 0x00007DEE
|
|
[DebuggerNonUserCode]
|
|
public bool Equals(Struct other)
|
|
{
|
|
return other != null && (other == this || this.Fields.Equals(other.Fields));
|
|
}
|
|
|
|
// Token: 0x0600021A RID: 538 RVA: 0x00009C11 File Offset: 0x00007E11
|
|
[DebuggerNonUserCode]
|
|
public override int GetHashCode()
|
|
{
|
|
return 1 ^ this.Fields.GetHashCode();
|
|
}
|
|
|
|
// Token: 0x0600021B RID: 539 RVA: 0x00007C02 File Offset: 0x00005E02
|
|
[DebuggerNonUserCode]
|
|
public override string ToString()
|
|
{
|
|
return JsonFormatter.ToDiagnosticString(this);
|
|
}
|
|
|
|
// Token: 0x0600021C RID: 540 RVA: 0x00009C20 File Offset: 0x00007E20
|
|
[DebuggerNonUserCode]
|
|
public void WriteTo(CodedOutputStream output)
|
|
{
|
|
this.fields_.WriteTo(output, Struct._map_fields_codec);
|
|
}
|
|
|
|
// Token: 0x0600021D RID: 541 RVA: 0x00009C33 File Offset: 0x00007E33
|
|
[DebuggerNonUserCode]
|
|
public int CalculateSize()
|
|
{
|
|
return 0 + this.fields_.CalculateSize(Struct._map_fields_codec);
|
|
}
|
|
|
|
// Token: 0x0600021E RID: 542 RVA: 0x00009C47 File Offset: 0x00007E47
|
|
[DebuggerNonUserCode]
|
|
public void MergeFrom(Struct other)
|
|
{
|
|
if (other == null)
|
|
{
|
|
return;
|
|
}
|
|
this.fields_.Add(other.fields_);
|
|
}
|
|
|
|
// Token: 0x0600021F RID: 543 RVA: 0x00009C60 File Offset: 0x00007E60
|
|
[DebuggerNonUserCode]
|
|
public void MergeFrom(CodedInputStream input)
|
|
{
|
|
uint num;
|
|
while ((num = input.ReadTag()) != 0U)
|
|
{
|
|
if (num != 10U)
|
|
{
|
|
input.SkipLastField();
|
|
}
|
|
else
|
|
{
|
|
this.fields_.AddEntriesFrom(input, Struct._map_fields_codec);
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x04000097 RID: 151
|
|
private static readonly MessageParser<Struct> _parser = new MessageParser<Struct>(() => new Struct());
|
|
|
|
// Token: 0x04000098 RID: 152
|
|
public const int FieldsFieldNumber = 1;
|
|
|
|
// Token: 0x04000099 RID: 153
|
|
private static readonly MapField<string, Value>.Codec _map_fields_codec = new MapField<string, Value>.Codec(FieldCodec.ForString(10U), FieldCodec.ForMessage<Value>(18U, Value.Parser), 10U);
|
|
|
|
// Token: 0x0400009A RID: 154
|
|
private readonly MapField<string, Value> fields_ = new MapField<string, Value>();
|
|
}
|
|
}
|