Пример #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>
        /// 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);
        }