C# Class Westwind.Globalization.DbResourceConfiguration

The configuration class that is used to configure the Resource Provider. This class contains various configuration settings that the provider requires to operate both at design time and runtime. The application uses the static Current property to access the actual configuration settings object. By default it reads the configuration settings from web.config (at runtime). You can override this behavior by creating your own configuration object and assigning it to the DbResourceConfiguration.Current property.
Inheritance: Westwind.Utilities.Configuration.AppConfiguration
Afficher le fichier Open project: RickStrahl/Westwind.Globalization Class Usage Examples

Méthodes publiques

Свойство Type Description
ConfigurationMode ConfigurationModes
Current DbResourceConfiguration
LoadedProviders List
ResourceSetValueConverters List

Méthodes publiques

Méthode Description
AddResourceSetValueConverter ( IResourceSetValueConverter converter ) : void
ClearResourceCache ( ) : void

This static method clears all resources from the loaded Resource Providers and forces them to be reloaded the next time they are requested. Use this method after you've edited resources in the database and you want to refresh the UI to show the newly changed values. This method works by internally tracking all the loaded ResourceProvider instances and calling the IwwResourceProvider.ClearResourceCache() method on each of the provider instances. This method is called by the Resource Administration form when you explicitly click the Reload Resources button. Class DbResourceConfiguration

CreateDbResourceDataManager ( ) : DbResourceDataManager

Creates an instance of the DbResourceDataManager based on configuration settings

Méthodes protégées

Méthode Description
OnCreateDefaultProvider ( string sectionName, object configData ) : IConfigurationProvider

Override this method to create the custom default provider. Here we allow for different configuration providers so we don't have to rely on .NET configuration classed (for vNext)

Private Methods

Méthode Description
DbResourceConfiguration ( ) : System

Static constructor for the Current property - guarantees this code fires exactly once giving us a singleton instance of the configuration object.

Method Details

AddResourceSetValueConverter() public méthode

public AddResourceSetValueConverter ( IResourceSetValueConverter converter ) : void
converter IResourceSetValueConverter
Résultat void

ClearResourceCache() public static méthode

This static method clears all resources from the loaded Resource Providers and forces them to be reloaded the next time they are requested. Use this method after you've edited resources in the database and you want to refresh the UI to show the newly changed values. This method works by internally tracking all the loaded ResourceProvider instances and calling the IwwResourceProvider.ClearResourceCache() method on each of the provider instances. This method is called by the Resource Administration form when you explicitly click the Reload Resources button. Class DbResourceConfiguration
public static ClearResourceCache ( ) : void
Résultat void

CreateDbResourceDataManager() public static méthode

Creates an instance of the DbResourceDataManager based on configuration settings
public static CreateDbResourceDataManager ( ) : DbResourceDataManager
Résultat DbResourceDataManager

OnCreateDefaultProvider() protected méthode

Override this method to create the custom default provider. Here we allow for different configuration providers so we don't have to rely on .NET configuration classed (for vNext)
protected OnCreateDefaultProvider ( string sectionName, object configData ) : IConfigurationProvider
sectionName string
configData object
Résultat IConfigurationProvider

Property Details

ConfigurationMode public_oe static_oe property

Determines how configuration information is stored: Config, Json or XML Default uses .NET configuration files.
public static ConfigurationModes ConfigurationMode
Résultat ConfigurationModes

Current public_oe static_oe property

A global instance of the current configuration. By default this instance reads its configuration values from web.config at runtime, but it can be overridden to assign specific values or completely replace this object. NOTE: Any assignment made to this property should be made at Application_Start or other 'application initialization' event so that these settings are applied BEFORE the resource provider is used for the first time.
public static DbResourceConfiguration,Westwind.Globalization Current
Résultat DbResourceConfiguration

LoadedProviders public_oe static_oe property

Keep track of loaded providers so we can unload them
public static List LoadedProviders
Résultat List

ResourceSetValueConverters public_oe property

public List ResourceSetValueConverters
Résultat List