/// <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, GroupServiceBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_ListGroups, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Monitoring.V3.ListGroupsRequest, global::Google.Cloud.Monitoring.V3.ListGroupsResponse>(serviceImpl.ListGroups));
     serviceBinder.AddMethod(__Method_GetGroup, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Monitoring.V3.GetGroupRequest, global::Google.Cloud.Monitoring.V3.Group>(serviceImpl.GetGroup));
     serviceBinder.AddMethod(__Method_CreateGroup, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Monitoring.V3.CreateGroupRequest, global::Google.Cloud.Monitoring.V3.Group>(serviceImpl.CreateGroup));
     serviceBinder.AddMethod(__Method_UpdateGroup, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Monitoring.V3.UpdateGroupRequest, global::Google.Cloud.Monitoring.V3.Group>(serviceImpl.UpdateGroup));
     serviceBinder.AddMethod(__Method_DeleteGroup, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Monitoring.V3.DeleteGroupRequest, global::Google.Protobuf.WellKnownTypes.Empty>(serviceImpl.DeleteGroup));
     serviceBinder.AddMethod(__Method_ListGroupMembers, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Monitoring.V3.ListGroupMembersRequest, global::Google.Cloud.Monitoring.V3.ListGroupMembersResponse>(serviceImpl.ListGroupMembers));
 }
 /// <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(GroupServiceBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_ListGroups, serviceImpl.ListGroups)
            .AddMethod(__Method_GetGroup, serviceImpl.GetGroup)
            .AddMethod(__Method_CreateGroup, serviceImpl.CreateGroup)
            .AddMethod(__Method_UpdateGroup, serviceImpl.UpdateGroup)
            .AddMethod(__Method_DeleteGroup, serviceImpl.DeleteGroup)
            .AddMethod(__Method_ListGroupMembers, serviceImpl.ListGroupMembers).Build());
 }
예제 #3
0
 /// <summary>Register service method implementations with a service binder. 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, GroupServiceBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_CreateGroup, serviceImpl.CreateGroup);
     serviceBinder.AddMethod(__Method_UpdateGroup, serviceImpl.UpdateGroup);
     serviceBinder.AddMethod(__Method_DeleteGroup, serviceImpl.DeleteGroup);
     serviceBinder.AddMethod(__Method_QueryGroups, serviceImpl.QueryGroups);
     serviceBinder.AddMethod(__Method_AssociateOrganizationUserToGroup, serviceImpl.AssociateOrganizationUserToGroup);
     serviceBinder.AddMethod(__Method_DisassociateOrganizationUserFromGroup, serviceImpl.DisassociateOrganizationUserFromGroup);
     serviceBinder.AddMethod(__Method_QueryGroupMember, serviceImpl.QueryGroupMember);
     serviceBinder.AddMethod(__Method_QueryMemberGroup, serviceImpl.QueryMemberGroup);
     serviceBinder.AddMethod(__Method_ExistGroupByName, serviceImpl.ExistGroupByName);
 }
예제 #4
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(GroupServiceBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_CreateGroup, serviceImpl.CreateGroup)
            .AddMethod(__Method_UpdateGroup, serviceImpl.UpdateGroup)
            .AddMethod(__Method_DeleteGroup, serviceImpl.DeleteGroup)
            .AddMethod(__Method_QueryGroups, serviceImpl.QueryGroups)
            .AddMethod(__Method_AssociateOrganizationUserToGroup, serviceImpl.AssociateOrganizationUserToGroup)
            .AddMethod(__Method_DisassociateOrganizationUserFromGroup, serviceImpl.DisassociateOrganizationUserFromGroup)
            .AddMethod(__Method_QueryGroupMember, serviceImpl.QueryGroupMember)
            .AddMethod(__Method_QueryMemberGroup, serviceImpl.QueryMemberGroup)
            .AddMethod(__Method_ExistGroupByName, serviceImpl.ExistGroupByName).Build());
 }