public bool CheckPassword(string password) { password.MustNotBeNull(); password.MustNotBeEmpty(); password = password.Trim(); if (_password == password) { DomainContext.Publish(new UserPasswordSuccess(_username)); return(true); } DomainContext.Publish(new UserPasswordFailure(_username)); return(false); }
public bool CheckPassword(string password) { Guard.AgainstNull(password, "password"); Guard.AgainstEmpty(password, "password"); password = password.Trim(); if (_password == password) { DomainContext.Publish(new UserPasswordSuccess(_username)); return(true); } DomainContext.Publish(new UserPasswordFailure(_username)); return(false); }