Beispiel #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, TextureStudioServerServiceBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_StartServer, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::TextureStudio.StartServerRequest, global::TextureStudio.StartServerResponse>(serviceImpl.StartServer));
     serviceBinder.AddMethod(__Method_StopServer, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::TextureStudio.StopServerRequest, global::TextureStudio.StopServerResponse>(serviceImpl.StopServer));
     serviceBinder.AddMethod(__Method_RestartServer, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::TextureStudio.RestartServerRequest, global::TextureStudio.RestartServerResponse>(serviceImpl.RestartServer));
     serviceBinder.AddMethod(__Method_ServerStatus, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::TextureStudio.ServerStatusRequest, global::TextureStudio.ServerStatusResponse>(serviceImpl.ServerStatus));
     serviceBinder.AddMethod(__Method_UploadProject, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::TextureStudio.UploadProjectRequest, global::TextureStudio.UploadProjectResponse>(serviceImpl.UploadProject));
     serviceBinder.AddMethod(__Method_GetProject, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::TextureStudio.GetProjectRequest, global::TextureStudio.GetProjectResponse>(serviceImpl.GetProject));
     serviceBinder.AddMethod(__Method_GetProjects, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::TextureStudio.GetProjectsRequest, global::TextureStudio.GetProjectsResponse>(serviceImpl.GetProjects));
     serviceBinder.AddMethod(__Method_SubscribeToProjectsChanges, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod <global::TextureStudio.SubscribeToProjectsChangesRequest, global::TextureStudio.SubscribeToProjectsChangesResponse>(serviceImpl.SubscribeToProjectsChanges));
 }
Beispiel #2
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(TextureStudioServerServiceBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_StartServer, serviceImpl.StartServer)
            .AddMethod(__Method_StopServer, serviceImpl.StopServer)
            .AddMethod(__Method_RestartServer, serviceImpl.RestartServer)
            .AddMethod(__Method_ServerStatus, serviceImpl.ServerStatus)
            .AddMethod(__Method_UploadProject, serviceImpl.UploadProject)
            .AddMethod(__Method_GetProject, serviceImpl.GetProject)
            .AddMethod(__Method_GetProjects, serviceImpl.GetProjects)
            .AddMethod(__Method_SubscribeToProjectsChanges, serviceImpl.SubscribeToProjectsChanges).Build());
 }