예제 #1
0
        /// <summary>
        /// Constructs a client wrapper for the GenderViewService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="GenderViewServiceSettings"/> used within this client.</param>
        public GenderViewServiceClientImpl(GenderViewService.GenderViewServiceClient grpcClient, GenderViewServiceSettings settings)
        {
            GrpcClient = grpcClient;
            GenderViewServiceSettings effectiveSettings = settings ?? GenderViewServiceSettings.GetDefault();
            gaxgrpc::ClientHelper     clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetGenderView = clientHelper.BuildApiCall <GetGenderViewRequest, gagvr::GenderView>(grpcClient.GetGenderViewAsync, grpcClient.GetGenderView, effectiveSettings.GetGenderViewSettings).WithGoogleRequestParam("resource_name", request => request.ResourceName);
            Modify_ApiCall(ref _callGetGenderView);
            Modify_GetGenderViewApiCall(ref _callGetGenderView);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
 /// <summary>
 /// Creates a <see cref="GenderViewServiceClient"/> which uses the specified call invoker for remote operations.
 /// </summary>
 /// <param name="callInvoker">The <see cref="grpccore::CallInvoker"/> for remote operations. Must not be null.</param>
 /// <param name="settings">Optional <see cref="GenderViewServiceSettings"/>.</param>
 /// <returns>The created <see cref="GenderViewServiceClient"/>.</returns>
 public static GenderViewServiceClient Create(grpccore::CallInvoker callInvoker, GenderViewServiceSettings settings = null)
 {
     gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
     grpccore::Interceptors.Interceptor interceptor = settings?.Interceptor;
     if (interceptor != null)
     {
         callInvoker = grpccore::Interceptors.CallInvokerExtensions.Intercept(callInvoker, interceptor);
     }
     GenderViewService.GenderViewServiceClient grpcClient = new GenderViewService.GenderViewServiceClient(callInvoker);
     return(new GenderViewServiceClientImpl(grpcClient, settings));
 }
        /// <summary>
        /// Constructs a client wrapper for the GenderViewService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="GenderViewServiceSettings"/> used within this client </param>
        public GenderViewServiceClientImpl(GenderViewService.GenderViewServiceClient grpcClient, GenderViewServiceSettings settings)
        {
            GrpcClient = grpcClient;
            GenderViewServiceSettings effectiveSettings = settings ?? GenderViewServiceSettings.GetDefault();
            gaxgrpc::ClientHelper     clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetGenderView = clientHelper.BuildApiCall <GetGenderViewRequest, gagvr::GenderView>(
                GrpcClient.GetGenderViewAsync, GrpcClient.GetGenderView, effectiveSettings.GetGenderViewSettings)
                                 .WithCallSettingsOverlay(request => gaxgrpc::CallSettings.FromHeader("x-goog-request-params", $"resource_name={request.ResourceName}"));
            Modify_ApiCall(ref _callGetGenderView);
            Modify_GetGenderViewApiCall(ref _callGetGenderView);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
예제 #4
0
 partial void OnConstruction(GenderViewService.GenderViewServiceClient grpcClient, GenderViewServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);