コード例 #1
0
 /// <summary>
 /// Instantiate with the specified settings.
 /// </summary>
 /// <param name="clientCount">Optional.
 /// The number of <see cref="SubscriberServiceApiClient"/>s to create and use within a <see cref="SubscriberClient"/> instance.</param>
 /// <param name="subscriberServiceApiSettings">Optional. The settings to use when creating <see cref="SubscriberServiceApiClient"/> instances.</param>
 /// <param name="credentials">Optional. Credentials to use when creating <see cref="SubscriberServiceApiClient"/> instances.</param>
 /// <param name="serviceEndpoint">Optional.
 /// The <see cref="ServiceEndpoint"/> to use when creating <see cref="SubscriberServiceApiClient"/> instances.</param>
 public ClientCreationSettings(
     int?clientCount = null,
     SubscriberServiceApiSettings subscriberServiceApiSettings = null,
     ChannelCredentials credentials  = null,
     ServiceEndpoint serviceEndpoint = null)
 {
     ClientCount = clientCount;
     SubscriberServiceApiSettings = subscriberServiceApiSettings;
     Credentials     = credentials;
     ServiceEndpoint = serviceEndpoint;
 }
コード例 #2
0
 partial void OnConstruction(Subscriber.SubscriberClient grpcClient, SubscriberServiceApiSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper)
 {
     iam::IAMPolicy.IAMPolicyClient grpcIAMPolicyClient = grpcClient.CreateIAMPolicyClient();
     _callSetIamPolicy = clientHelper.BuildApiCall <iam::SetIamPolicyRequest, iam::Policy>(
         grpcIAMPolicyClient.SetIamPolicyAsync, grpcIAMPolicyClient.SetIamPolicy, effectiveSettings.SetIamPolicySettings)
                         .WithGoogleRequestParam("resource", request => request.Resource);
     _callGetIamPolicy = clientHelper.BuildApiCall <iam::GetIamPolicyRequest, iam::Policy>(
         grpcIAMPolicyClient.GetIamPolicyAsync, grpcIAMPolicyClient.GetIamPolicy, effectiveSettings.GetIamPolicySettings)
                         .WithGoogleRequestParam("resource", request => request.Resource);
     _callTestIamPermissions = clientHelper.BuildApiCall <iam::TestIamPermissionsRequest, iam::TestIamPermissionsResponse>(
         grpcIAMPolicyClient.TestIamPermissionsAsync, grpcIAMPolicyClient.TestIamPermissions, effectiveSettings.TestIamPermissionsSettings)
                               .WithGoogleRequestParam("resource", request => request.Resource);
     Modify_ApiCall(ref _callSetIamPolicy);
     Modify_SetIamPolicyApiCall(ref _callSetIamPolicy);
     Modify_ApiCall(ref _callGetIamPolicy);
     Modify_GetIamPolicyApiCall(ref _callGetIamPolicy);
     Modify_ApiCall(ref _callTestIamPermissions);
     Modify_TestIamPermissionsApiCall(ref _callTestIamPermissions);
 }