Example #1
0
        async Task OnDefaultContext(MessageId ctx_id, JObject aux_data, CancellationToken token)
        {
            Log("verbose", "Default context created, clearing state and sending events");

            //reset all bps
            foreach (var b in this.breakpoints)
            {
                b.State = BreakPointState.Pending;
            }
            this.runtime_ready = false;
            this.ctx_id        = ctx_id.id;
            this.aux_ctx_data  = aux_data;

            Log("verbose", "checking if the runtime is ready");
            var res = await SendMonoCommand(ctx_id, MonoCommands.IsRuntimeReady(), token);

            var is_ready = res.Value? ["result"]? ["value"]?.Value <bool> ();

            //Log ("verbose", $"\t{is_ready}");
            if (is_ready.HasValue && is_ready.Value == true)
            {
                Log("verbose", "RUNTIME LOOK READY. GO TIME!");
                await OnRuntimeReady(ctx_id, token);
            }
        }
Example #2
0
        async Task OnDefaultContext(SessionId sessionId, ExecutionContext context, CancellationToken token)
        {
            Log("verbose", "Default context created, clearing state and sending events");

            contexts[sessionId.sessionId ?? "default"] = context;
            //reset all bps
            foreach (var b in context.Breakpoints)
            {
                b.State = BreakpointState.Pending;
            }

            Log("info", "checking if the runtime is ready");
            var res = await SendMonoCommand(sessionId, MonoCommands.IsRuntimeReady(), token);

            var is_ready = res.Value? ["result"]? ["value"]?.Value <bool> ();

            //Log ("verbose", $"\t{is_ready}");
            if (is_ready.HasValue && is_ready.Value == true)
            {
                Log("info", "RUNTIME LOOK READY. GO TIME!");
                await RuntimeReady(sessionId, token);

                SendEvent(sessionId, "Mono.runtimeReady", new JObject(), token);
            }
        }
Example #3
0
        async Task <bool> IsRuntimeAlreadyReadyAlready(SessionId sessionId, CancellationToken token)
        {
            var res = await SendMonoCommand(sessionId, MonoCommands.IsRuntimeReady(), token);

            return(res.Value? ["result"]? ["value"]?.Value <bool> () ?? false);
        }