Click here to Skip to main content
15,896,359 members
Articles / Programming Languages / C#

Generic Memento Pattern for Undo-Redo in C#

Rate me:
Please Sign up or sign in to vote.
4.81/5 (89 votes)
16 Mar 20074 min read 242.3K   5.3K   169  
Improved Memento pattern particularly designed to support undo and redo.

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual C# Express 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GenericUndoRedo", "GenericUndoRedo\GenericUndoRedo.csproj", "{E5323F74-C017-4AD0-9FA1-E53AB85B23BF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShapeLib", "ShapeLib\ShapeLib.csproj", "{1DB67F3F-94D4-43A1-A2FA-B4AF78B9EC5E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UndoRedoBySeralizationDemo", "UndoRedoBySeralizationDemo\UndoRedoBySeralizationDemo.csproj", "{C0ABFCDE-A1B9-4A52-8979-B4590BCC6731}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UndoRedoByActionDemo", "UndoRedoByActionDemo\UndoRedoByActionDemo.csproj", "{7636524D-5BEF-4D71-A1AB-CC162C62EA17}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{E5323F74-C017-4AD0-9FA1-E53AB85B23BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{E5323F74-C017-4AD0-9FA1-E53AB85B23BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{E5323F74-C017-4AD0-9FA1-E53AB85B23BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{E5323F74-C017-4AD0-9FA1-E53AB85B23BF}.Release|Any CPU.Build.0 = Release|Any CPU
		{1DB67F3F-94D4-43A1-A2FA-B4AF78B9EC5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{1DB67F3F-94D4-43A1-A2FA-B4AF78B9EC5E}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{1DB67F3F-94D4-43A1-A2FA-B4AF78B9EC5E}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{1DB67F3F-94D4-43A1-A2FA-B4AF78B9EC5E}.Release|Any CPU.Build.0 = Release|Any CPU
		{C0ABFCDE-A1B9-4A52-8979-B4590BCC6731}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{C0ABFCDE-A1B9-4A52-8979-B4590BCC6731}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{C0ABFCDE-A1B9-4A52-8979-B4590BCC6731}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{C0ABFCDE-A1B9-4A52-8979-B4590BCC6731}.Release|Any CPU.Build.0 = Release|Any CPU
		{7636524D-5BEF-4D71-A1AB-CC162C62EA17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{7636524D-5BEF-4D71-A1AB-CC162C62EA17}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{7636524D-5BEF-4D71-A1AB-CC162C62EA17}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{7636524D-5BEF-4D71-A1AB-CC162C62EA17}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Software Developer
Singapore Singapore
This guy loves computer programming, software design and development. He is interested and specialized in C family languages, especially C#, Java, Objective-C and D Programming Language. Ruby and Python are starting to interest him as well.

Comments and Discussions