265 lines
6.6 KiB
C#
265 lines
6.6 KiB
C#
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_;
|
|
}
|
|
}
|