C# Class Westwind.Globalization.DbSimpleResourceProvider

Inheritance: IResourceProvider, IWestWindResourceProvider
Mostra file Open project: RickStrahl/Westwind.Globalization Class Usage Examples

Public Properties

Property Type Description
ProviderLoaded bool

Public Methods

Method Description
ClearResourceCache ( ) : void

Clears out the resource cache which forces all resources to be reloaded from the database. This is never actually called as far as I can tell

DbSimpleResourceProvider ( string virtualPath, string resourceSet ) : System

GetImplicitResourceKeys ( string keyPrefix ) : ICollection

Called when an ASP.NET Page is compiled asking for a collection of keys that match a given control name (keyPrefix). This routine for example returns control.Text,control.ToolTip from the Resource collection if they exist when a request for "control" is made as the key prefix.

GetObject ( System.Web.Compilation.ImplicitResourceKey implicitKey, CultureInfo culture ) : object

Returns an Implicit key value from the ResourceSet. Note this method is called only if a ResourceKey was found in the ResourceSet at load time. If a resource cannot be located this method is never called to retrieve it. IOW, GetImplicitResourceKeys determines which keys are actually retrievable. This method simply parses the Implicit key and then retrieves the value using standard GetObject logic for the ResourceID.

Private Methods

Method Description
ConstructFullKey ( System.Web.Compilation.ImplicitResourceKey entry ) : string

Routine that generates a full resource key string from an Implicit Resource Key value

GetObjectInternal ( string resourceKey, string cultureName ) : object

Internal lookup method that handles retrieving a resource by its resource id and culture. Realistically this method is always called with the culture being null or empty but the routine handles resource fallback in case the code is manually called.

GetResourceCache ( string cultureName ) : IDictionary

Manages caching of the Resource Sets. Once loaded the values are loaded from the cache only.

IResourceProvider ( string ResourceKey, CultureInfo Culture ) : object

The main worker method that retrieves a resource key for a given culture from a ResourceSet.

Method Details

ClearResourceCache() public method

Clears out the resource cache which forces all resources to be reloaded from the database. This is never actually called as far as I can tell
public ClearResourceCache ( ) : void
return void

DbSimpleResourceProvider() public method

public DbSimpleResourceProvider ( string virtualPath, string resourceSet ) : System
virtualPath string The virtual path to the Web application
resourceSet string Name of the resource set to load
return System

GetImplicitResourceKeys() public method

Called when an ASP.NET Page is compiled asking for a collection of keys that match a given control name (keyPrefix). This routine for example returns control.Text,control.ToolTip from the Resource collection if they exist when a request for "control" is made as the key prefix.
public GetImplicitResourceKeys ( string keyPrefix ) : ICollection
keyPrefix string
return ICollection

GetObject() public method

Returns an Implicit key value from the ResourceSet. Note this method is called only if a ResourceKey was found in the ResourceSet at load time. If a resource cannot be located this method is never called to retrieve it. IOW, GetImplicitResourceKeys determines which keys are actually retrievable. This method simply parses the Implicit key and then retrieves the value using standard GetObject logic for the ResourceID.
public GetObject ( System.Web.Compilation.ImplicitResourceKey implicitKey, CultureInfo culture ) : object
implicitKey System.Web.Compilation.ImplicitResourceKey
culture System.Globalization.CultureInfo
return object

Property Details

ProviderLoaded public_oe static_oe property

public static bool ProviderLoaded
return bool