forked from Taritsyn/MsieJavaScriptEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIInnerJsEngine.cs
More file actions
64 lines (55 loc) · 1.75 KB
/
IInnerJsEngine.cs
File metadata and controls
64 lines (55 loc) · 1.75 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
namespace MsieJavaScriptEngine
{
using System;
/// <summary>
/// Interface for the inner JavaScript engine
/// </summary>
internal interface IInnerJsEngine : IDisposable
{
/// <summary>
/// Gets a name of JavaScript engine mode
/// </summary>
string Mode { get; }
/// <summary>
/// Evaluates an expression
/// </summary>
/// <param name="expression">JavaScript expression</param>
/// <returns>Result of the expression</returns>
object Evaluate(string expression);
/// <summary>
/// Executes a code
/// </summary>
/// <param name="code">JavaScript code</param>
void Execute(string code);
/// <summary>
/// Calls a function
/// </summary>
/// <param name="functionName">Function name</param>
/// <param name="args">Function arguments</param>
/// <returns>Result of the function execution</returns>
object CallFunction(string functionName, params object[] args);
/// <summary>
/// Сhecks for the existence of a variable
/// </summary>
/// <param name="variableName">Name of variable</param>
/// <returns>Result of check (true - exists; false - not exists</returns>
bool HasVariable(string variableName);
/// <summary>
/// Gets a value of variable
/// </summary>
/// <param name="variableName">Name of variable</param>
/// <returns>Value of variable</returns>
object GetVariableValue(string variableName);
/// <summary>
/// Sets a value of variable
/// </summary>
/// <param name="variableName">Name of variable</param>
/// <param name="value">Value of variable</param>
void SetVariableValue(string variableName, object value);
/// <summary>
/// Removes a variable
/// </summary>
/// <param name="variableName">Name of variable</param>
void RemoveVariable(string variableName);
}
}