示例#1
0
        static void Main(string[] args)
        {
            IKernel kernel = new StandardKernel(new ServiceModule());

            User user = new User("bayram", "333");
            user.ChangePassword("333333");
            user.Activate();
        }
示例#2
0
        static void Main(string[] args)
        {
            IKernel kernel = new StandardKernel(new ServiceModule());
            IDomainRepository repository = kernel.Get<IDomainRepository>();

            User user = new User("bayram", "333");
            user.ChangePassword("333333");
            user.Activate();

            repository.Add(user);

            ChangePasswordCommand command = new ChangePasswordCommand();
            command.Password = "******";

            ChangePasswordCommandHandler handler = new ChangePasswordCommandHandler(repository);
            handler.Execute(command);
        }
 public UserActivatedEvent(User user)
 {
     this.user = user;
 }
 public PasswordChangedEvent(User user)
 {
     this.user = user;
 }