DBreeze.Storage.RISR.InitRollback C# (CSharp) Method

InitRollback() private method

private InitRollback ( ) : void
return void
        private void InitRollback()
        {
            byte[] btWork = new byte[8];

            RIC.RollbackHelperFilePosition = 0;
            RIC.RollbackHelperFileRead(btWork, 0, 8);
            //_fsRollbackHelper.Position = 0;
            //_fsRollbackHelper.Read(btWork, 0, 8);
            eofRollback = btWork.To_Int64_BigEndian();

            if (eofRollback == 0)
            {
                //if (this._fsRollback.Length >= MaxRollbackFileSize)
                if (RIC.RollbackFileLength >= MaxRollbackFileSize)
                {
                    RIC.RollbackFileRecreate();
                    //this._fsRollback.Close();
                    //File.Delete(this._fileName + ".rol");
                    //this._fsRollback = new FileStream(this._fileName + ".rol", FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None, _fileStreamBufferSize, FileOptions.WriteThrough);

                    //no sense to do anything with backup
                }

                return;
            }

            //!!!Check if data file is empty write first root 64 bytes, ??? Where it must stay after rollback restoration???

            //Restoring rollback
            RestoreInitRollback();

            //Checking if we can recreate rollback file
            //if (this._fsRollback.Length >= MaxRollbackFileSize)
            if (RIC.RollbackFileLength >= MaxRollbackFileSize)
            {
                RIC.RollbackFileRecreate();
                //this._fsRollback.Close();
                //this._fsRollback.Dispose();
                //File.Delete(this._fileName + ".rol");
                //this._fsRollback = new FileStream(this._fileName + ".rol", FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None, _fileStreamBufferSize, FileOptions.WriteThrough);

                //no sense to do anything with backup
            }

            eofRollback = 0;

            RIC.RollbackHelperFilePosition = 0;
            RIC.RollbackHelperFileWrite(eofRollback.To_8_bytes_array_BigEndian(), 0, 8, true);
            //_fsRollbackHelper.Position = 0;
            //_fsRollbackHelper.Write(eofRollback.To_8_bytes_array_BigEndian(), 0, 8);
            //NET_Flush(_fsRollbackHelper);
        }