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

            _callGet = clientHelper.BuildApiCall <UserLicenseGetRequest, UserLicense>(grpcClient.GetAsync, grpcClient.Get, effectiveSettings.GetSettings).WithGoogleRequestParam("application_id", request => request.ApplicationId).WithGoogleRequestParam("user_id", request => request.UserId);
            Modify_ApiCall(ref _callGet);
            Modify_GetApiCall(ref _callGet);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
示例#2
0
        /// <summary>
        /// Creates a <see cref="UserLicenseServiceClient"/> 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="UserLicenseServiceSettings"/>.</param>
        /// <returns>The created <see cref="UserLicenseServiceClient"/>.</returns>
        internal static UserLicenseServiceClient Create(grpccore::CallInvoker callInvoker, UserLicenseServiceSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            UserLicenseService.UserLicenseServiceClient grpcClient = new UserLicenseService.UserLicenseServiceClient(callInvoker);
            return(new UserLicenseServiceClientImpl(grpcClient, settings));
        }
示例#3
0
 partial void OnConstruction(UserLicenseService.UserLicenseServiceClient grpcClient, UserLicenseServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);