96
private Stack<IUndoableCommand> stack = new Stack<IUndoableCommand>();
1
using System;
2
using System.Collections;
3
using System.Collections.Generic;
4
5
public interface ICommand
6
{
7
void Execute();
8
}
9
10
public interface IUndoableCommand: ICommand
11
{
12
void Unexecute();
13
}
14
15
public class Document
16
{
17
public string Content {get; set;}
18
public void MakeBold()
19
{
20
Content = "<b>" + Content + "</b>";
21
}
22
}
23
24
public class BoldCommand: IUndoableCommand
Cached Result
result: 0.428571428571429