Skip to content

Instantly share code, notes, and snippets.

@adilakhter
Last active December 16, 2015 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adilakhter/5355510 to your computer and use it in GitHub Desktop.
Save adilakhter/5355510 to your computer and use it in GitHub Desktop.
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