C# 클래스 MsieJavaScriptEngine.ActiveScript.ActiveScriptSiteWrapper

상속: IActiveScriptSite, IDisposable
파일 보기 프로젝트 열기: klumsy/PowerShellJS 1 사용 예제들

공개 메소드들

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

Constructs instance of ActiveScriptSiteWrapper

ActiveScriptSiteWrapper ( IntPtr pActiveScript, IActiveScript activeScript, string documentVersion ) : System

Constructs instance of ActiveScriptSiteWrapper

CallFunction ( string functionName ) : object

Calls a function

DeleteProperty ( string propertyName ) : void

Removes a global object property

Dispose ( ) : void

Destroys object

ExecuteScriptText ( string code, bool isExpression ) : object

Executes a script text

GetDocVersionString ( string &version ) : void

Retrieves a host-defined string that uniquely identifies the current document version. If the related document has changed outside the scope of Windows Script (as in the case of an HTML page being edited with Notepad), the scripting engine can save this along with its persisted state, forcing a recompile the next time the script is loaded.

GetItemInfo ( string name, ScriptInfoFlags returnMask, object &item, IntPtr &pTypeInfo ) : void

Allows the scripting engine to obtain information about an item added with the IActiveScript.AddNamedItem method

GetLcid ( int &lcid ) : void

Retrieves the locale identifier associated with the host's user interface. The scripting engine uses the identifier to ensure that error strings and other user-interface elements generated by the engine appear in the appropriate language.

GetProperty ( string propertyName ) : object

Gets a value of global object property

HasProperty ( string propertyName ) : bool

Сhecks for the existence of a global object property

OnEnterScript ( ) : void

Informs the host that the scripting engine has begun executing the script code

OnLeaveScript ( ) : void

Informs the host that the scripting engine has returned from executing script code

OnScriptError ( IActiveScriptError scriptError ) : void

Informs the host that an execution error occurred while the engine was running the script.

OnScriptTerminate ( object result, System.Runtime.InteropServices.ComTypes.EXCEPINFO exceptionInfo ) : void

Informs the host that the script has completed execution

OnStateChange ( ScriptState scriptState ) : void

Informs the host that the scripting engine has changed states

SetProperty ( string propertyName, object value ) : void

Sets a value to global object property

보호된 메소드들

메소드 설명
OnScriptError ( ActiveScriptException exception ) : void

Informs the host that an execution error occurred while the engine was running the script

비공개 메소드들

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

Destroys object

GetAndResetLastException ( ) : ActiveScriptException

Gets and resets a last exception. Returns null for none.

GetItem ( string name ) : object

Allows the scripting engine to obtain information about an item added with the IActiveScript.AddNamedItem method

GetTypeInfo ( string name ) : IntPtr

Allows the scripting engine to obtain information about an item added with the IActiveScript.AddNamedItem method. Gets the COM ITypeInfo

InitScriptDispatch ( ) : void

Initializes a script dispatch

ThrowError ( ) : void

메소드 상세

ActiveScriptSiteWrapper() 공개 메소드

Constructs instance of ActiveScriptSiteWrapper
public ActiveScriptSiteWrapper ( IntPtr pActiveScript, IActiveScript activeScript ) : System
pActiveScript System.IntPtr Pointer to an instance of native JavaScript engine
activeScript IActiveScript Instance of native JavaScript engine
리턴 System

ActiveScriptSiteWrapper() 공개 메소드

Constructs instance of ActiveScriptSiteWrapper
public ActiveScriptSiteWrapper ( IntPtr pActiveScript, IActiveScript activeScript, string documentVersion ) : System
pActiveScript System.IntPtr Pointer to an instance of native JavaScript engine
activeScript IActiveScript Instance of native JavaScript engine
documentVersion string Host-defined document version string
리턴 System

CallFunction() 공개 메소드

Calls a function
public CallFunction ( string functionName ) : object
functionName string Function name
리턴 object

DeleteProperty() 공개 메소드

Removes a global object property
public DeleteProperty ( string propertyName ) : void
propertyName string Name of property
리턴 void

Dispose() 공개 메소드

Destroys object
public Dispose ( ) : void
리턴 void

ExecuteScriptText() 공개 메소드

Executes a script text
public ExecuteScriptText ( string code, bool isExpression ) : object
code string Script text
isExpression bool Flag that script text needs to run as an expression
리턴 object

GetDocVersionString() 공개 메소드

Retrieves a host-defined string that uniquely identifies the current document version. If the related document has changed outside the scope of Windows Script (as in the case of an HTML page being edited with Notepad), the scripting engine can save this along with its persisted state, forcing a recompile the next time the script is loaded.
public GetDocVersionString ( string &version ) : void
version string The host-defined document version string
리턴 void

GetItemInfo() 공개 메소드

Allows the scripting engine to obtain information about an item added with the IActiveScript.AddNamedItem method
public GetItemInfo ( string name, ScriptInfoFlags returnMask, object &item, IntPtr &pTypeInfo ) : void
name string The name associated with the item, as specified in the /// IActiveScript.AddNamedItem method
returnMask ScriptInfoFlags A bit mask specifying what information about the item should be /// returned. The scripting engine should request the minimum amount of information possible /// because some of the return parameters (for example, ITypeInfo) can take considerable /// time to load or generate
item object A variable that receives a pointer to the IUnknown interface associated /// with the given item. The scripting engine can use the IUnknown.QueryInterface method to /// obtain the IDispatch interface for the item. This parameter receives null if returnMask /// does not include the ScriptInfo.IUnknown value. Also, it receives null if there is no /// object associated with the item name; this mechanism is used to create a simple class when /// the named item was added with the ScriptItem.CodeOnly flag set in the /// IActiveScript.AddNamedItem method.
pTypeInfo System.IntPtr A variable that receives a pointer to the ITypeInfo interface /// associated with the item. This parameter receives null if returnMask does not include the /// ScriptInfo.ITypeInfo value, or if type information is not available for this item. If type /// information is not available, the object cannot source events, and name binding must be /// realized with the IDispatch.GetIDsOfNames method. Note that the ITypeInfo interface /// retrieved describes the item's coclass (TKIND_COCLASS) because the object may support /// multiple interfaces and event interfaces. If the item supports the IProvideMultipleTypeInfo /// interface, the ITypeInfo interface retrieved is the same as the index zero ITypeInfo that /// would be obtained using the IProvideMultipleTypeInfo.GetInfoOfIndex method.
리턴 void

GetLcid() 공개 메소드

Retrieves the locale identifier associated with the host's user interface. The scripting engine uses the identifier to ensure that error strings and other user-interface elements generated by the engine appear in the appropriate language.
public GetLcid ( int &lcid ) : void
lcid int A variable that receives the locale identifier for user-interface /// elements displayed by the scripting engine
리턴 void

GetProperty() 공개 메소드

Gets a value of global object property
public GetProperty ( string propertyName ) : object
propertyName string Name of property
리턴 object

HasProperty() 공개 메소드

Сhecks for the existence of a global object property
public HasProperty ( string propertyName ) : bool
propertyName string Name of property
리턴 bool

OnEnterScript() 공개 메소드

Informs the host that the scripting engine has begun executing the script code
public OnEnterScript ( ) : void
리턴 void

OnLeaveScript() 공개 메소드

Informs the host that the scripting engine has returned from executing script code
public OnLeaveScript ( ) : void
리턴 void

OnScriptError() 보호된 메소드

Informs the host that an execution error occurred while the engine was running the script
protected OnScriptError ( ActiveScriptException exception ) : void
exception ActiveScriptException The exception
리턴 void

OnScriptError() 공개 메소드

Informs the host that an execution error occurred while the engine was running the script.
public OnScriptError ( IActiveScriptError scriptError ) : void
scriptError IActiveScriptError A host can use this interface to obtain information about the /// execution error
리턴 void

OnScriptTerminate() 공개 메소드

Informs the host that the script has completed execution
public OnScriptTerminate ( object result, System.Runtime.InteropServices.ComTypes.EXCEPINFO exceptionInfo ) : void
result object A variable that contains the script result, or null if the script /// produced no result
exceptionInfo System.Runtime.InteropServices.ComTypes.EXCEPINFO Contains exception information generated when the script /// terminated, or null if no exception was generated
리턴 void

OnStateChange() 공개 메소드

Informs the host that the scripting engine has changed states
public OnStateChange ( ScriptState scriptState ) : void
scriptState ScriptState Indicates the new script state
리턴 void

SetProperty() 공개 메소드

Sets a value to global object property
public SetProperty ( string propertyName, object value ) : void
propertyName string Name of property
value object Value of property
리턴 void