C# Class Rhino.Commonjs.Module.Provider.ModuleSourceProviderBase

Inheritance: ModuleSourceProvider
Afficher le fichier Open project: hazzik/Rhino.Net

Méthodes publiques

Méthode Description
LoadSource ( Uri uri, Uri @base, object validator ) : ModuleSource
LoadSource ( string moduleId, Scriptable paths, object validator ) : ModuleSource

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
EnsureTrailingSlash ( string path ) : string
LoadFromPathArray ( string moduleId, Scriptable paths, object validator ) : ModuleSource

Method Details

EntityNeedsRevalidation() protected méthode

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
Résultat bool

LoadFromFallbackLocations() protected méthode

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. ///
Résultat ModuleSource

LoadFromPrivilegedLocations() protected méthode

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. ///
Résultat ModuleSource

LoadFromUri() protected abstract méthode

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. ///
Résultat ModuleSource

LoadSource() public méthode

public LoadSource ( Uri uri, Uri @base, object validator ) : ModuleSource
uri System.Uri
@base System.Uri
validator object
Résultat ModuleSource

LoadSource() public méthode

public LoadSource ( string moduleId, Scriptable paths, object validator ) : ModuleSource
moduleId string
paths Scriptable
validator object
Résultat ModuleSource