public ClientRegistered(ClientId clientId, IdentityNumber identityNumber, PersonName clientName, TelephoneNumber primaryContactNumber) { ClientId = clientId; IdentityNumber = identityNumber; ClientName = clientName; PrimaryContactNumber = primaryContactNumber; }
void IHandleClientStateTransitions.When(ClientRegistered @event) { Identity = @event.ClientId; identityNumber = @event.IdentityNumber; clientName = @event.ClientName; primaryContactNumber = @event.PrimaryContactNumber; dateOfBirth = @event.IdentityNumber.GetDateOfBirth(); }
public virtual bool Equals(IdentityNumber other) { if (null != other && other.GetType() == GetType()) { return other.Number.Equals(Number); } return false; }
public RegisterClient(IdentityNumber identityNumber, PersonName clientName, TelephoneNumber primaryContactNumber) { Mandate.ParameterNotDefaut(identityNumber, "identityNumber"); Mandate.ParameterNotDefaut(clientName, "clientName"); Mandate.ParameterNotDefaut(primaryContactNumber, "primaryContactNumber"); IdentityNumber = identityNumber; ClientName = clientName; PrimaryContactNumber = primaryContactNumber; }
public void Build(string[] args) { if (args.Length != 4) { throw new Exception(String.Format("Error. Usage is: {0}", Usage)); } ClientName = new PersonName(args[0], args[1]); IdentityNumber = new IdentityNumber(args[2]); PrimaryContactNumber = new TelephoneNumber(args[3]); }
public ClientRegistered(ClientId clientId, IdentityNumber identityNumber, PersonName clientName, TelephoneNumber primaryContactNumber) { Mandate.ParameterNotNull(clientId, "clientId"); Mandate.ParameterNotDefaut(identityNumber, "identityNumber"); Mandate.ParameterNotDefaut(clientName, "clientName"); Mandate.ParameterNotDefaut(primaryContactNumber, "primaryContactNumber"); ClientId = clientId; IdentityNumber = identityNumber; ClientName = clientName; PrimaryContactNumber = primaryContactNumber; }
protected override void RestoreSnapshot(IMemento memento) { var snapshot = (ClientSnapshot)memento; dateOfBirth = snapshot.DateOfBirth; clientName = snapshot.ClientName; primaryContactNumber = snapshot.PrimaryContactNumber; identityNumber = snapshot.IdentityNumber; isDeceased = snapshot.IsDeceased; }
public Client Get(IdentityNumber identityNumber) { return Get(new ClientId(identityNumber)); }