I am developing a C # application where most of the code base is in C # class libraries. I want the application to support the saving and loading of XML-based project files and the ability to determine if there have been any changes since the last save.
My current design idea is:
Each class that needs to save settings implements IXmlSerializable.
The application maintains a common list of IXmlSerializable settings objects and calls ReadXml and WriteXml to save / load the project files.
Each class in which settings are stored also supports the Modified flag.
An application can check if a project has been modified by listing the general list of IXmlSerializable objects and checking the Modified flag for each. It can also clear the Modified flag every time it is saved.
Is this a good design? Are there any better ones? Perhaps I also need to get my own interface from IXmlSerializable to add the Modified flag?
thanks Andy
I think the concept you go sounds like. I have only one concern, and maybe I read a lot in your wording.
, , WriteXml, . , , , , . XmlSerialization - , .
, , , , , , , . IXmlSerializable , - , .
Source: https://habr.com/ru/post/1764314/More articles:choosing the right IDE - c ++Oracle ODP.NET Alternate Version - oracleWhy doesn't Rails automatically create join table entries? - ruby-on-railsIs it possible to get functionality similar to .NET LINQ in C ++? - c ++https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1764313/using-pipes-to-delete-all-occurences-of-thumbsdb-file-from-ubuntu-laptop&usg=ALkJrhgj9pqR1alGVlfl0muqzmOnpZr1CwDiscovery: first child support - javascriptРазбор Xml с тегом A, который содержит несколько атрибутов [Java, DOM] - javapgpool-II for Postgres - Is that what I need? - postgresqlOverride click in android - android preference settingProblems displaying a glyph using appendBezierPathWithGlyphs - c ++All Articles