コード例 #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;
			}
		}
コード例 #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;
     }
 }
コード例 #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;
			}
		}
コード例 #4
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;
			}
		}
コード例 #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;
     }
 }