예제 #1
0
        internal static RemoteBreakpoint GetBreakpoint(
            ConcurrentDictionary <long, RemoteTarget> targetStore,
            GrpcSbBreakpoint grpcSbBreakpoint)
        {
            RemoteTarget target = null;

            if (!targetStore.TryGetValue(grpcSbBreakpoint.Target.Id, out target))
            {
                ErrorUtils.ThrowError(StatusCode.Internal,
                                      "Could not find target in store: " + grpcSbBreakpoint.Target.Id);
            }
            var breakpoint = target.FindBreakpointById(grpcSbBreakpoint.Id);

            if (breakpoint == null)
            {
                ErrorUtils.ThrowError(StatusCode.Internal,
                                      "Could not find breakpoint in target: " + grpcSbBreakpoint.Id);
            }
            return(breakpoint);
        }