|
|
|
@ -539,19 +539,20 @@ namespace Grpc.Testing { |
|
|
|
|
.AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary>Register service method with a service binder without implementation. Useful when customizing the service binding logic. |
|
|
|
|
/// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic. |
|
|
|
|
/// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary> |
|
|
|
|
/// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param> |
|
|
|
|
public static void BindService(grpc::ServiceBinderBase serviceBinder) |
|
|
|
|
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param> |
|
|
|
|
public static void BindService(grpc::ServiceBinderBase serviceBinder, TestServiceBase serviceImpl) |
|
|
|
|
{ |
|
|
|
|
serviceBinder.AddMethod(__Method_EmptyCall); |
|
|
|
|
serviceBinder.AddMethod(__Method_UnaryCall); |
|
|
|
|
serviceBinder.AddMethod(__Method_CacheableUnaryCall); |
|
|
|
|
serviceBinder.AddMethod(__Method_StreamingOutputCall); |
|
|
|
|
serviceBinder.AddMethod(__Method_StreamingInputCall); |
|
|
|
|
serviceBinder.AddMethod(__Method_FullDuplexCall); |
|
|
|
|
serviceBinder.AddMethod(__Method_HalfDuplexCall); |
|
|
|
|
serviceBinder.AddMethod(__Method_UnimplementedCall); |
|
|
|
|
serviceBinder.AddMethod(__Method_EmptyCall, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(serviceImpl.EmptyCall)); |
|
|
|
|
serviceBinder.AddMethod(__Method_UnaryCall, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>(serviceImpl.UnaryCall)); |
|
|
|
|
serviceBinder.AddMethod(__Method_CacheableUnaryCall, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>(serviceImpl.CacheableUnaryCall)); |
|
|
|
|
serviceBinder.AddMethod(__Method_StreamingOutputCall, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>(serviceImpl.StreamingOutputCall)); |
|
|
|
|
serviceBinder.AddMethod(__Method_StreamingInputCall, serviceImpl == null ? null : new grpc::ClientStreamingServerMethod<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse>(serviceImpl.StreamingInputCall)); |
|
|
|
|
serviceBinder.AddMethod(__Method_FullDuplexCall, serviceImpl == null ? null : new grpc::DuplexStreamingServerMethod<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>(serviceImpl.FullDuplexCall)); |
|
|
|
|
serviceBinder.AddMethod(__Method_HalfDuplexCall, serviceImpl == null ? null : new grpc::DuplexStreamingServerMethod<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>(serviceImpl.HalfDuplexCall)); |
|
|
|
|
serviceBinder.AddMethod(__Method_UnimplementedCall, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(serviceImpl.UnimplementedCall)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -676,12 +677,13 @@ namespace Grpc.Testing { |
|
|
|
|
.AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary>Register service method with a service binder without implementation. Useful when customizing the service binding logic. |
|
|
|
|
/// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic. |
|
|
|
|
/// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary> |
|
|
|
|
/// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param> |
|
|
|
|
public static void BindService(grpc::ServiceBinderBase serviceBinder) |
|
|
|
|
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param> |
|
|
|
|
public static void BindService(grpc::ServiceBinderBase serviceBinder, UnimplementedServiceBase serviceImpl) |
|
|
|
|
{ |
|
|
|
|
serviceBinder.AddMethod(__Method_UnimplementedCall); |
|
|
|
|
serviceBinder.AddMethod(__Method_UnimplementedCall, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(serviceImpl.UnimplementedCall)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -802,13 +804,14 @@ namespace Grpc.Testing { |
|
|
|
|
.AddMethod(__Method_Stop, serviceImpl.Stop).Build(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary>Register service method with a service binder without implementation. Useful when customizing the service binding logic. |
|
|
|
|
/// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic. |
|
|
|
|
/// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary> |
|
|
|
|
/// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param> |
|
|
|
|
public static void BindService(grpc::ServiceBinderBase serviceBinder) |
|
|
|
|
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param> |
|
|
|
|
public static void BindService(grpc::ServiceBinderBase serviceBinder, ReconnectServiceBase serviceImpl) |
|
|
|
|
{ |
|
|
|
|
serviceBinder.AddMethod(__Method_Start); |
|
|
|
|
serviceBinder.AddMethod(__Method_Stop); |
|
|
|
|
serviceBinder.AddMethod(__Method_Start, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.ReconnectParams, global::Grpc.Testing.Empty>(serviceImpl.Start)); |
|
|
|
|
serviceBinder.AddMethod(__Method_Stop, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.Empty, global::Grpc.Testing.ReconnectInfo>(serviceImpl.Stop)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|