Пример #1
0
 private LicenseCodesSettings(LicenseCodesSettings existing) : base(existing)
 {
     gax::GaxPreconditions.CheckNotNull(existing, nameof(existing));
     GetSettings = existing.GetSettings;
     TestIamPermissionsSettings = existing.TestIamPermissionsSettings;
     OnCopy(existing);
 }
Пример #2
0
        /// <summary>
        /// Creates a <see cref="LicenseCodesClient"/> 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="LicenseCodesSettings"/>.</param>
        /// <returns>The created <see cref="LicenseCodesClient"/>.</returns>
        internal static LicenseCodesClient Create(grpccore::CallInvoker callInvoker, LicenseCodesSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            LicenseCodes.LicenseCodesClient grpcClient = new LicenseCodes.LicenseCodesClient(callInvoker);
            return(new LicenseCodesClientImpl(grpcClient, settings));
        }
Пример #3
0
        /// <summary>
        /// Constructs a client wrapper for the LicenseCodes service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="LicenseCodesSettings"/> used within this client.</param>
        public LicenseCodesClientImpl(LicenseCodes.LicenseCodesClient grpcClient, LicenseCodesSettings settings)
        {
            GrpcClient = grpcClient;
            LicenseCodesSettings  effectiveSettings = settings ?? LicenseCodesSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGet = clientHelper.BuildApiCall <GetLicenseCodeRequest, LicenseCode>(grpcClient.GetAsync, grpcClient.Get, effectiveSettings.GetSettings).WithGoogleRequestParam("project", request => request.Project).WithGoogleRequestParam("license_code", request => request.LicenseCode);
            Modify_ApiCall(ref _callGet);
            Modify_GetApiCall(ref _callGet);
            _callTestIamPermissions = clientHelper.BuildApiCall <TestIamPermissionsLicenseCodeRequest, TestPermissionsResponse>(grpcClient.TestIamPermissionsAsync, grpcClient.TestIamPermissions, effectiveSettings.TestIamPermissionsSettings).WithGoogleRequestParam("project", request => request.Project).WithGoogleRequestParam("resource", request => request.Resource);
            Modify_ApiCall(ref _callTestIamPermissions);
            Modify_TestIamPermissionsApiCall(ref _callTestIamPermissions);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Пример #4
0
 partial void OnCopy(LicenseCodesSettings existing);
Пример #5
0
 partial void OnConstruction(LicenseCodes.LicenseCodesClient grpcClient, LicenseCodesSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);