414 lines
9.7 KiB
C#
414 lines
9.7 KiB
C#
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_;
|
|
}
|
|
}
|