예제 #1
0
 public override void AddMethod <TRequest, TResponse>(Method <TRequest, TResponse> method, ServerStreamingServerMethod <TRequest, TResponse> handler)
 {
     if (TryGetMethodDescriptor(method.Name, out var methodDescriptor) &&
         ServiceDescriptorHelpers.TryGetHttpRule(methodDescriptor, out _))
     {
         Log.StreamingMethodNotSupported(_logger, method.Name, typeof(TService));
     }
 }
예제 #2
0
 public override void AddMethod <TRequest, TResponse>(Method <TRequest, TResponse> method, UnaryServerMethod <TRequest, TResponse> handler)
 {
     if (TryGetMethodDescriptor(method.Name, out var methodDescriptor))
     {
         if (ServiceDescriptorHelpers.TryGetHttpRule(methodDescriptor, out var httpRule))
         {
             ProcessHttpRule(method, methodDescriptor, httpRule);
         }
         else
         {
             // Consider setting to enable mapping to methods without HttpRule
             // AddMethodCore(method, method.FullName, "GET", string.Empty, string.Empty, methodDescriptor);
         }
     }
     else
     {
         Log.MethodDescriptorNotFound(_logger, method.Name, typeof(TService));
     }
 }