Example #1
0
        /// <summary>
        /// Constructs a client wrapper for the Keywords service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="KeywordsSettings"/> used within this client.</param>
        /// <param name="logger">Optional <see cref="mel::ILogger"/> to use within this client.</param>
        public KeywordsClientImpl(Keywords.KeywordsClient grpcClient, KeywordsSettings settings, mel::ILogger logger)
        {
            GrpcClient = grpcClient;
            KeywordsSettings      effectiveSettings = settings ?? KeywordsSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings, logger);

            _callMethod1 = clientHelper.BuildApiCall <Request, Response>("Method1", grpcClient.Method1Async, grpcClient.Method1, effectiveSettings.Method1Settings);
            Modify_ApiCall(ref _callMethod1);
            Modify_Method1ApiCall(ref _callMethod1);
            _callMethod2 = clientHelper.BuildApiCall <Resource, Response>("Method2", grpcClient.Method2Async, grpcClient.Method2, effectiveSettings.Method2Settings);
            Modify_ApiCall(ref _callMethod2);
            Modify_Method2ApiCall(ref _callMethod2);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }