Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#region Copyright notice and license
#region Copyright notice and license

// Copyright 2019 The gRPC Authors
//
Expand Down Expand Up @@ -39,7 +39,7 @@ internal ProviderServiceBinder(ServiceMethodProviderContext<TService> context, T
_declaringType = declaringType;
}

public override void AddMethod<TRequest, TResponse>(Method<TRequest, TResponse> method, ClientStreamingServerMethod<TRequest, TResponse> handler)
public override void AddMethod<TRequest, TResponse>(Method<TRequest, TResponse> method, ClientStreamingServerMethod<TRequest, TResponse>? handler)
{
var (invoker, metadata) = CreateModelCore<ClientStreamingServerMethod<TService, TRequest, TResponse>>(
method.Name,
Expand All @@ -48,7 +48,7 @@ public override void AddMethod<TRequest, TResponse>(Method<TRequest, TResponse>
_context.AddClientStreamingMethod<TRequest, TResponse>(method, metadata, invoker);
}

public override void AddMethod<TRequest, TResponse>(Method<TRequest, TResponse> method, DuplexStreamingServerMethod<TRequest, TResponse> handler)
public override void AddMethod<TRequest, TResponse>(Method<TRequest, TResponse> method, DuplexStreamingServerMethod<TRequest, TResponse>? handler)
{
var (invoker, metadata) = CreateModelCore<DuplexStreamingServerMethod<TService, TRequest, TResponse>>(
method.Name,
Expand All @@ -57,7 +57,7 @@ public override void AddMethod<TRequest, TResponse>(Method<TRequest, TResponse>
_context.AddDuplexStreamingMethod<TRequest, TResponse>(method, metadata, invoker);
}

public override void AddMethod<TRequest, TResponse>(Method<TRequest, TResponse> method, ServerStreamingServerMethod<TRequest, TResponse> handler)
public override void AddMethod<TRequest, TResponse>(Method<TRequest, TResponse> method, ServerStreamingServerMethod<TRequest, TResponse>? handler)
{
var (invoker, metadata) = CreateModelCore<ServerStreamingServerMethod<TService, TRequest, TResponse>>(
method.Name,
Expand All @@ -66,7 +66,7 @@ public override void AddMethod<TRequest, TResponse>(Method<TRequest, TResponse>
_context.AddServerStreamingMethod<TRequest, TResponse>(method, metadata, invoker);
}

public override void AddMethod<TRequest, TResponse>(Method<TRequest, TResponse> method, UnaryServerMethod<TRequest, TResponse> handler)
public override void AddMethod<TRequest, TResponse>(Method<TRequest, TResponse> method, UnaryServerMethod<TRequest, TResponse>? handler)
{
var (invoker, metadata) = CreateModelCore<UnaryServerMethod<TService, TRequest, TResponse>>(
method.Name,
Expand Down
8 changes: 4 additions & 4 deletions src/Grpc.Core.Api/ServiceBinderBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class ServiceBinderBase
/// <param name="handler">The method handler.</param>
public virtual void AddMethod<TRequest, TResponse>(
Method<TRequest, TResponse> method,
UnaryServerMethod<TRequest, TResponse> handler)
UnaryServerMethod<TRequest, TResponse>? handler)
where TRequest : class
where TResponse : class
{
Expand All @@ -56,7 +56,7 @@ public virtual void AddMethod<TRequest, TResponse>(
/// <param name="handler">The method handler.</param>
public virtual void AddMethod<TRequest, TResponse>(
Method<TRequest, TResponse> method,
ClientStreamingServerMethod<TRequest, TResponse> handler)
ClientStreamingServerMethod<TRequest, TResponse>? handler)
where TRequest : class
where TResponse : class
{
Expand All @@ -72,7 +72,7 @@ public virtual void AddMethod<TRequest, TResponse>(
/// <param name="handler">The method handler.</param>
public virtual void AddMethod<TRequest, TResponse>(
Method<TRequest, TResponse> method,
ServerStreamingServerMethod<TRequest, TResponse> handler)
ServerStreamingServerMethod<TRequest, TResponse>? handler)
where TRequest : class
where TResponse : class
{
Expand All @@ -88,7 +88,7 @@ public virtual void AddMethod<TRequest, TResponse>(
/// <param name="handler">The method handler.</param>
public virtual void AddMethod<TRequest, TResponse>(
Method<TRequest, TResponse> method,
DuplexStreamingServerMethod<TRequest, TResponse> handler)
DuplexStreamingServerMethod<TRequest, TResponse>? handler)
where TRequest : class
where TResponse : class
{
Expand Down