public CreateUserPageViewModel(ICreateUserService createUserService,
     ISaveUserSecurityService saveUserSecurityService, IDialogService dialogService)
 {
     CreateUserService = createUserService;
     SaveUserSecurityService = saveUserSecurityService;
     DialogService = dialogService;
 }
Exemple #2
0
 public CreateUserPageViewModel(ICreateUserService createUserService,
                                ISaveUserSecurityService saveUserSecurityService, IDialogService dialogService)
 {
     CreateUserService       = createUserService;
     SaveUserSecurityService = saveUserSecurityService;
     DialogService           = dialogService;
 }
Exemple #3
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            // Composition Root
            SimpleAutoWireContainer container = new SimpleAutoWireContainer();

            container.Register(typeof(MessageTemplateContext), () => new MessageTemplateContext());
            container.Register(typeof(IMessageTemplateRepository), typeof(SqlMessageTemplateRepository));
            container.Register(typeof(IMessageTransmissionStrategy), typeof(TwilioSmsTransmissionStrategy));
            container.Register(typeof(ICreateUserService), typeof(CreateUserService));

            ICreateUserService service = container.Resolve(typeof(ICreateUserService)) as ICreateUserService;

            //ICreateUserService service = new CreateUserService(
            //    new SqlMessageTemplateRepository(
            //        new MessageTemplateContext()
            //    ),
            //    //new NullMessageTransmissionStrategy()
            //    //new SendGridEmailTransmissionStrategy()
            //    new TwilioSmsTransmissionStrategy()
            //);

            // UI Layer
            CreateUserViewModel vm = new CreateUserViewModel(service);

            this.MainWindow = new CreateUserWindow(vm);
            this.MainWindow.Show();
        }
 public CreateUserController(ICreateUserService createUserService,
                             ILoginService loginService,
                             IMapper mapper)
 {
     _createUserService = createUserService;
     _loginService      = loginService;
     _mapper            = mapper;
 }
Exemple #5
0
 public CreateAdminUserHandler(
     IDataTransaction tx,
     ICreateUserService create,
     IPromoteUserService promote)
 {
     Transaction = tx;
     Create      = create;
     Promote     = promote;
 }
Exemple #6
0
        private void OnApplicationStartup(object sender, StartupEventArgs e)
        {
            // Composition Root
            ICreateUserService service = null; // <-- TODO: Create proper service

            // UI Layer
            CreateUserViewModel vm = new CreateUserViewModel(service);

            this.MainWindow = new CreateUserWindow(vm);
            this.MainWindow.Show();
        }
Exemple #7
0
 public UserServices(IUserRepository userRepository, IGetAllUsersService getAllUsersService,
                     IGetUserByIdService getUserByIdService, ICreateUserService createUserService,
                     IGetUserByEmailService getUserByEmailService, IDeleteUserService deleteUserService)
 {
     this.userRepository        = userRepository;
     this.getAllUsersService    = getAllUsersService;
     this.getUserByIdService    = getUserByIdService;
     this.createUserService     = createUserService;
     this.getUserByEmailService = getUserByEmailService;
     this.deleteUserService     = deleteUserService;
 }
Exemple #8
0
 public UserController(ICreateUserService createUserService, IGetUsersService getUsersService,
                       IUpdateUserService updateUserService, IChangePasswordService changePasswordService,
                       IGetRolesService getRolesService, IDeleteUserService deleteUserService,
                       IGetPermissionsService getPermissionsService, IPermissionVerificationService permissionVerificationService)
 {
     this.createUserService             = createUserService;
     this.getUsersService               = getUsersService;
     this.updateUserService             = updateUserService;
     this.changePasswordService         = changePasswordService;
     this.getRolesService               = getRolesService;
     this.deleteUserService             = deleteUserService;
     this.getPermissionsService         = getPermissionsService;
     this.permissionVerificationService = permissionVerificationService;
 }
        public CreateUserViewModel(ICreateUserService createUserService)
        {
            _createUserService = createUserService;

            PreferredLanguage = "da";
            Create            = new RelayCommand(
                async parameter =>
            {
                await _createUserService.CreateUserAsync(
                    new User(Name, Email, Phone, PreferredLanguage)
                    );

                Name  = string.Empty;
                Email = string.Empty;
                Phone = string.Empty;
            },
                parameter => this.HasOverallError() == false
                );
        }
 public UserController(ICreateUserService createUserService, IMapper mapper) : base(mapper)
 {
     _createUserService = createUserService;
 }
Exemple #11
0
 public CreateUserController(ICreateUserService service)
 {
     _service = service;
 }
Exemple #12
0
 public UserController(ICreateUserService createUserService)
 {
     _createUserService = createUserService;
 }