namespace Jint;
public partial class Engine
{
public AdvancedOperations Advanced { get; }
}
public class AdvancedOperations
{
private readonly Engine _engine;
public AdvancedOperations(Engine engine)
{
_engine = engine;
}
///
/// Gets current stack trace that is active in engine.
///
public string StackTrace
{
get
{
var lastSyntaxElement = _engine._lastSyntaxElement;
if (lastSyntaxElement is null)
{
return string.Empty;
}
return _engine.CallStack.BuildCallStackString(lastSyntaxElement.Location);
}
}
///
/// Forcefully processes the current task queues (micro and regular), this API may break and change behavior!
///
public void ProcessTasks()
{
_engine.RunAvailableContinuations();
}
}