瀏覽代碼

add IsClientStreaming and IsServerStreaming to MethodDescriptor

Jan Tattermusch 10 年之前
父節點
當前提交
fa29148137
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      csharp/src/Google.Protobuf/Reflection/MethodDescriptor.cs

+ 10 - 0
csharp/src/Google.Protobuf/Reflection/MethodDescriptor.cs

@@ -57,6 +57,16 @@ namespace Google.Protobuf.Reflection
         /// </value>
         /// </value>
         public MessageDescriptor OutputType { get { return outputType; } }
         public MessageDescriptor OutputType { get { return outputType; } }
 
 
+        /// <value>
+        /// Indicates if client streams multiple requests.
+        /// </value>
+        public bool IsClientStreaming { get { return proto.ClientStreaming; } }
+
+        /// <value>
+        /// Indicates if server streams multiple responses.
+        /// </value>
+        public bool IsServerStreaming { get { return proto.ServerStreaming; } }
+
         internal MethodDescriptor(MethodDescriptorProto proto, FileDescriptor file,
         internal MethodDescriptor(MethodDescriptorProto proto, FileDescriptor file,
                                   ServiceDescriptor parent, int index)
                                   ServiceDescriptor parent, int index)
             : base(file, parent.FullName + "." + proto.Name, index)
             : base(file, parent.FullName + "." + proto.Name, index)