/// <summary> /// Creates a <see cref="ProfilerServiceClient"/> 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="ProfilerServiceSettings"/>.</param> /// <returns>The created <see cref="ProfilerServiceClient"/>.</returns> internal static ProfilerServiceClient Create(grpccore::CallInvoker callInvoker, ProfilerServiceSettings settings = null) { gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker)); grpcinter::Interceptor interceptor = settings?.Interceptor; if (interceptor != null) { callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor); } ProfilerService.ProfilerServiceClient grpcClient = new ProfilerService.ProfilerServiceClient(callInvoker); return(new ProfilerServiceClientImpl(grpcClient, settings)); }