Beispiel #1
0
 static ProviderFactory()
 {
     if (registry == null)
     {
         registry = new ProviderRegistry();
         Check.Verify(registry.ProviderCount > 0, Error.NoProviders);
     }
 }
		static ProviderFactory()
		{
			if( registry == null )
			{
				registry = new ProviderRegistry();
				Check.Verify( registry.ProviderCount > 0, Error.NoProviders );
			}
		}
Beispiel #3
0
 /// <summary>
 /// Clear all caches (metadata and providers). Call this method after updating the
 /// default provider connection string.
 /// </summary>
 /// <param name="clearObjectMapCache">True to clear the internal metadata cache (a list
 /// of ObjectMap entries stored in a static variable in the ObjectFactory class).</param>
 public static void ResetGentle(bool clearObjectMapCache)
 {
     lock ( providerLock )
     {
         Broker.ClearPersistenceBroker();
         if (clearObjectMapCache)
         {
             ObjectFactory.ClearMaps();
         }
         providers.Clear();
         registry = new ProviderRegistry();
     }
 }
		/// <summary>
		/// Clear all caches (metadata and providers). Call this method after updating the
		/// default provider connection string.
		/// </summary>
		/// <param name="clearObjectMapCache">True to clear the internal metadata cache (a list
		/// of ObjectMap entries stored in a static variable in the ObjectFactory class).</param>
		public static void ResetGentle( bool clearObjectMapCache )
		{
			lock( providerLock )
			{
				Broker.ClearPersistenceBroker();
				if( clearObjectMapCache )
				{
					ObjectFactory.ClearMaps();
				}
				providers.Clear();
				registry = new ProviderRegistry();
			}
		}