public static TResult ExecuteUnitOfWorkInIsolatedScope <TResult>(this IWindsorContainer me, Func <TResult> function)
 {
     using (me.BeginScope())
     {
         return(me.ExecuteUnitOfWork(function));
     }
 }
 public static void ExecuteUnitOfWorkInIsolatedScope(this IWindsorContainer me, Action action)
 {
     using (me.BeginScope())
     {
         me.ExecuteUnitOfWork(action);
     }
 }
Exemplo n.º 3
0
        public Account Execute()
        {
            return(_container.ExecuteUnitOfWork(
                       () =>
            {
                var repository = _container.Resolve <IAccountRepository>();
                var duplicateAccountChecker = _container.Resolve <IDuplicateAccountChecker>();
                var registered = Account.Register(Email, Password, AccountId, repository, duplicateAccountChecker);

                return registered;
            }));
        }
Exemplo n.º 4
0
 public void Execute()
 {
     _container.ExecuteUnitOfWork(() => Account.ChangePassword(
                                      oldPassword: OldPassword,
                                      newPassword: NewPassword));
 }
Exemplo n.º 5
0
 public void Execute()
 {
     _container.ExecuteUnitOfWork(() => Account.ChangeEmail(NewEmail));
 }