Esempio n. 1
0
		public StorageActionsAccessor(TableColumnsCache tableColumnsCache, JET_INSTANCE instance, string databaseName, UuidGenerator uuidGenerator, OrderedPartCollection<AbstractFileCodec> fileCodecs)
		{
			this.tableColumnsCache = tableColumnsCache;
			this.uuidGenerator = uuidGenerator;
			this.fileCodecs = fileCodecs;
			try
			{
				session = new Session(instance);
				transaction = new Transaction(session);
				Api.JetOpenDatabase(session, databaseName, null, out database, OpenDatabaseGrbit.None);
			}
			catch (Exception original)
			{
				log.WarnException("Could not create accessor", original);
				try
				{
					Dispose();
				}
				catch (Exception e)
				{
					log.WarnException("Could not properly dispose accessor after exception in ctor.", e);
				}
				throw;
			}
		}
Esempio n. 2
0
 public StorageActionsAccessor(TableColumnsCache tableColumnsCache, JET_INSTANCE instance, string databaseName, UuidGenerator uuidGenerator, OrderedPartCollection <AbstractFileCodec> fileCodecs)
 {
     this.tableColumnsCache = tableColumnsCache;
     this.uuidGenerator     = uuidGenerator;
     this.fileCodecs        = fileCodecs;
     try
     {
         session     = new Session(instance);
         transaction = new Transaction(session);
         Api.JetOpenDatabase(session, databaseName, null, out database, OpenDatabaseGrbit.None);
     }
     catch (Exception original)
     {
         log.WarnException("Could not create accessor", original);
         try
         {
             Dispose();
         }
         catch (Exception e)
         {
             log.WarnException("Could not properly dispose accessor after exception in ctor.", e);
         }
         throw;
     }
 }
Esempio n. 3
0
		public StorageActionsAccessor(TableColumnsCache tableColumnsCache, JET_INSTANCE instance, string databaseName)
		{
			this.tableColumnsCache = tableColumnsCache;
			try
			{
				session = new Session(instance);
				transaction = new Transaction(session);
				Api.JetOpenDatabase(session, databaseName, null, out database, OpenDatabaseGrbit.None);
			}
			catch (Exception)
			{
				Dispose();
				throw;
			}
		}
		public StorageActionsAccessor(TableColumnsCache tableColumnsCache, JET_INSTANCE instance, string databaseName)
		{
            this.lastEtag = new Guid("ffffffff-ffff-ffff-ffff-ffffffffffff").TransformToValueForEsentSorting();
			this.tableColumnsCache = tableColumnsCache;
			try
			{
				session = new Session(instance);
				transaction = new Transaction(session);
				Api.JetOpenDatabase(session, databaseName, null, out database, OpenDatabaseGrbit.None);
			}
			catch (Exception)
			{
				Dispose();
				throw;
			}
		}
Esempio n. 5
0
 public StorageActionsAccessor(TableColumnsCache tableColumnsCache, JET_INSTANCE instance, string databaseName)
 {
     this.lastEtag          = new Guid("ffffffff-ffff-ffff-ffff-ffffffffffff").TransformToValueForEsentSorting();
     this.tableColumnsCache = tableColumnsCache;
     try
     {
         session     = new Session(instance);
         transaction = new Transaction(session);
         Api.JetOpenDatabase(session, databaseName, null, out database, OpenDatabaseGrbit.None);
     }
     catch (Exception)
     {
         Dispose();
         throw;
     }
 }