コード例 #1
0
ファイル: User.cs プロジェクト: bmavity/MassTransit
        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);
        }
コード例 #2
0
        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);
        }