Пример #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();
        }
Пример #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;
        }
Пример #3
0
        /// <summary>
        /// Create a new instance of Imagenes controller
        /// </summary>
        /// <param name="service">Service dependency</param>
        /// <param name="serviceUserPhotos">Service dependency</param>
        public ImagenesController(IImagenesAppService service, IUserPhotosAppService serviceUserPhotos)
        {
            if (service == null)
            {
                throw new ArgumentNullException("service", PresentationResources.exception_WithoutService);
            }
            if (serviceUserPhotos == null)
            {
                throw new ArgumentNullException("serviceUserPhotos", PresentationResources.exception_WithoutService);
            }

            //_unitOfWork = unitOfWork;
            _serviceImagenes   = service;
            _serviceUserPhotos = serviceUserPhotos;
        }
Пример #4
0
        /// <summary>
        /// Create a new instance of Imagenes viewmodel
        /// </summary>
        /// <param name="service">Service dependency</param>
        /// <param name="serviceUserPhotos">Service dependency</param>
        public ImagenesFindViewModel(IImagenesAppService service, IUserPhotosAppService serviceUserPhotos) : this()
        {
            if (service == null)
            {
                throw new ArgumentNullException("service", PresentationResources.exception_WithoutService);
            }
            if (serviceUserPhotos == null)
            {
                throw new ArgumentNullException("serviceUserPhotos", PresentationResources.exception_WithoutService);
            }

            _serviceImagenes   = service;
            _serviceUserPhotos = serviceUserPhotos;

            BuildVm();
        }
Пример #5
0
        /// <summary>
        /// Create a new instance of UserPhotos viewmodel
        /// </summary>
        /// <param name="service">Service dependency</param>
        /// <param name="serviceImagenes">Service dependency</param>
        /// <param name="serviceUsuario">Service dependency</param>
        public UserPhotosCrudViewModel(IUserPhotosAppService service, IImagenesAppService serviceImagenes, IUsuarioAppService serviceUsuario) : this()
        {
            if (service == null)
            {
                throw new ArgumentNullException("service", PresentationResources.exception_WithoutService);
            }
            if (serviceImagenes == null)
            {
                throw new ArgumentNullException("serviceImagenes", PresentationResources.exception_WithoutService);
            }
            if (serviceUsuario == null)
            {
                throw new ArgumentNullException("serviceUsuario", PresentationResources.exception_WithoutService);
            }

            _serviceUserPhotos = service;
            _serviceImagenes   = serviceImagenes;
            _serviceUsuario    = serviceUsuario;

            BuildVm();
        }
Пример #6
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);
        }