public static void SaveCharts(ChartManager Charts) { string LeftListRaw = GetSeries(Charts.Left); string RightListRaw = GetSeries(Charts.Right); StateStore.Set("GraphLeftSeries", LeftListRaw); StateStore.Set("GraphRightSeries", RightListRaw); StateStore.Save(); }
public void BasicStateStoreTest() { const string Key = "TestValue-BASIC"; StateStore.Start("StateStoreTests"); StateStore.Set(Key, "TestValue-1"); StateStore.Set(Key, "TestValue-2"); StateStore.Set(Key, "TestValue-0"); StateStore.Set(Key, "TestValue-3"); StateStore.Set(Key, "TestValue-4"); StateStore.Set(Key, "TestValue-5"); StateStore.Set(Key, "TestValue-6"); StateStore.Set(Key, "TestValue-7"); StateStore.Set(Key, "TestValue-8"); StateStore.Set(Key, "TestValue-9"); StateStore.Set(Key, "TestValue-10"); Assert.AreEqual("TestValue-10", StateStore.Get(Key)); Assert.AreEqual(null, StateStore.Get("ThisValueIsNotInTheDictionary")); StateStore.Save(); }
private void SetValueForThreadTest(object Value) { Thread.Sleep(1500); StateStore.Set("TestValue-THREADING", (string)Value); }