public static void Init(IObjectContextStorage storage, IObjectContextFactory factory)
        {
            _storage = storage;
            _factory = factory;

            ObjectContextInitializer.Instance().InitializeObjectContextOnce(InitializeObjectContexts);
        }
 public static void InitStorage(IObjectContextStorage storage)
 {
     if (storage == null)
     {
         throw new ArgumentNullException("storage");
     }
     if ((Storage != null) && (Storage != storage))
     {
         throw new ApplicationException("A storage mechanism has already been configured for this application");
     }
     Storage = storage;
 }
Beispiel #3
0
 public static void InitStorage(IObjectContextStorage storage)
 {
     if (storage == null)
     {
         throw new ArgumentNullException("storage");
     }
     if ((Storage != null) && (Storage != storage))
     {
         throw new ApplicationException("A storage mechanism has already been configured for this application");
     }
     Storage = storage;
 }
        public static void Init(IObjectContextStorage storage, IObjectContextFactory factory)
        {
            if (storage == null) throw new ArgumentNullException("storage");
            if (factory == null) throw new ArgumentNullException("factory");

            if ((Storage != null) && (Storage != storage))
            {
                throw new ApplicationException("A storage mechanism has already been configured for this application");
            }
            Storage = storage;
            Factory = factory;
        }