From fa291481375df3d81fdc864f4b0cb9d068cb3324 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 29 Jul 2015 18:47:55 -0700 Subject: [PATCH] add IsClientStreaming and IsServerStreaming to MethodDescriptor --- .../src/Google.Protobuf/Reflection/MethodDescriptor.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/csharp/src/Google.Protobuf/Reflection/MethodDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/MethodDescriptor.cs index 0c9c69493..f9539f6cb 100644 --- a/csharp/src/Google.Protobuf/Reflection/MethodDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/MethodDescriptor.cs @@ -57,6 +57,16 @@ namespace Google.Protobuf.Reflection /// public MessageDescriptor OutputType { get { return outputType; } } + /// + /// Indicates if client streams multiple requests. + /// + public bool IsClientStreaming { get { return proto.ClientStreaming; } } + + /// + /// Indicates if server streams multiple responses. + /// + public bool IsServerStreaming { get { return proto.ServerStreaming; } } + internal MethodDescriptor(MethodDescriptorProto proto, FileDescriptor file, ServiceDescriptor parent, int index) : base(file, parent.FullName + "." + proto.Name, index)