用于保存文件/项目/工作单元状态的 C# 设计模式
大家早上好。
我们有一个基于项目的应用程序,因此用户打开并创建一个项目,然后他们在该项目中执行的许多操作可能需要也可能不需要保存状态。
我一直在四处寻找是否有一个可接受的模式。我认为描述它的最好方法是考虑 Visual Studio,我正在寻找一种模式,旨在识别其中一个类何时发生更改(将小星放在选项卡上),并为保存例程提供一种方法知道需要保存什么/是否需要保存任何内容。
提前致谢。
Morning Everyone.
We have an application that is project based, so the user opens, create a project then there are many things that they do within that project that may or maynot need their state saving.
I have been looking around trying to find if there was an accepted pattern for this. I think the best way to describe it is to think of Visual Studio, what I am looking for is a pattern designed to recognise when one of the classes changes (putting the little star on the tab) and provides a way for the save routine to know what it needs to save / if anything needs to be saved.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来最适合纪念品模式。
Looks best fit for Memento pattern.