Exemplo n.º 1
0
 static ProviderFactory()
 {
     if (registry == null)
     {
         registry = new ProviderRegistry();
         Check.Verify(registry.ProviderCount > 0, Error.NoProviders);
     }
 }
Exemplo n.º 2
0
		static ProviderFactory()
		{
			if( registry == null )
			{
				registry = new ProviderRegistry();
				Check.Verify( registry.ProviderCount > 0, Error.NoProviders );
			}
		}
Exemplo n.º 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();
     }
 }
Exemplo n.º 4
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();
			}
		}