C# 클래스 Rhino.Commonjs.Module.Provider.ModuleSourceProviderBase

상속: ModuleSourceProvider
파일 보기 프로젝트 열기: hazzik/Rhino.Net

공개 메소드들

메소드 설명
LoadSource ( Uri uri, Uri @base, object validator ) : ModuleSource
LoadSource ( string moduleId, Scriptable paths, object validator ) : ModuleSource

보호된 메소드들

메소드 설명
EntityNeedsRevalidation ( object validator ) : bool

Override to determine whether according to the validator, the cached module script needs revalidation.

Override to determine whether according to the validator, the cached module script needs revalidation. A validator can carry expiry information. If the cached representation is not expired, it doesn' t need revalidation, otherwise it does. When no cache revalidation is required, the external resource will not be contacted at all, so some level of expiry (staleness tolerance) can greatly enhance performance. The default implementation always returns true so it will always require revalidation.

LoadFromFallbackLocations ( string moduleId, object validator ) : ModuleSource

Override to obtain a module source from fallback locations.

Override to obtain a module source from fallback locations. This will be called after source is attempted to be obtained from URIs specified in require.paths.

LoadFromPrivilegedLocations ( string moduleId, object validator ) : ModuleSource

Override to obtain a module source from privileged locations.

Override to obtain a module source from privileged locations. This will be called before source is attempted to be obtained from URIs specified in require.paths.

LoadFromUri ( Uri uri, Uri @base, object validator ) : ModuleSource

Override in a subclass to load a module script from a logical URI.

Override in a subclass to load a module script from a logical URI. The URI is absolute but does not have a file name extension such as ".js". It is up to the ModuleSourceProvider implementation to add such an extension.

비공개 메소드들

메소드 설명
EnsureTrailingSlash ( string path ) : string
LoadFromPathArray ( string moduleId, Scriptable paths, object validator ) : ModuleSource

메소드 상세

EntityNeedsRevalidation() 보호된 메소드

Override to determine whether according to the validator, the cached module script needs revalidation.
Override to determine whether according to the validator, the cached module script needs revalidation. A validator can carry expiry information. If the cached representation is not expired, it doesn' t need revalidation, otherwise it does. When no cache revalidation is required, the external resource will not be contacted at all, so some level of expiry (staleness tolerance) can greatly enhance performance. The default implementation always returns true so it will always require revalidation.
protected EntityNeedsRevalidation ( object validator ) : bool
validator object the validator
리턴 bool

LoadFromFallbackLocations() 보호된 메소드

Override to obtain a module source from fallback locations.
Override to obtain a module source from fallback locations. This will be called after source is attempted to be obtained from URIs specified in require.paths.
/// if the module script was found, but an I/O exception /// prevented it from being loaded. /// if the final URI could not be constructed.
protected LoadFromFallbackLocations ( string moduleId, object validator ) : ModuleSource
moduleId string the ID of the module
validator object /// a validator that can be used to validate an existing /// cached script. Can be null if there is no cached script available. ///
리턴 ModuleSource

LoadFromPrivilegedLocations() 보호된 메소드

Override to obtain a module source from privileged locations.
Override to obtain a module source from privileged locations. This will be called before source is attempted to be obtained from URIs specified in require.paths.
/// if the module script was found, but an I/O exception /// prevented it from being loaded. /// if the final URI could not be constructed.
protected LoadFromPrivilegedLocations ( string moduleId, object validator ) : ModuleSource
moduleId string the ID of the module
validator object /// a validator that can be used to validate an existing /// cached script. Can be null if there is no cached script available. ///
리턴 ModuleSource

LoadFromUri() 보호된 추상적인 메소드

Override in a subclass to load a module script from a logical URI.
Override in a subclass to load a module script from a logical URI. The URI is absolute but does not have a file name extension such as ".js". It is up to the ModuleSourceProvider implementation to add such an extension.
/// if the module script was found, but an I/O exception /// prevented it from being loaded. /// if the final URI could not be constructed
protected abstract LoadFromUri ( Uri uri, Uri @base, object validator ) : ModuleSource
uri System.Uri the URI of the script, without file name extension.
@base System.Uri
validator object /// a validator that can be used to revalidate an existing /// cached source at the URI. Can be null if there is no cached source /// available. ///
리턴 ModuleSource

LoadSource() 공개 메소드

public LoadSource ( Uri uri, Uri @base, object validator ) : ModuleSource
uri System.Uri
@base System.Uri
validator object
리턴 ModuleSource

LoadSource() 공개 메소드

public LoadSource ( string moduleId, Scriptable paths, object validator ) : ModuleSource
moduleId string
paths Scriptable
validator object
리턴 ModuleSource