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

Inheritance: ModuleSourceProviderBase
Datei anzeigen Open project: hazzik/Rhino.Net

Public Methods

Method Description
UrlModuleSourceProvider ( IEnumerable privilegedUris, IEnumerable fallbackUris ) : System

Creates a new module script provider that loads modules against a set of privileged and fallback URIs.

Creates a new module script provider that loads modules against a set of privileged and fallback URIs. It will use a fixed default cache expiry of 60 seconds, and provide no security domain objects for the resource.

UrlModuleSourceProvider ( IEnumerable privilegedUris, IEnumerable fallbackUris, UrlConnectionExpiryCalculator urlConnectionExpiryCalculator, UrlConnectionSecurityDomainProvider urlConnectionSecurityDomainProvider ) : System

Creates a new module script provider that loads modules against a set of privileged and fallback URIs.

Creates a new module script provider that loads modules against a set of privileged and fallback URIs. It will use the specified heuristic cache expiry calculator and security domain provider.

Protected Methods

Method Description
EntityNeedsRevalidation ( object validator ) : bool
LoadFromActualUri ( Uri uri, Uri @base, object validator ) : ModuleSource
LoadFromFallbackLocations ( string moduleId, object validator ) : ModuleSource
LoadFromPrivilegedLocations ( string moduleId, object validator ) : ModuleSource
LoadFromUri ( Uri uri, Uri @base, object validator ) : ModuleSource
OnFailedClosingUrlConnection ( Sharpen.URLConnection urlConnection, IOException cause ) : void

Override if you want to get notified if the URL connection fails to close.

Override if you want to get notified if the URL connection fails to close. Does nothing by default.

OpenUrlConnection ( Uri url ) : Sharpen.URLConnection

Can be overridden in subclasses to customize the URL connection opening process.

Can be overridden in subclasses to customize the URL connection opening process. By default, just calls System.Uri.OpenConnection() .

Private Methods

Method Description
Close ( Sharpen.URLConnection urlConnection ) : void
GetCharacterEncoding ( Sharpen.URLConnection urlConnection ) : string
GetReader ( Sharpen.URLConnection urlConnection ) : TextReader
GetSecurityDomain ( Sharpen.URLConnection urlConnection ) : object
LoadFromPathList ( string moduleId, object validator, IEnumerable paths ) : ModuleSource

Method Details

EntityNeedsRevalidation() protected method

protected EntityNeedsRevalidation ( object validator ) : bool
validator object
return bool

LoadFromActualUri() protected method

protected LoadFromActualUri ( Uri uri, Uri @base, object validator ) : ModuleSource
uri System.Uri
@base System.Uri
validator object
return ModuleSource

LoadFromFallbackLocations() protected method

protected LoadFromFallbackLocations ( string moduleId, object validator ) : ModuleSource
moduleId string
validator object
return ModuleSource

LoadFromPrivilegedLocations() protected method

protected LoadFromPrivilegedLocations ( string moduleId, object validator ) : ModuleSource
moduleId string
validator object
return ModuleSource

LoadFromUri() protected method

protected LoadFromUri ( Uri uri, Uri @base, object validator ) : ModuleSource
uri System.Uri
@base System.Uri
validator object
return ModuleSource

OnFailedClosingUrlConnection() protected method

Override if you want to get notified if the URL connection fails to close.
Override if you want to get notified if the URL connection fails to close. Does nothing by default.
protected OnFailedClosingUrlConnection ( Sharpen.URLConnection urlConnection, IOException cause ) : void
urlConnection Sharpen.URLConnection the connection
cause System.IO.IOException the cause it failed to close.
return void

OpenUrlConnection() protected method

Can be overridden in subclasses to customize the URL connection opening process.
Can be overridden in subclasses to customize the URL connection opening process. By default, just calls System.Uri.OpenConnection() .
if an I/O error occurs.
protected OpenUrlConnection ( Uri url ) : Sharpen.URLConnection
url System.Uri the URL
return Sharpen.URLConnection

UrlModuleSourceProvider() public method

Creates a new module script provider that loads modules against a set of privileged and fallback URIs.
Creates a new module script provider that loads modules against a set of privileged and fallback URIs. It will use a fixed default cache expiry of 60 seconds, and provide no security domain objects for the resource.
public UrlModuleSourceProvider ( IEnumerable privilegedUris, IEnumerable fallbackUris ) : System
privilegedUris IEnumerable /// an iterable providing the privileged URIs. Can be /// null if no privileged URIs are used. ///
fallbackUris IEnumerable /// an iterable providing the fallback URIs. Can be /// null if no fallback URIs are used. ///
return System

UrlModuleSourceProvider() public method

Creates a new module script provider that loads modules against a set of privileged and fallback URIs.
Creates a new module script provider that loads modules against a set of privileged and fallback URIs. It will use the specified heuristic cache expiry calculator and security domain provider.
public UrlModuleSourceProvider ( IEnumerable privilegedUris, IEnumerable fallbackUris, UrlConnectionExpiryCalculator urlConnectionExpiryCalculator, UrlConnectionSecurityDomainProvider urlConnectionSecurityDomainProvider ) : System
privilegedUris IEnumerable /// an iterable providing the privileged URIs. Can be /// null if no privileged URIs are used. ///
fallbackUris IEnumerable /// an iterable providing the fallback URIs. Can be /// null if no fallback URIs are used. ///
urlConnectionExpiryCalculator UrlConnectionExpiryCalculator /// the calculator object for heuristic /// calculation of the resource expiry, used when no expiry is provided by /// the server of the resource. Can be null, in which case the maximum age /// of cached entries without validation will be zero. ///
urlConnectionSecurityDomainProvider UrlConnectionSecurityDomainProvider /// object that provides security /// domain objects for the loaded sources. Can be null, in which case the /// loaded sources will have no security domain associated with them. ///
return System