/// <summary>
        /// Constructs a client wrapper for the Controller2 service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="Controller2Settings"/> used within this client </param>
        public Controller2ClientImpl(Controller2.Controller2Client grpcClient, Controller2Settings settings)
        {
            GrpcClient = grpcClient;
            Controller2Settings effectiveSettings = settings ?? Controller2Settings.GetDefault();
            ClientHelper        clientHelper      = new ClientHelper(effectiveSettings);

            _callRegisterDebuggee = clientHelper.BuildApiCall <RegisterDebuggeeRequest, RegisterDebuggeeResponse>(
                GrpcClient.RegisterDebuggeeAsync, GrpcClient.RegisterDebuggee, effectiveSettings.RegisterDebuggeeSettings);
            _callListActiveBreakpoints = clientHelper.BuildApiCall <ListActiveBreakpointsRequest, ListActiveBreakpointsResponse>(
                GrpcClient.ListActiveBreakpointsAsync, GrpcClient.ListActiveBreakpoints, effectiveSettings.ListActiveBreakpointsSettings);
            _callUpdateActiveBreakpoint = clientHelper.BuildApiCall <UpdateActiveBreakpointRequest, UpdateActiveBreakpointResponse>(
                GrpcClient.UpdateActiveBreakpointAsync, GrpcClient.UpdateActiveBreakpoint, effectiveSettings.UpdateActiveBreakpointSettings);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Constructs a client wrapper for the Controller2 service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="Controller2Settings"/> used within this client.</param>
        public Controller2ClientImpl(Controller2.Controller2Client grpcClient, Controller2Settings settings)
        {
            GrpcClient = grpcClient;
            Controller2Settings   effectiveSettings = settings ?? Controller2Settings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callRegisterDebuggee = clientHelper.BuildApiCall <RegisterDebuggeeRequest, RegisterDebuggeeResponse>(grpcClient.RegisterDebuggeeAsync, grpcClient.RegisterDebuggee, effectiveSettings.RegisterDebuggeeSettings);
            Modify_ApiCall(ref _callRegisterDebuggee);
            Modify_RegisterDebuggeeApiCall(ref _callRegisterDebuggee);
            _callListActiveBreakpoints = clientHelper.BuildApiCall <ListActiveBreakpointsRequest, ListActiveBreakpointsResponse>(grpcClient.ListActiveBreakpointsAsync, grpcClient.ListActiveBreakpoints, effectiveSettings.ListActiveBreakpointsSettings).WithGoogleRequestParam("debuggee_id", request => request.DebuggeeId);
            Modify_ApiCall(ref _callListActiveBreakpoints);
            Modify_ListActiveBreakpointsApiCall(ref _callListActiveBreakpoints);
            _callUpdateActiveBreakpoint = clientHelper.BuildApiCall <UpdateActiveBreakpointRequest, UpdateActiveBreakpointResponse>(grpcClient.UpdateActiveBreakpointAsync, grpcClient.UpdateActiveBreakpoint, effectiveSettings.UpdateActiveBreakpointSettings).WithGoogleRequestParam("debuggee_id", request => request.DebuggeeId).WithGoogleRequestParam("breakpoint.id", request => request.Breakpoint?.Id);
            Modify_ApiCall(ref _callUpdateActiveBreakpoint);
            Modify_UpdateActiveBreakpointApiCall(ref _callUpdateActiveBreakpoint);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }