Exemplo n.º 1
0
        public void ReplaceAll(System.Collections.Generic.IList <Test1> data)
        {
            var newData = CloneAndSortBy(data, x => x.Id, System.Collections.Generic.Comparer <int> .Default);
            var table   = new Test1Table(newData);

            memory = new MemoryDatabase(
                memory.QuestTable,
                memory.ItemTable,
                memory.MonsterTable,
                memory.PersonTable,
                table,
                memory.Test2Table

                );
        }
Exemplo n.º 2
0
        public void Diff(Test1[] addOrReplaceData)
        {
            var data    = DiffCore(memory.Test1Table.GetRawDataUnsafe(), addOrReplaceData, x => x.Id, System.Collections.Generic.Comparer <int> .Default);
            var newData = CloneAndSortBy(data, x => x.Id, System.Collections.Generic.Comparer <int> .Default);
            var table   = new Test1Table(newData);

            memory = new MemoryDatabase(
                memory.QuestTable,
                memory.ItemTable,
                memory.MonsterTable,
                memory.PersonTable,
                table,
                memory.Test2Table

                );
        }
Exemplo n.º 3
0
        public void RemoveTest1(int[] keys)
        {
            var data    = RemoveCore(memory.Test1Table.GetRawDataUnsafe(), keys, x => x.Id, System.Collections.Generic.Comparer <int> .Default);
            var newData = CloneAndSortBy(data, x => x.Id, System.Collections.Generic.Comparer <int> .Default);
            var table   = new Test1Table(newData);

            memory = new MemoryDatabase(
                memory.QuestTable,
                memory.ItemTable,
                memory.MonsterTable,
                memory.PersonTable,
                table,
                memory.Test2Table

                );
        }
Exemplo n.º 4
0
 public MemoryDatabase(
     QuestTable QuestTable,
     ItemTable ItemTable,
     MonsterTable MonsterTable,
     PersonTable PersonTable,
     Test1Table Test1Table,
     Test2Table Test2Table
     )
 {
     this.QuestTable   = QuestTable;
     this.ItemTable    = ItemTable;
     this.MonsterTable = MonsterTable;
     this.PersonTable  = PersonTable;
     this.Test1Table   = Test1Table;
     this.Test2Table   = Test2Table;
 }