Example #1
0
        /// <summary>
        /// Create a new instance of Usuario viewmodel
        /// </summary>
        /// <param name="service">Service dependency</param>
        /// <param name="serviceLoginAttempts">Service dependency</param>
        /// <param name="servicePermisosUsuario">Service dependency</param>
        /// <param name="serviceUserPasswords">Service dependency</param>
        /// <param name="serviceUserPhotos">Service dependency</param>
        public UsuarioFindViewModel(IUsuarioAppService service, ILoginAttemptsAppService serviceLoginAttempts, IPermisosUsuarioAppService servicePermisosUsuario, IUserPasswordsAppService serviceUserPasswords, IUserPhotosAppService serviceUserPhotos) : this()
        {
            if (service == null)
            {
                throw new ArgumentNullException("service", PresentationResources.exception_WithoutService);
            }
            if (serviceLoginAttempts == null)
            {
                throw new ArgumentNullException("serviceLoginAttempts", PresentationResources.exception_WithoutService);
            }
            if (servicePermisosUsuario == null)
            {
                throw new ArgumentNullException("servicePermisosUsuario", PresentationResources.exception_WithoutService);
            }
            if (serviceUserPasswords == null)
            {
                throw new ArgumentNullException("serviceUserPasswords", PresentationResources.exception_WithoutService);
            }
            if (serviceUserPhotos == null)
            {
                throw new ArgumentNullException("serviceUserPhotos", PresentationResources.exception_WithoutService);
            }

            _serviceUsuario         = service;
            _serviceLoginAttempts   = serviceLoginAttempts;
            _servicePermisosUsuario = servicePermisosUsuario;
            _serviceUserPasswords   = serviceUserPasswords;
            _serviceUserPhotos      = serviceUserPhotos;

            BuildVm();
        }
Example #2
0
        /// <summary>
        /// Create a new instance of Usuario controller
        /// </summary>
        /// <param name="service">Service dependency</param>
        /// <param name="serviceLoginAttempts">Service dependency</param>
        /// <param name="servicePermisosUsuario">Service dependency</param>
        /// <param name="serviceUserPasswords">Service dependency</param>
        /// <param name="serviceUserPhotos">Service dependency</param>
        public UsuarioController(IUsuarioAppService service, ILoginAttemptsAppService serviceLoginAttempts, IPermisosUsuarioAppService servicePermisosUsuario, IUserPasswordsAppService serviceUserPasswords, IUserPhotosAppService serviceUserPhotos)
        {
            if (service == null)
            {
                throw new ArgumentNullException("service", PresentationResources.exception_WithoutService);
            }
            if (serviceLoginAttempts == null)
            {
                throw new ArgumentNullException("serviceLoginAttempts", PresentationResources.exception_WithoutService);
            }
            if (servicePermisosUsuario == null)
            {
                throw new ArgumentNullException("servicePermisosUsuario", PresentationResources.exception_WithoutService);
            }
            if (serviceUserPasswords == null)
            {
                throw new ArgumentNullException("serviceUserPasswords", PresentationResources.exception_WithoutService);
            }
            if (serviceUserPhotos == null)
            {
                throw new ArgumentNullException("serviceUserPhotos", PresentationResources.exception_WithoutService);
            }

            //_unitOfWork = unitOfWork;
            _serviceUsuario         = service;
            _serviceLoginAttempts   = serviceLoginAttempts;
            _servicePermisosUsuario = servicePermisosUsuario;
            _serviceUserPasswords   = serviceUserPasswords;
            _serviceUserPhotos      = serviceUserPhotos;
        }
Example #3
0
        /// <summary>
        /// Create a new instance of Password controller
        /// </summary>
        /// <param name="service">Service dependency</param>
        /// <param name="serviceUserPasswords">Service dependency</param>
        public PasswordController(IPasswordAppService service, IUserPasswordsAppService serviceUserPasswords)
        {
            if (service == null)
            {
                throw new ArgumentNullException("service", PresentationResources.exception_WithoutService);
            }
            if (serviceUserPasswords == null)
            {
                throw new ArgumentNullException("serviceUserPasswords", PresentationResources.exception_WithoutService);
            }

            //_unitOfWork = unitOfWork;
            _servicePassword      = service;
            _serviceUserPasswords = serviceUserPasswords;
        }
