コード例 #1
0
 public static void BindService(grpc::ServiceBinderBase serviceBinder, CloudShellServiceBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_GetEnvironment, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Shell.V1.GetEnvironmentRequest, global::Google.Cloud.Shell.V1.Environment>(serviceImpl.GetEnvironment));
     serviceBinder.AddMethod(__Method_StartEnvironment, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Shell.V1.StartEnvironmentRequest, global::Google.LongRunning.Operation>(serviceImpl.StartEnvironment));
     serviceBinder.AddMethod(__Method_AuthorizeEnvironment, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Shell.V1.AuthorizeEnvironmentRequest, global::Google.LongRunning.Operation>(serviceImpl.AuthorizeEnvironment));
     serviceBinder.AddMethod(__Method_AddPublicKey, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Shell.V1.AddPublicKeyRequest, global::Google.LongRunning.Operation>(serviceImpl.AddPublicKey));
     serviceBinder.AddMethod(__Method_RemovePublicKey, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Shell.V1.RemovePublicKeyRequest, global::Google.LongRunning.Operation>(serviceImpl.RemovePublicKey));
 }
コード例 #2
0
 public static grpc::ServerServiceDefinition BindService(CloudShellServiceBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_GetEnvironment, serviceImpl.GetEnvironment)
            .AddMethod(__Method_StartEnvironment, serviceImpl.StartEnvironment)
            .AddMethod(__Method_AuthorizeEnvironment, serviceImpl.AuthorizeEnvironment)
            .AddMethod(__Method_AddPublicKey, serviceImpl.AddPublicKey)
            .AddMethod(__Method_RemovePublicKey, serviceImpl.RemovePublicKey).Build());
 }