private void TestInstrumentsSaveLoad(string uri) { IDataStore dataStore = DataStoreFactory.CreateDataStore(uri); ICodeStore store = dataStore.CreateInstrumentStore(); List <CodeInfo> codes = MockDataLoader.GetAllInstruments(); store.Save(codes); List <CodeInfo> codes2 = store.Load(); AssertUtils.AssertEqual_List_ToString(codes, codes2); store.Delete(); }
private void init() { List <CodeInfo> codeInfos = instrumentStore.Load(); for (int i = 0; i < codeInfos.Count; i++) { CodeInfo codeInfo = codeInfos[i]; codes.Add(codeInfo); dicCodes.Add(codeInfo.Code.ToUpper(), codeInfo); String catelog = codeInfo.Catelog; if (!catelogs.Contains(catelog)) { catelogs.Add(catelog); } String code = codeInfo.Code; AddDicCodeCatelog(code, catelog); } }