Example #4
0
        /// <summary>
        /// Create a new instance of Password viewmodel
        /// </summary>
        /// <param name="service">Service dependency</param>
        /// <param name="serviceUserPasswords">Service dependency</param>
        public PasswordCrudViewModel(IPasswordAppService service, IUserPasswordsAppService serviceUserPasswords) : this()
        {
            if (service == null)
            {
                throw new ArgumentNullException("service", PresentationResources.exception_WithoutService);
            }
            if (serviceUserPasswords == null)
            {
                throw new ArgumentNullException("serviceUserPasswords", PresentationResources.exception_WithoutService);
            }

            _servicePassword      = service;
            _serviceUserPasswords = serviceUserPasswords;

            BuildVm();
        }
Example #5
0
        /// <summary>
        /// Create a new instance of UserPasswords controller
        /// </summary>
        /// <param name="service">Service dependency</param>
        /// <param name="servicePassword">Service dependency</param>
        /// <param name="serviceUsuario">Service dependency</param>
        public UserPasswordsController(IUserPasswordsAppService service, IPasswordAppService servicePassword, IUsuarioAppService serviceUsuario)
        {
            if (service == null)
            {
                throw new ArgumentNullException("service", PresentationResources.exception_WithoutService);
            }
            if (servicePassword == null)
            {
                throw new ArgumentNullException("servicePassword", PresentationResources.exception_WithoutService);
            }
            if (serviceUsuario == null)
            {
                throw new ArgumentNullException("serviceUsuario", PresentationResources.exception_WithoutService);
            }

            //_unitOfWork = unitOfWork;
            _serviceUserPasswords = service;
            _servicePassword      = servicePassword;
            _serviceUsuario       = serviceUsuario;
        }
Example #6
0
        /// <summary>
        /// Create a new instance of UserPasswords viewmodel
        /// </summary>
        /// <param name="service">Service dependency</param>
        /// <param name="servicePassword">Service dependency</param>
        /// <param name="serviceUsuario">Service dependency</param>
        public UserPasswordsFindViewModel(IUserPasswordsAppService service, IPasswordAppService servicePassword, IUsuarioAppService serviceUsuario) : this()
        {
            if (service == null)
            {
                throw new ArgumentNullException("service", PresentationResources.exception_WithoutService);
            }
            if (servicePassword == null)
            {
                throw new ArgumentNullException("servicePassword", PresentationResources.exception_WithoutService);
            }
            if (serviceUsuario == null)
            {
                throw new ArgumentNullException("serviceUsuario", PresentationResources.exception_WithoutService);
            }

            _serviceUserPasswords = service;
            _servicePassword      = servicePassword;
            _serviceUsuario       = serviceUsuario;

            BuildVm();
        }
Example #7
0
        /// <summary>
        /// Create a new instance of Usuario controller
        /// </summary>
        /// <param name="service">Service dependency</param>
        /// <param name="serviceLoginAttempts">Service dependency</param>
        /// <param name="servicePermisosUsuario">Service dependency</param>
        /// <param name="serviceUserPasswords">Service dependency</param>
        /// <param name="serviceUserPhotos">Service dependency</param>
        public AccountController(IUsuarioAppService service, ILoginAttemptsAppService serviceLoginAttempts, IPermisosUsuarioAppService servicePermisosUsuario, IUserPasswordsAppService serviceUserPasswords, IUserPhotosAppService serviceUserPhotos, IPasswordAppService servicePassword, IUnitOfWorkAsync unitOfWork)
        {
            if (service == null)
            {
                throw new ArgumentNullException("service", PresentationResources.exception_WithoutService);
            }
            if (serviceLoginAttempts == null)
            {
                throw new ArgumentNullException("serviceLoginAttempts", PresentationResources.exception_WithoutService);
            }
            if (servicePermisosUsuario == null)
            {
                throw new ArgumentNullException("servicePermisosUsuario", PresentationResources.exception_WithoutService);
            }
            if (serviceUserPasswords == null)
            {
                throw new ArgumentNullException("serviceUserPasswords", PresentationResources.exception_WithoutService);
            }
            if (serviceUserPhotos == null)
            {
                throw new ArgumentNullException("serviceUserPhotos", PresentationResources.exception_WithoutService);
            }

            _serviceUsuario         = service;
            _serviceLoginAttempts   = serviceLoginAttempts;
            _servicePermisosUsuario = servicePermisosUsuario;
            _serviceUserPasswords   = serviceUserPasswords;
            _serviceUserPhotos      = serviceUserPhotos;
            _servicePassword        = servicePassword;
            _unitOfWork             = unitOfWork;
            DES _newDes = DESEncryptor.CreateDES("WebApp.AppServices");

            _newDes.IV = new byte[8] {
                0x01, 0x02, 0x03, 0x4, 0x05, 0x06, 0x07, 0x08
            };
            desHelper = new DESEncryptor(_newDes.Key, _newDes.IV);
        }