-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathIScriptEngine.cs
29 lines (21 loc) · 978 Bytes
/
IScriptEngine.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System;
using System.Collections.Generic;
using System.Threading;
namespace AudioSwitcher.Scripting
{
public interface IScriptEngine
{
/// <summary>
/// Adds this library to each execution context that is created from this engine
/// </summary>
/// <param name="name"></param>
/// <param name="libraryFunc"></param>
void AddLibrary(string name, Func<IExecutionContext, IScriptLibrary> libraryFunc);
IExecutionContext CreateExecutionContext();
IExecutionContext CreateExecutionContext(IEnumerable<string> args);
IExecutionContext CreateExecutionContext(bool isDebug);
IExecutionContext CreateExecutionContext(bool isDebug, IEnumerable<string> args);
IExecutionContext CreateExecutionContext(bool isDebug, IEnumerable<string> args, CancellationToken cancellationToken);
void OnExecutionContextCreation(Action<IExecutionContext> contextCreationAction);
}
}