A persistence store based on an append-only log.
Inheritance: PersistenceStore
コード例 #1
0
ファイル: Dump.cs プロジェクト: hallambaker/Mathematical-Mesh
        public static void Write (string File) {

            var Store = new LogPersistenceStore(File);

            foreach (var Record in Store) {
                Console.Write("Got Record Key {0} ID {1}", Record.PrimaryKey, Record.TransactionID);
                foreach (var Key in Record.Keys) {
                    Write(Key);
                    }
                }

            }
コード例 #2
0
        /// <summary>
        /// Dump out records in a specified log
        /// </summary>
        /// <param name="File">Filename of log file to dump.</param>
        public static void Dump(string File) {

            var Store = new LogPersistenceStore(File);

            foreach (var Record in Store) {
                Console.WriteLine("Record Key {0} ID {1}", Record.PrimaryKey, Record.TransactionID);
                if (Record.Keys != null) {
                    foreach (var Key in Record.Keys) {
                        Dump(Key);
                        }
                    }
                if (Record as DataItem != null) {
                    Dump(Record as DataItem);
                    }
                }

            }