Opentribe.Memento 0.1.8

There is a newer version of this package available.
See the version list below for details.
dotnet add package Opentribe.Memento --version 0.1.8
NuGet\Install-Package Opentribe.Memento -Version 0.1.8
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Opentribe.Memento" Version="0.1.8" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Opentribe.Memento --version 0.1.8
#r "nuget: Opentribe.Memento, 0.1.8"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Opentribe.Memento as a Cake Addin
#addin nuget:?package=Opentribe.Memento&version=0.1.8

// Install Opentribe.Memento as a Cake Tool
#tool nuget:?package=Opentribe.Memento&version=0.1.8

// Initialize the Memento // First step is to initialize a Memento object. This object is the “Caretaker” in the memento design pattern. public static Memento.Memento Caretaker { get; set; } = new Memento.Memento();

//Remember and change one attribute //To remember the state of an object, you have to ask the Caretaker to remember each attributes of the object than you are free to modify these attributes.

Caretaker.Remember<MyObject, string>(AnObject, “MyStringAttribute”); // remember

AnObject.MyStringAttribute = “A new state”; // change attribute

Caretaker.Undo(); // restore the previous value

// Remember and change several attributes // To remember the state of an object, you have to ask the Caretaker to remember each attributes of the object than you are free to modify these attributes.

Caretaker.Begin(); // start to remember Caretaker.Remember<MyObject, string>(AnObject, “MyStringAttribute”); // remember first attribute Caretaker.Remember<MyObject, int>(AnObject, “MyIntAttribute”); // remember second attribute Caretaker.End(); // stop registering

AnObject.MyStringAttribute = “A new state”; // change first attribute AnObject.MyIntAttribute = 123; // change second attribute

Caretaker.Undo(); // restores second and first attribute.

Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.2.1 1,042 11/26/2017
0.2.0 910 11/26/2017
0.1.9 825 11/25/2017
0.1.8 914 11/25/2017
0.1.7 804 11/24/2017
0.1.6 838 11/22/2017
0.1.5 834 11/3/2017
0.1.2 854 10/30/2017
0.1.1 855 10/30/2017
0.1.0 827 10/30/2017

First release.