Load() public method

public Load ( string key ) : TailBlazer.Domain.Settings.State
key string
return TailBlazer.Domain.Settings.State
コード例 #1
0
        public void WriteComplexState()
        {
            var state = new State(1, "<<something weird<> which breaks xml {}");

            var store = new FileSettingsStore(new NullLogger());
            store.Save("wierdfile", state);

            var restored = store.Load("wierdfile");
            restored.Should().Be(state);
        }
コード例 #2
0
        public void WriteState()
        {
            var state = new State(1, "Test");

            var store  = new FileSettingsStore(new NullLogger());
            store.Save("testfile",state);

            var restored = store.Load("testfile");
            restored.Should().Be(state);
        }