public bool Execute(Person p) { if (_s1.Execute(p) && _s2.Execute(p)) { Message = _s1.Message + " " + _s2.Message; return(true); } return(false); }
public void ExecuteStrategy(IMessage message, IPaxosRoleState currentState) { IMessageStrategy messageStrategy = this.RetrieveMessageStrategy(message); if (messageStrategy == null) { return; } MessageStrategyExecuteArg <IMessage> arg = new MessageStrategyExecuteArg <IMessage> { RoleState = currentState, Message = message }; messageStrategy.Execute(arg); }