Files
2026-06-04 11:42:34 +02:00

117 lines
2.9 KiB
C#

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;
}
}