Exemplo n.º 1
0
        public RemoteBreakpoint BreakpointCreateByLocation(string file, uint line)
        {
            var request = new BreakpointCreateByLocationRequest()
            {
                Target = grpcSbTarget,
                File   = file,
                Line   = line,
            };
            BreakpointCreateByLocationResponse response = null;

            if (connection.InvokeRpc(() =>
            {
                response = client.BreakpointCreateByLocation(request);
            }))
            {
                if (response.Breakpoint != null && response.Breakpoint.Id != 0)
                {
                    return(breakpointFactory.Create(connection, response.Breakpoint));
                }
            }
            return(null);
        }
        public RemoteBreakpoint GetBreakpoint()
        {
            GetBreakpointResponse response = null;

            if (connection.InvokeRpc(() =>
            {
                response = client.GetBreakpoint(
                    new GetBreakpointRequest {
                    BreakpointLocation = grpcSbBreakpointLocation
                });
            }))
            {
                if (response.Result != null && response.Result.Id != 0)
                {
                    return(breakpointFactory.Create(connection, response.Result));
                }
            }
            return(null);
        }