Skip to content

Commit 59d3e42

Browse files
committed
grrr
1 parent 6c2f82c commit 59d3e42

File tree

1 file changed

+4
-4
lines changed
  • docs/document/Csharp Design Patterns/docs/Behavioural

1 file changed

+4
-4
lines changed

docs/document/Csharp Design Patterns/docs/Behavioural/Command.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ public abstract class CompositeCommand<T> : List<T>, ICommand where T : class?,
227227
}
228228
```
229229

230+
Then we can try a deletion with count that exceeds the current content length, which should rollback the content to initial `hello`.
231+
230232
```cs
231233
var editor = new Editor(content: "hello");
232234

@@ -240,8 +242,6 @@ var combined = new EditorCompositeCommand() { commandInsert, commandDelete, wron
240242
241243
combined.Execute();
242244

243-
class EditorCompositeCommand : CompositeCommand<EditorCommand>
244-
{
245-
246-
}
245+
// default implementations are just fine for this.
246+
class EditorCompositeCommand : CompositeCommand<EditorCommand>;
247247
```

0 commit comments

Comments
 (0)