public BoldCommand(Text text) { _text = text; }
public UnboldCommand(Text text) { _text = text; }
public static void Main(string[] args) { Text paragraph = new Text(); ICommand bold = new BoldCommand(paragraph); ICommand unbold = new UnboldCommand(paragraph); RichTextEditorInvoker richTextEditor = new RichTextEditorInvoker(); richTextEditor.StoreAndExecute(bold); richTextEditor.StoreAndExecute(unbold); }