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); } }
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); } }
async Task <bool> IsRuntimeAlreadyReadyAlready(SessionId sessionId, CancellationToken token) { var res = await SendMonoCommand(sessionId, MonoCommands.IsRuntimeReady(), token); return(res.Value? ["result"]? ["value"]?.Value <bool> () ?? false); }