C# 클래스 MsieJavaScriptEngine.ActiveScript.ActiveScriptParseWrapper

상속: IActiveScriptParseWrapper
파일 보기 프로젝트 열기: Taritsyn/MsieJavaScriptEngine

공개 메소드들

메소드 설명
ActiveScriptParseWrapper ( IntPtr pActiveScript, IActiveScript activeScript ) : System

Constructs instance of the ActiveScriptParseWrapper class

AddScriptlet ( string defaultName, string code, string itemName, string subItemName, string eventName, string delimiter, IntPtr sourceContextCookie, uint startingLineNumber, ScriptTextFlags flags ) : string

Adds a code scriptlet to the script. This method is used in environments where the persistent state of the script is intertwined with the host document and the host is responsible for restoring the script, rather than through an IPersist* interface. The primary examples are HTML scripting languages that allow scriptlets of code embedded in the HTML document to be attached to intrinsic events (for instance, ONCLICK="button1.text='Exit'").

Dispose ( ) : void

Destroys object

InitNew ( ) : void

Initializes the scripting engine

ParseScriptText ( string code, string itemName, object context, string delimiter, IntPtr sourceContextCookie, uint startingLineNumber, ScriptTextFlags flags ) : object

Parses the given code scriptlet, adding declarations into the namespace and evaluating code as appropriate.

비공개 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Destroys object

메소드 상세

ActiveScriptParseWrapper() 공개 메소드

Constructs instance of the ActiveScriptParseWrapper class
public ActiveScriptParseWrapper ( IntPtr pActiveScript, IActiveScript activeScript ) : System
pActiveScript System.IntPtr Pointer to an instance of native JavaScript engine
activeScript IActiveScript Instance of native JavaScript engine. /// Must implement IActiveScriptParse32 or IActiveScriptParse64.
리턴 System

AddScriptlet() 공개 메소드

Adds a code scriptlet to the script. This method is used in environments where the persistent state of the script is intertwined with the host document and the host is responsible for restoring the script, rather than through an IPersist* interface. The primary examples are HTML scripting languages that allow scriptlets of code embedded in the HTML document to be attached to intrinsic events (for instance, ONCLICK="button1.text='Exit'").
public AddScriptlet ( string defaultName, string code, string itemName, string subItemName, string eventName, string delimiter, IntPtr sourceContextCookie, uint startingLineNumber, ScriptTextFlags flags ) : string
defaultName string The default name to associate with the scriptlet. If the /// scriptlet does not contain naming information (as in the ONCLICK example above), /// this name will be used to identify the scriptlet. If this parameter is NULL, the /// scripting engine manufactures a unique name, if necessary.
code string The scriptlet text to add. The interpretation of this string /// depends on the scripting language.
itemName string The item name associated with this scriptlet. This parameter, /// in addition to pstrSubItemName, identifies the object for which the scriptlet is /// an event handler.
subItemName string The name of a subobject of the named item with which this /// scriptlet is associated; this name must be found in the named item's type /// information. This parameter is NULL if the scriptlet is to be associated with the /// named item instead of a subitem. This parameter, in addition to pstrItemName, /// identifies the specific object for which the scriptlet is an event handler.
eventName string The name of the event for which the scriptlet is an event /// handler.
delimiter string The end-of-scriptlet delimiter. When the pstrCode parameter /// is parsed from a stream of text, the host typically uses a delimiter, such as two /// single quotation marks (''), to detect the end of the scriptlet. This parameter /// specifies the delimiter that the host used, allowing the scripting engine to /// provide some conditional primitive preprocessing (for example, replacing a single /// quotation mark ['] with two single quotation marks for use as a delimiter). /// Exactly how (and if) the scripting engine makes use of this information depends /// on the scripting engine. Set this parameter to NULL if the host did not use a /// delimiter to mark the end of the scriptlet.
sourceContextCookie System.IntPtr Application-defined value that is used for /// debugging purposes
startingLineNumber uint Zero-based value that specifies which line the /// parsing will begin at
flags ScriptTextFlags Flags associated with the scriptlet
리턴 string

Dispose() 공개 메소드

Destroys object
public Dispose ( ) : void
리턴 void

InitNew() 공개 메소드

Initializes the scripting engine
public InitNew ( ) : void
리턴 void

ParseScriptText() 공개 메소드

Parses the given code scriptlet, adding declarations into the namespace and evaluating code as appropriate.
public ParseScriptText ( string code, string itemName, object context, string delimiter, IntPtr sourceContextCookie, uint startingLineNumber, ScriptTextFlags flags ) : object
code string The scriptlet text to evaluate. The interpretation of this /// string depends on the scripting language
itemName string The item name that gives the context in which the /// scriptlet is to be evaluated. If this parameter is NULL, the code is evaluated /// in the scripting engine's global context
context object The context object. This object is reserved for use in a /// debugging environment, where such a context may be provided by the debugger to /// represent an active run-time context. If this parameter is NULL, the engine /// uses pstrItemName to identify the context.
delimiter string The end-of-scriptlet delimiter. When pstrCode is parsed /// from a stream of text, the host typically uses a delimiter, such as two single /// quotation marks (''), to detect the end of the scriptlet. This parameter specifies /// the delimiter that the host used, allowing the scripting engine to provide some /// conditional primitive preprocessing (for example, replacing a single quotation /// mark ['] with two single quotation marks for use as a delimiter). Exactly how /// (and if) the scripting engine makes use of this information depends on the /// scripting engine. Set this parameter to NULL if the host did not use a delimiter /// to mark the end of the scriptlet.
sourceContextCookie System.IntPtr Application-defined value that is used for /// debugging purposes
startingLineNumber uint Zero-based value that specifies which line the /// parsing will begin at
flags ScriptTextFlags Flags associated with the scriptlet
리턴 object