public void TestSerializesProperties() { var instance = new ClassWithProperties { A = 1, B = 2, C = "foo" }; Serializer.Bind(() => instance.A); Serializer.Bind(() => instance.B); Serializer.Bind(() => instance.C); Scheduler.WaitFor(Serializer.Save()); Assert.AreEqual(1, (int)Scheduler.WaitFor(Tangle.Get("A"))); Assert.AreEqual(2, (int)Scheduler.WaitFor(Tangle.Get("B"))); Assert.AreEqual("foo", (string)Scheduler.WaitFor(Tangle.Get("C"))); }
private void OK_Click(object sender, EventArgs e) { Program.Scheduler.WaitFor(PreferenceSerializer.Save()); }