コード例 #1
0
        protected AbstractActions(JET_INSTANCE instance, ColumnsInformation columnsInformation, string database, Guid instanceId)
        {
            logger = LogManager.GetLogger(GetType());
            try
            {
                this.instanceId    = instanceId;
                ColumnsInformation = columnsInformation;
                session            = new Session(instance);

                transaction = new Transaction(session);
                Api.JetOpenDatabase(session, database, null, out dbid, OpenDatabaseGrbit.None);

                queues          = new EsentTable(session, new Table(session, dbid, "queues", OpenTableGrbit.None));
                subqueues       = new EsentTable(session, new Table(session, dbid, "subqueues", OpenTableGrbit.None));
                txs             = new EsentTable(session, new Table(session, dbid, "transactions", OpenTableGrbit.None));
                recovery        = new EsentTable(session, new Table(session, dbid, "recovery", OpenTableGrbit.None));
                outgoing        = new EsentTable(session, new Table(session, dbid, "outgoing", OpenTableGrbit.None));
                outgoingHistory = new EsentTable(session, new Table(session, dbid, "outgoing_history", OpenTableGrbit.None));
                recveivedMsgs   = new EsentTable(session, new Table(session, dbid, "recveived_msgs", OpenTableGrbit.None));
            }
            catch (Exception)
            {
                Dispose();
                throw;
            }
        }
コード例 #2
0
        protected AbstractActions(JET_INSTANCE instance, ColumnsInformation columnsInformation, string database, Guid instanceId)
        {
            logger = LogManager.GetLogger(GetType());
            try
            {
                this.instanceId = instanceId;
                ColumnsInformation = columnsInformation;
                session = new Session(instance);

                transaction = new Transaction(session);
                Api.JetOpenDatabase(session, database, null, out dbid, OpenDatabaseGrbit.None);

                queues = new EsentTable(session, new Table(session, dbid, "queues", OpenTableGrbit.None));
                subqueues = new EsentTable(session, new Table(session, dbid, "subqueues", OpenTableGrbit.None));
                txs = new EsentTable(session, new Table(session, dbid, "transactions", OpenTableGrbit.None));
                recovery = new EsentTable(session, new Table(session, dbid, "recovery", OpenTableGrbit.None));
                outgoing = new EsentTable(session, new Table(session, dbid, "outgoing", OpenTableGrbit.None));
                outgoingHistory = new EsentTable(session, new Table(session, dbid, "outgoing_history", OpenTableGrbit.None));
                recveivedMsgs = new EsentTable(session, new Table(session, dbid, "recveived_msgs", OpenTableGrbit.None));
            }
            catch (Exception)
            {
                Dispose();
                throw;
            }
        }
コード例 #3
0
 private void LoadColumnInformation()
 {
     _columnsInformation = new ColumnsInformation();
     _instance.WithDatabase(_database, (session, dbid) =>
     {
         using (var table = new Table(session, dbid, "subqueues", OpenTableGrbit.ReadOnly))
         {
             _columnsInformation.SubqueuesColumns = Api.GetColumnDictionary(session, table);
         }
         using (var table = new Table(session, dbid, "outgoing_history", OpenTableGrbit.ReadOnly))
         {
             _columnsInformation.OutgoingHistoryColumns = Api.GetColumnDictionary(session, table);
         }
         using (var table = new Table(session, dbid, "outgoing", OpenTableGrbit.ReadOnly))
         {
             _columnsInformation.OutgoingColumns = Api.GetColumnDictionary(session, table);
         }
         using (var table = new Table(session, dbid, "recovery", OpenTableGrbit.ReadOnly))
         {
             _columnsInformation.RecoveryColumns = Api.GetColumnDictionary(session, table);
         }
         using (var table = new Table(session, dbid, "transactions", OpenTableGrbit.ReadOnly))
         {
             _columnsInformation.TxsColumns = Api.GetColumnDictionary(session, table);
         }
         using (var table = new Table(session, dbid, "queues", OpenTableGrbit.ReadOnly))
         {
             _columnsInformation.QueuesColumns = Api.GetColumnDictionary(session, table);
         }
         using (var table = new Table(session, dbid, "recveived_msgs", OpenTableGrbit.ReadOnly))
         {
             _columnsInformation.RecveivedMsgsColumns = Api.GetColumnDictionary(session, table);
         }
     });
 }
コード例 #4
0
 public GlobalActions(JET_INSTANCE instance, ColumnsInformation columnsInformation, string database, Guid instanceId, QueueManagerConfiguration configuration, ILogger logger)
     : base(instance, columnsInformation, database, instanceId, logger)
 {
     this.configuration = configuration;
     _logger = logger;
 }
コード例 #5
0
 public GlobalActions(JET_INSTANCE instance, ColumnsInformation columnsInformation, string database, Guid instanceId, QueueManagerConfiguration configuration)
     : base(instance, columnsInformation, database, instanceId)
 {
     this.configuration = configuration;
 }
コード例 #6
0
 public SenderActions(JET_INSTANCE instance, ColumnsInformation columnsInformation, string database, Guid instanceId, QueueManagerConfiguration configuration)
     : base(instance, columnsInformation, database, instanceId)
 {
     this.configuration = configuration;
 }