コード例 #1
0
        /// <summary>
        /// Creates a <see cref="TestingClient"/> 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="TestingSettings"/>.</param>
        /// <param name="logger">Optional <see cref="mel::ILogger"/>.</param>
        /// <returns>The created <see cref="TestingClient"/>.</returns>
        internal static TestingClient Create(grpccore::CallInvoker callInvoker, TestingSettings 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);
            }
            Testing.TestingClient grpcClient = new Testing.TestingClient(callInvoker);
            return(new TestingClientImpl(grpcClient, settings, logger));
        }
コード例 #2
0
 private TestingSettings(TestingSettings existing) : base(existing)
 {
     gax::GaxPreconditions.CheckNotNull(existing, nameof(existing));
     CreateSessionSettings = existing.CreateSessionSettings;
     GetSessionSettings    = existing.GetSessionSettings;
     ListSessionsSettings  = existing.ListSessionsSettings;
     DeleteSessionSettings = existing.DeleteSessionSettings;
     ReportSessionSettings = existing.ReportSessionSettings;
     ListTestsSettings     = existing.ListTestsSettings;
     DeleteTestSettings    = existing.DeleteTestSettings;
     VerifyTestSettings    = existing.VerifyTestSettings;
     OnCopy(existing);
 }
コード例 #3
0
 partial void OnConstruction(Testing.TestingClient grpcClient, TestingSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
コード例 #4
0
 partial void OnCopy(TestingSettings existing);