This repository was archived by the owner on Apr 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathIFunction.cs
More file actions
44 lines (40 loc) · 1.66 KB
/
IFunction.cs
File metadata and controls
44 lines (40 loc) · 1.66 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
//------------------------------------------------------------------------------
// <license file="Function.cs">
//
// The use and distribution terms for this software are contained in the file
// named 'LICENSE', which can be found in the resources directory of this
// distribution.
//
// By using this software in any fashion, you are agreeing to be bound by the
// terms of this license.
//
// </license>
//------------------------------------------------------------------------------
using System;
namespace EcmaScript.NET
{
/// <summary> This is interface that all functions in JavaScript must implement.
/// The interface provides for calling functions and constructors.
///
/// </summary>
public interface IFunction : IScriptable, ICallable
{
/// <summary> Call the function as a constructor.
///
/// This method is invoked by the runtime in order to satisfy a use
/// of the JavaScript <code>new</code> operator. This method is
/// expected to create a new object and return it.
///
/// </summary>
/// <param name="cx">the current Context for this thread
/// </param>
/// <param name="scope">an enclosing scope of the caller except
/// when the function is called from a closure.
/// </param>
/// <param name="args">the array of arguments
/// </param>
/// <returns> the allocated object
/// </returns>
IScriptable Construct (Context cx, IScriptable scope, object [] args);
}
}