public void Save() { using (TextWriter textWriter = new StreamWriter(_path)) using (JsonWriter writer = new JsonWriter(textWriter)) { PrimaryStore store = new PrimaryStore(); store.Breakpoints = this.Breakpoints; store.CodeTags = this.CodeTags; store.Bookmarks = this.Bookmarks; _serializer.Serialize(writer, store); } }
public void Save() { using( TextWriter textWriter = new StreamWriter( _path ) ) using( JsonWriter writer = new JsonWriter( textWriter ) ) { PrimaryStore store = new PrimaryStore(); store.Breakpoints = this.Breakpoints; store.CodeTags = this.CodeTags; store.Bookmarks = this.Bookmarks; _serializer.Serialize( writer, store ); } }
public void Load() { if (File.Exists(_path) == false) { return; } using (TextReader textReader = File.OpenText(_path)) using (JsonReader reader = new JsonReader(textReader)) { PrimaryStore store = ( PrimaryStore )_serializer.Deserialize(reader, typeof(PrimaryStore)); this.Breakpoints = store.Breakpoints; this.CodeTags = store.CodeTags; this.Bookmarks = store.Bookmarks; } }