Example #1
0
 /// <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>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static void BindService(grpc::ServiceBinderBase serviceBinder, RouteGuideBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_GetFeature, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Routeguide.Point, global::Routeguide.Feature>(serviceImpl.GetFeature));
     serviceBinder.AddMethod(__Method_ListFeatures, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod <global::Routeguide.Rectangle, global::Routeguide.Feature>(serviceImpl.ListFeatures));
     serviceBinder.AddMethod(__Method_RecordRoute, serviceImpl == null ? null : new grpc::ClientStreamingServerMethod <global::Routeguide.Point, global::Routeguide.RouteSummary>(serviceImpl.RecordRoute));
     serviceBinder.AddMethod(__Method_RouteChat, serviceImpl == null ? null : new grpc::DuplexStreamingServerMethod <global::Routeguide.RouteNote, global::Routeguide.RouteNote>(serviceImpl.RouteChat));
 }
 /// <summary>Creates service definition that can be registered with a server</summary>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static grpc::ServerServiceDefinition BindService(RouteGuideBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_GetFeature, serviceImpl.GetFeature)
            .AddMethod(__Method_ListFeatures, serviceImpl.ListFeatures)
            .AddMethod(__Method_RecordRoute, serviceImpl.RecordRoute)
            .AddMethod(__Method_RouteChat, serviceImpl.RouteChat).Build());
 }
Example #3
0
 /// <summary>Creates service definition that can be registered with a server</summary>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static grpc::ServerServiceDefinition BindService(RouteGuideBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_RouteChat, serviceImpl.RouteChat)
            .AddMethod(__Method_SetIcpTemplet, serviceImpl.SetIcpTemplet)
            .AddMethod(__Method_SetIcpMaxIterations, serviceImpl.SetIcpMaxIterations)
            .AddMethod(__Method_CheckServer, serviceImpl.CheckServer)
            .AddMethod(__Method_CheckLisence, serviceImpl.CheckLisence).Build());
 }
Example #4
0
     /// <summary>Creates service definition that can be registered with a server</summary>
 #pragma warning disable 0618
     public static ServerServiceDefinition BindService(RouteGuideBase serviceImpl)
 #pragma warning restore 0618
     {
         return(ServerServiceDefinition.CreateBuilder(__ServiceName)
                .AddMethod(__Method_GetFeature, serviceImpl.GetFeature)
                .AddMethod(__Method_ListFeatures, serviceImpl.ListFeatures)
                .AddMethod(__Method_RecordRoute, serviceImpl.RecordRoute)
                .AddMethod(__Method_RouteChat, serviceImpl.RouteChat).Build());
     }
Example #5
0
 /// <summary>Creates service definition that can be registered with a server</summary>
 public static ServerServiceDefinition BindService(RouteGuideBase serviceImpl)
 {
     return(ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_GetFeature, serviceImpl.GetFeature)
            .AddMethod(__Method_ListFeatures, serviceImpl.ListFeatures)
            .AddMethod(__Method_RecordRoute, serviceImpl.RecordRoute)
            .AddMethod(__Method_RouteChat, serviceImpl.RouteChat)
            .AddMethod(__Method_InvokeFunction, serviceImpl.InvokeFunction)
            .AddMethod(__Method_GetBytes, serviceImpl.GetBytes)
            .AddMethod(__Method_GetAllBytes, serviceImpl.GetAllBytes).Build());
 }