Exemple #1
0
        /// <summary>
        /// DataFileFlush
        /// </summary>
        /// <returns></returns>
        public byte[] DataFileFlush()
        {
            lock (lock_fs)
            {
                FSR.NET_Flush(_fsData);
            }

            return(new byte[] { ProtocolVersion });
        }
Exemple #2
0
        /// <summary>
        /// RollbackFileFlush
        /// </summary>
        /// <returns></returns>
        public byte[] RollbackFileFlush()
        {
            lock (lock_fs)
            {
                FSR.NET_Flush(_fsRollback);
            }

            return(new byte[] { ProtocolVersion });
        }
Exemple #3
0
        /// <summary>
        /// RollbackFileWrite
        /// </summary>
        /// <param name="position"></param>
        /// <param name="withFlush"></param>
        /// <param name="data"></param>
        /// <returns></returns>
        public byte[] RollbackHelperFileWrite(long position, bool withFlush, byte[] data)
        {
            lock (lock_fs)
            {
                _fsRollbackHelper.Position = position;
                _fsRollbackHelper.Write(data, 0, data.Length);

                if (withFlush)
                {
                    FSR.NET_Flush(_fsRollbackHelper);
                }

                byte[] protocol = new byte[] { ProtocolVersion }   //Protocol version
                .Concat(BitConverter.GetBytes(_fsRollbackHelper.Length));
                return(protocol);
            }
        }