Exemplo n.º 1
0
 public MemoryDatabase(
     PersonModelTable PersonModelTable,
     QuestMasterTable QuestMasterTable,
     ItemMasterTable ItemMasterTable,
     QuestMasterEmptyValidateTable QuestMasterEmptyValidateTable,
     ItemMasterEmptyValidateTable ItemMasterEmptyValidateTable,
     SequentialCheckMasterTable SequentialCheckMasterTable,
     SingleMasterTable SingleMasterTable,
     FailTable FailTable,
     SampleTable SampleTable,
     SkillMasterTable SkillMasterTable,
     TestMasterTable TestMasterTable,
     UserLevelTable UserLevelTable
     )
 {
     this.PersonModelTable = PersonModelTable;
     this.QuestMasterTable = QuestMasterTable;
     this.ItemMasterTable  = ItemMasterTable;
     this.QuestMasterEmptyValidateTable = QuestMasterEmptyValidateTable;
     this.ItemMasterEmptyValidateTable  = ItemMasterEmptyValidateTable;
     this.SequentialCheckMasterTable    = SequentialCheckMasterTable;
     this.SingleMasterTable             = SingleMasterTable;
     this.FailTable        = FailTable;
     this.SampleTable      = SampleTable;
     this.SkillMasterTable = SkillMasterTable;
     this.TestMasterTable  = TestMasterTable;
     this.UserLevelTable   = UserLevelTable;
 }
Exemplo n.º 2
0
        public void ReplaceAll(System.Collections.Generic.IList <PersonModel> data)
        {
            var newData = CloneAndSortBy(data, x => x.RandomId, System.StringComparer.Ordinal);
            var table   = new PersonModelTable(newData);

            memory = new MemoryDatabase(
                table,
                memory.QuestMasterTable,
                memory.ItemMasterTable,
                memory.QuestMasterEmptyValidateTable,
                memory.ItemMasterEmptyValidateTable,
                memory.SequentialCheckMasterTable,
                memory.SingleMasterTable,
                memory.FailTable,
                memory.SampleTable,
                memory.SkillMasterTable,
                memory.TestMasterTable,
                memory.UserLevelTable

                );
        }
Exemplo n.º 3
0
        public void Diff(PersonModel[] addOrReplaceData)
        {
            var data    = DiffCore(memory.PersonModelTable.GetRawDataUnsafe(), addOrReplaceData, x => x.RandomId, System.StringComparer.Ordinal);
            var newData = CloneAndSortBy(data, x => x.RandomId, System.StringComparer.Ordinal);
            var table   = new PersonModelTable(newData);

            memory = new MemoryDatabase(
                table,
                memory.QuestMasterTable,
                memory.ItemMasterTable,
                memory.QuestMasterEmptyValidateTable,
                memory.ItemMasterEmptyValidateTable,
                memory.SequentialCheckMasterTable,
                memory.SingleMasterTable,
                memory.FailTable,
                memory.SampleTable,
                memory.SkillMasterTable,
                memory.TestMasterTable,
                memory.UserLevelTable

                );
        }