You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
693 B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Command.Commands
{
internal class ComplexCommand : ICommand
{
private Receiver _receiver;
private string _a;
private string _b;
public ComplexCommand(Receiver receiver, string a, string b)
{
_receiver = receiver;
_a = a;
_b = b;
}
public void Execute()
{
Console.WriteLine("ComplexCommand: Complex stuff should be done by a receiver object.");
_receiver.DoSomething(_a);
_receiver.DoSomething(_b);
}
}
}