C# 클래스 Microsoft.Scripting.Hosting.ScriptRuntime

Represents a Dynamic Language Runtime in Hosting API. Hosting API counterpart for ScriptDomainManager.
상속: System.MarshalByRefObject
파일 보기 프로젝트 열기: jschementi/iron 1 사용 예제들

Private Properties

프로퍼티 타입 설명
GetEngine ScriptEngine
GetEngineNoLockNoNotification ScriptEngine

공개 메소드들

메소드 설명
CreateFromConfiguration ( ) : ScriptRuntime

Creates a new runtime with languages set up according to the current application configuration (using System.Configuration).

CreateOperations ( ) : ObjectOperations
CreateRemote ( AppDomain domain, ScriptRuntimeSetup setup ) : ScriptRuntime

Creates ScriptRuntime in the current app-domain and initialized according to the the specified settings. Creates an instance of host class specified in the setup and associates it with the created runtime. Both Runtime and ScriptHost are collocated in the specified app-domain.

CreateScope ( ) : ScriptScope
CreateScope ( object>.IDictionary dictionary ) : ScriptScope
CreateScope ( IDynamicMetaObjectProvider storage ) : ScriptScope
CreateScope ( string languageId ) : ScriptScope
CreateScope ( string languageId, object>.IDictionary storage ) : ScriptScope
CreateScope ( string languageId, IDynamicMetaObjectProvider storage ) : ScriptScope
ExecuteFile ( string path ) : ScriptScope
GetEngine ( string languageName ) : ScriptEngine
GetEngineByFileExtension ( string fileExtension ) : ScriptEngine
GetEngineByTypeName ( string assemblyQualifiedTypeName ) : ScriptEngine
InitializeLifetimeService ( ) : object
LoadAssembly ( Assembly assembly ) : void

This method walks the assembly's namespaces and name bindings to ScriptRuntime.Globals to represent the types available in the assembly. Each top-level namespace name gets bound in Globals to a dynamic object representing the namespace. Within each top-level namespace object, nested namespace names are bound to dynamic objects representing each tier of nested namespaces. When this method encounters the same namespace-qualified name, it merges names together objects representing the namespaces.

ScriptRuntime ( ScriptRuntimeSetup setup ) : System

Creates ScriptRuntime in the current app-domain and initialized according to the the specified settings. Creates an instance of host class specified in the setup and associates it with the created runtime. Both Runtime and ScriptHost are collocated in the current app-domain.

Shutdown ( ) : void
TryGetEngine ( string languageName, ScriptEngine &engine ) : bool
TryGetEngineByFileExtension ( string fileExtension, ScriptEngine &engine ) : bool
UseFile ( string path ) : ScriptScope

비공개 메소드들

메소드 설명
GetEngine ( LanguageContext language ) : ScriptEngine

Gets engine for the specified language.

GetEngineNoLockNoNotification ( LanguageContext language, bool &freshEngineCreated ) : ScriptEngine

Looks up the engine for the specified language. If the engine hasn't been created in this Runtime, it is instantiated here. The method doesn't lock nor send notifications to the host.

메소드 상세

CreateFromConfiguration() 공개 정적인 메소드

Creates a new runtime with languages set up according to the current application configuration (using System.Configuration).
public static CreateFromConfiguration ( ) : ScriptRuntime
리턴 ScriptRuntime

CreateOperations() 공개 메소드

public CreateOperations ( ) : ObjectOperations
리턴 ObjectOperations

CreateRemote() 공개 정적인 메소드

Creates ScriptRuntime in the current app-domain and initialized according to the the specified settings. Creates an instance of host class specified in the setup and associates it with the created runtime. Both Runtime and ScriptHost are collocated in the specified app-domain.
public static CreateRemote ( AppDomain domain, ScriptRuntimeSetup setup ) : ScriptRuntime
domain System.AppDomain
setup ScriptRuntimeSetup
리턴 ScriptRuntime

CreateScope() 공개 메소드

public CreateScope ( ) : ScriptScope
리턴 ScriptScope

CreateScope() 공개 메소드

public CreateScope ( object>.IDictionary dictionary ) : ScriptScope
dictionary object>.IDictionary
리턴 ScriptScope

CreateScope() 공개 메소드

public CreateScope ( IDynamicMetaObjectProvider storage ) : ScriptScope
storage IDynamicMetaObjectProvider
리턴 ScriptScope

CreateScope() 공개 메소드

public CreateScope ( string languageId ) : ScriptScope
languageId string
리턴 ScriptScope

CreateScope() 공개 메소드

public CreateScope ( string languageId, object>.IDictionary storage ) : ScriptScope
languageId string
storage object>.IDictionary
리턴 ScriptScope

CreateScope() 공개 메소드

public CreateScope ( string languageId, IDynamicMetaObjectProvider storage ) : ScriptScope
languageId string
storage IDynamicMetaObjectProvider
리턴 ScriptScope

ExecuteFile() 공개 메소드

/// path is empty, contains one or more of the invalid characters defined in GetInvalidPathChars or doesn't have an extension. ///
public ExecuteFile ( string path ) : ScriptScope
path string
리턴 ScriptScope

GetEngine() 공개 메소드

public GetEngine ( string languageName ) : ScriptEngine
languageName string
리턴 ScriptEngine

GetEngineByFileExtension() 공개 메소드

public GetEngineByFileExtension ( string fileExtension ) : ScriptEngine
fileExtension string
리턴 ScriptEngine

GetEngineByTypeName() 공개 메소드

public GetEngineByTypeName ( string assemblyQualifiedTypeName ) : ScriptEngine
assemblyQualifiedTypeName string
리턴 ScriptEngine

InitializeLifetimeService() 공개 메소드

public InitializeLifetimeService ( ) : object
리턴 object

LoadAssembly() 공개 메소드

This method walks the assembly's namespaces and name bindings to ScriptRuntime.Globals to represent the types available in the assembly. Each top-level namespace name gets bound in Globals to a dynamic object representing the namespace. Within each top-level namespace object, nested namespace names are bound to dynamic objects representing each tier of nested namespaces. When this method encounters the same namespace-qualified name, it merges names together objects representing the namespaces.
public LoadAssembly ( Assembly assembly ) : void
assembly System.Reflection.Assembly
리턴 void

ScriptRuntime() 공개 메소드

Creates ScriptRuntime in the current app-domain and initialized according to the the specified settings. Creates an instance of host class specified in the setup and associates it with the created runtime. Both Runtime and ScriptHost are collocated in the current app-domain.
public ScriptRuntime ( ScriptRuntimeSetup setup ) : System
setup ScriptRuntimeSetup
리턴 System

Shutdown() 공개 메소드

public Shutdown ( ) : void
리턴 void

TryGetEngine() 공개 메소드

public TryGetEngine ( string languageName, ScriptEngine &engine ) : bool
languageName string
engine ScriptEngine
리턴 bool

TryGetEngineByFileExtension() 공개 메소드

public TryGetEngineByFileExtension ( string fileExtension, ScriptEngine &engine ) : bool
fileExtension string
engine ScriptEngine
리턴 bool

UseFile() 공개 메소드

path is null file extension does not map to language engine language does not have any search paths file does exist in language's search path
public UseFile ( string path ) : ScriptScope
path string
리턴 ScriptScope