forked from Taritsyn/JavaScriptEngineSwitcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmbeddedObject.cs
More file actions
42 lines (37 loc) · 1.32 KB
/
EmbeddedObject.cs
File metadata and controls
42 lines (37 loc) · 1.32 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
using System.Collections.Generic;
namespace JavaScriptEngineSwitcher.ChakraCore.JsRt.Embedding
{
/// <summary>
/// Embedded object
/// </summary>
internal sealed class EmbeddedObject : EmbeddedItem
{
/// <summary>
/// Constructs an instance of the embedded object
/// </summary>
/// <param name="hostObject">Instance of host type</param>
/// <param name="scriptValue">JavaScript value created from an host object</param>
public EmbeddedObject(object hostObject, JsValue scriptValue)
: base(hostObject.GetType(), hostObject, scriptValue, new List<JsNativeFunction>())
{ }
/// <summary>
/// Constructs an instance of the embedded object
/// </summary>
/// <param name="hostObject">Instance of host type</param>
/// <param name="scriptValue">JavaScript value created from an host object</param>
/// <param name="nativeFunctions">List of native functions, that used to access to members of host object</param>
public EmbeddedObject(object hostObject, JsValue scriptValue,
IList<JsNativeFunction> nativeFunctions)
: base(hostObject.GetType(), hostObject, scriptValue, nativeFunctions)
{ }
#region EmbeddedItem overrides
/// <summary>
/// Gets a value that indicates if the host item is an instance
/// </summary>
public override bool IsInstance
{
get { return true; }
}
#endregion
}
}