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