Ejemplo n.º 1
0
 public virtual void Shutdown()
 {
     if (!m_Initialized)
     {
         return;
     }
     CloseAll();
     m_Writer          = null;
     m_Reader          = null;
     m_Initialized     = false;
     transactionsAdded = null;
 }
Ejemplo n.º 2
0
        public virtual bool Init()
        {
            if (m_Initialized)
            {
                return(true);
            }

            MakeDBFolder();

            m_Writer = new TransactionWriter(m_FilePath, HeaderSize);
            var opened = m_Writer.Open();

            m_Reader = new TransactionReader(m_FilePath, HeaderSize);
            opened  &= OpenReader();

            FixHeader();

            m_Initialized = opened;
            return(opened);
        }
Ejemplo n.º 3
0
        public override bool Init()
        {
            if (m_Initialized)
            {
                return(true);
            }

            m_Reader = new TransactionReader(m_FilePath, TransactionManager.HeaderSize);
            var opened = OpenReader();

            if (!opened)
            {
                return(false);
            }

            if (!ValidateHeader())
            {
                return(false);
            }

            m_Initialized = true;
            return(true);
        }