private static void TryLogConfigurationError(ConfigurationErrorsException configurationException, string instanceName)
 {
     try
     {
         DefaultDataEventLogger eventLogger = EnterpriseLibraryFactory.BuildUp <DefaultDataEventLogger>();
         if (eventLogger != null)
         {
             eventLogger.LogConfigurationError(configurationException, instanceName);
         }
     }
     catch { }
 }
 /// <summary>
 /// Returns an new instance of <typeparamref name="T"/> based on the configuration for <paramref name="name"/>.
 /// </summary>
 /// <param name="name">The name of the required instance.</param>
 /// <returns>
 /// A new instance of <typeparamref name="T"/>, or the singleton instance if <typeparamref name="T"/> allows singletons.
 /// </returns>
 public T Create(string name)
 {
     return(EnterpriseLibraryFactory.BuildUp <T>(locator, name, configurationSource));
 }
 /// <summary>
 /// Returns an instance of <typeparamref name="T"/> based on the default instance configuration.
 /// </summary>
 /// <returns>
 /// A new instance of <typeparamref name="T"/>, or the singleton instance if <typeparamref name="T"/> allows singletons.
 /// </returns>
 public T CreateDefault()
 {
     return(EnterpriseLibraryFactory.BuildUp <T>(locator, configurationSource));
 }