Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- interface ICommand
- {
- void Execute();
- }
- interface IAnotherCommand: ICommand
- {
- void DernutAnus();
- }
- interface IOneMoreCommand : ICommand
- {
- void Abc();
- }
- /////////////////////////////////
- foreach(ICommand command from ListOfCommands)
- {
- //дополнительные действия
- if(bla-bla-bla)
- {
- (IAnotherCommand)command.DernutAnus();
- }
- command.Run();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement