Ejemplo n.º 1
0
 // TEST_START
 private MixinServiceSettings(MixinServiceSettings existing) : base(existing)
 {
     gax::GaxPreconditions.CheckNotNull(existing, nameof(existing));
     MethodSettings    = existing.MethodSettings;
     LocationsSettings = existing.LocationsSettings;
     IAMPolicySettings = existing.IAMPolicySettings;
     OnCopy(existing);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a <see cref="MixinServiceClient"/> 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="MixinServiceSettings"/>.</param>
        /// <param name="logger">Optional <see cref="mel::ILogger"/>.</param>
        /// <returns>The created <see cref="MixinServiceClient"/>.</returns>
        internal static MixinServiceClient Create(grpccore::CallInvoker callInvoker, MixinServiceSettings settings = null, mel::ILogger logger = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            MixinService.MixinServiceClient grpcClient = new MixinService.MixinServiceClient(callInvoker);
            return(new MixinServiceClientImpl(grpcClient, settings, logger));
        }
Ejemplo n.º 3
0
        // TEST_START
        /// <summary>
        /// Constructs a client wrapper for the MixinService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="MixinServiceSettings"/> used within this client.</param>
        /// <param name="logger">Optional <see cref="mel::ILogger"/> to use within this client.</param>
        public MixinServiceClientImpl(MixinService.MixinServiceClient grpcClient, MixinServiceSettings settings, mel::ILogger logger)
        {
            GrpcClient = grpcClient;
            MixinServiceSettings  effectiveSettings = settings ?? MixinServiceSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings, logger);

            LocationsClient = new gcl::LocationsClientImpl(grpcClient.CreateLocationsClient(), effectiveSettings.LocationsSettings, logger);
            IAMPolicyClient = new gciv::IAMPolicyClientImpl(grpcClient.CreateIAMPolicyClient(), effectiveSettings.IAMPolicySettings, logger);
            _callMethod     = clientHelper.BuildApiCall <Request, Response>("Method", grpcClient.MethodAsync, grpcClient.Method, effectiveSettings.MethodSettings);
            Modify_ApiCall(ref _callMethod);
            Modify_MethodApiCall(ref _callMethod);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Ejemplo n.º 4
0
        // TEST_END

        partial void OnCopy(MixinServiceSettings existing);
Ejemplo n.º 5
0
 partial void OnConstruction(MixinService.MixinServiceClient grpcClient, MixinServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);