Skip to content

Instantly share code, notes, and snippets.

@adilakhter
Last active Dec 16, 2015
Embed
What would you like to do?
private static void Instantiate(PersistenceProviderConfigSection configSection){
if (Providers == null)
SetupProvider(configSection);
}
private static void SetupProvider(PersistenceProviderConfigSection config){
if (config == null)
throw new Exception("PersistenceProvider are not configured to be used with this application");
Providers = new PersistenceProviderCollection();
ProvidersHelper.InstantiateProviders(config.Providers, Providers, typeof(PersistenceProviderBase));
DefaultProvider = Providers[config.DefaultProvider] as PersistenceProviderBase;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment