Ejemplo n.º 1
0
        /// <summary>
        /// Get AppUser's name.
        /// </summary>
        /// <param name="html"></param>
        /// <param name="id">Search user by this id.</param>
        /// <returns></returns>
        public static MvcHtmlString GetUserName(this HtmlHelper html, string id)
        {
            IAppUserManager manager = DependencyResolver.Current.GetService <IAppUserManager>();
            string          result  = manager.FindById(id)?.UserName;

            return(new MvcHtmlString(result));
        }
Ejemplo n.º 2
0
 public UsersManagerController(IAppUserManager userManager, RoleManager <AppRole> roleManager, IFileWorker fileWorker, ApplicationDbContext context)
 {
     _fileWorker  = fileWorker;
     _userManager = userManager;
     _roleManager = roleManager;
     _context     = context;
 }
 public UserServicesController(IAppUserManager appUserManager, IOrganizationManager orgManager, IUserManager usrManager, SignInManager <AppUser> signInManager, UserManager <AppUser> userManager, IAdminLogger adminLogger) : base(userManager, adminLogger)
 {
     _appUserManager = appUserManager;
     _usrManager     = usrManager;
     _signInManager  = signInManager;
     _orgManager     = orgManager;
 }
Ejemplo n.º 4
0
        public CompleteViewModel(IAppUserManager appUserManager, IPageService pageService)
        {
            _appUserManager = appUserManager;

            FinishCommand = new Command(
                () => Application.Current.MainPage = new NavigationPage(new MainPage()));
        }
Ejemplo n.º 5
0
 public OrgServicesController(IAppUserManager appUserManager, ISignInManager signInManager, IAuthTokenManager authTokenManager, IOrganizationManager orgManager, UserManager <AppUser> userManager, IAdminLogger logger) : base(userManager, logger)
 {
     _appUserManager   = appUserManager;
     _orgManager       = orgManager;
     _authTokenManager = authTokenManager;
     _signInManager    = signInManager;
 }
Ejemplo n.º 6
0
 public AppUnitOfWork()
 {
     database       = new AppIdentityDbContext();
     roleManager    = new AppRoleManager(new RoleStore <Role>(database));
     userManager    = new AppUserManager(new UserStore <User>(database));
     postRepository = new PostRepository(database);
 }
 public AccountAdminController(
     IAppUserManager userManager,
     IUnitOfWork unitOfWork,
     IMapper mapper)
     : base(unitOfWork, userManager, mapper)
 {
     _logger = LogManager.GetCurrentClassLogger();
 }
 public GetEditorsListQueryHandler(IUserRoleRepository userRoleRepository, IAppRoleManager appRoleManager,
     IAppUserManager appUserManager, IMapper mapper)
 {
     _userRoleRepository = userRoleRepository;
     _appRoleManager = appRoleManager;
     _appUserManager = appUserManager;
     _mapper = mapper;
 }
Ejemplo n.º 9
0
 public ProductsController(IAppUserManager user, IProductManager product, IPurchaseManager purchase, IPrintManager print, ICartManager cart)
 {
     _user     = user;
     _product  = product;
     _purchase = purchase;
     _print    = print;
     _cart     = cart;
 }
Ejemplo n.º 10
0
        public async Task <ClaimsIdentity> GenerateUserIdentityAsync(IAppUserManager manager, string authenticationType)
        {
            // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
            var userIdentity = await manager.CreateIdentityAsync(this, authenticationType);

            // Add custom user claims here
            return(userIdentity);
        }
Ejemplo n.º 11
0
 public LifeCycleState(IKeyValueStore store, IAppUserManager appUserManager,
                       IContactsManager contactsManager, IFriendsManager friendsManager, IChatService chatService)
 {
     _store           = store;
     _userManager     = appUserManager;
     _contactsManager = contactsManager;
     _friendsManager  = friendsManager;
     _chatService     = chatService;
 }
Ejemplo n.º 12
0
 public MainAppBehavior(IKeyValueStore store, IAppUserManager appUserManager,
                        IContactsManager contactsManager, IFriendsManager friendsManager, IChatService chatService)
 {
     _store           = store;
     _userManager     = appUserManager;
     _contactsManager = contactsManager;
     _friendsManager  = friendsManager;
     _chatService     = chatService;
 }
Ejemplo n.º 13
0
 public IndexModel(UserManager <AppUser> userManager, ISFAppManager appManager, IAppResponseManager respManager, IQuestionManager questionManager, IEvaluationManager eval, IAppUserManager appUser)
 {
     _user     = userManager;
     _app      = appManager;
     _response = respManager;
     _question = questionManager;
     _eval     = eval;
     _appUser  = appUser;
 }
Ejemplo n.º 14
0
 public ServiceCallManager(IAppUserManager appUserManager, ICustomerManager customerManager, IRepository repository, IUnitOfWork unitofWork, IMapper mapper, ILogger <ServiceCallManager> logger)
 {
     _repository      = repository;
     _unitofWork      = unitofWork;
     _logger          = logger;
     _mapper          = mapper;
     _appUserManager  = appUserManager;
     _customerManager = customerManager;
 }
Ejemplo n.º 15
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public IAppUserManager GetUserManager()
        {
            if (this._appUserManager == null)
            {
                this._appUserManager = _userRep.GetAppUserManager(GetAggregaterootId());
            }

            return(_appUserManager);
        }
Ejemplo n.º 16
0
 public AppClaimsTransformation(
     IAppUserManager userManager,
     IAppRoleManager roleManager,
     ILogger <AppClaimsTransformation> logger)
 {
     _userManager = userManager ?? throw new ArgumentNullException(nameof(userManager));
     _roleManager = roleManager ?? throw new ArgumentNullException(nameof(roleManager));
     _logger      = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Ejemplo n.º 17
0
        public UserController(IAppUserManager userManager)
        {
            if (userManager == null)
            {
                throw new ArgumentNullException(nameof(userManager));
            }

            _userManager = userManager;
        }
Ejemplo n.º 18
0
        public DebugViewModel(IPageService pageService, IKeyValueStore keyValueStore, IAppUserManager appUserManager, IFriendsManager friendsManager, IRealmStore realmStore)
        {
            _pageService    = pageService;
            _appUserManager = appUserManager;
            _friendsManager = friendsManager;
            _realmStore     = realmStore;
            _keyValueStore  = keyValueStore;

            Initcommands();
        }
Ejemplo n.º 19
0
 public AppClaimsPrincipalFactory(
     IAppUserManager userManager,
     IAppRoleManager roleManager,
     IOptions <IdentityOptions> optionsAccessor)
     : base((UserManager <User>)userManager, (RoleManager <Role>)roleManager, optionsAccessor)
 {
     _userManager     = userManager ?? throw new ArgumentNullException(nameof(_userManager));
     _roleManager     = roleManager ?? throw new ArgumentNullException(nameof(_roleManager));
     _optionsAccessor = optionsAccessor ?? throw new ArgumentNullException(nameof(_optionsAccessor));
 }
Ejemplo n.º 20
0
 public CategoryAdminController(
     ICategoryRepository categoryRepository,
     IAppUserManager userManager,
     IUnitOfWork unitOfWork,
     IMapper mapper)
     : base(unitOfWork, userManager, mapper)
 {
     _categoryRepository = categoryRepository;
     _logger             = LogManager.GetCurrentClassLogger();
 }
Ejemplo n.º 21
0
 public CustomerManager(IAppUserManager appUserManager, IJWTHandler jwtManager, IRepository repository, IUnitOfWork unitofWork, IMapper mapper, ILogger <CustomerManager> logger)
 {
     _repository = repository;
     _unitofWork = unitofWork;
     _logger     = logger;
     //  _serviceCallManager = serviceCallManager;
     _mapper         = mapper;
     _appUserManager = appUserManager;
     _jwtManager     = jwtManager;
 }
 public BaseExtendedController(
     IUnitOfWork unitOfWork,
     IAppUserManager userManager,
     IMapper mapper)
     : base(mapper)
 {
     _logger      = LogManager.GetCurrentClassLogger();
     _unitOfWork  = unitOfWork;
     _userManager = userManager;
 }
 public RoleAdminController(
     IAppUserManager userManager,
     AppRoleManager roleManager,
     IUnitOfWork unitOfWork,
     IMapper mapper)
     : base(unitOfWork, userManager, mapper)
 {
     RoleManager = roleManager;
     _logger     = LogManager.GetCurrentClassLogger();
 }
Ejemplo n.º 24
0
 public RegisterModel(
     IAppUserManager userManager,
     IAppSignInManager signInManager,
     ILogger <RegisterModel> logger,
     IEmailSender emailSender)
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _logger        = logger;
     _emailSender   = emailSender;
 }
 public SettingsAdminController(
     ISettingsRepository settingsRepository,
     IMailingService mailingRepository,
     IUnitOfWork unitOfWork,
     IAppUserManager userManager,
     IMapper mapper)
     : base(unitOfWork, userManager, mapper)
 {
     _settingsRepository = settingsRepository;
     _mailingRepository  = mailingRepository;
     _logger             = LogManager.GetCurrentClassLogger();
 }
 public OrderWebClientService(IWorkContext workContext, IDiscountWebClientService discountWebClientService,
                              ICurrentUserService currentUserService, IOrderDataService orderDataService, IUnitOfWork unitOfWork,
                              IEmailyService emailyService, IAppUserManager userManager, IOrderItemDataService orderItemDataService)
 {
     _workContext = workContext;
     _discountWebClientService = discountWebClientService;
     _currentUserService       = currentUserService;
     _orderDataService         = orderDataService;
     _unitOfWork           = unitOfWork;
     _userManager          = userManager;
     _orderItemDataService = orderItemDataService;
 }
        public AccountPageViewModel(IPageNavigator pageNavigator,
            ILogger logger,
            IUserDialogs userDialogs,
            IRequestExceptionHandler requestExceptionHandler,
            IEventAggregator eventAggregator,
            IAppUserManager appUserManager) : base(pageNavigator, logger, userDialogs, requestExceptionHandler, eventAggregator)
        {
            _appUserManager = appUserManager;
            Title = AppResources.TitleAccount;
            TappedMenuCommand = new DelegateCommand(() => EventAggregator.GetEvent<HamburgerTappedEvent>().Publish());

        }
 public OrderAdminController(
     IOrderRepository orderRepository,
     IMailingRepository mailingRepository,
     IUnitOfWork unitOfWork,
     IAppUserManager userManager,
     IMapper mapper)
     : base(unitOfWork, userManager, mapper)
 {
     _orderRepository   = orderRepository;
     _mailingRepository = mailingRepository;
     _logger            = LogManager.GetCurrentClassLogger();
 }
Ejemplo n.º 29
0
 public PaymentController(
     IOrderRepository orderRepository,
     ICartRepository cartRepository,
     IAppUserManager userManager,
     IUnitOfWork unitOfWork,
     IMapper mapper)
     : base(unitOfWork, userManager, mapper)
 {
     _orderRepository = orderRepository;
     _cartRepository  = cartRepository;
     _logger          = LogManager.GetCurrentClassLogger();
 }
Ejemplo n.º 30
0
 public CartController(
     ICartRepository cartRepository,
     IProductRepository productRepository,
     IAppUserManager userManager,
     IUnitOfWork unitOfWork,
     IMapper mapper)
     : base(unitOfWork, userManager, mapper)
 {
     _cartRepository    = cartRepository;
     _productRepository = productRepository;
     _logger            = LogManager.GetCurrentClassLogger();
 }
Ejemplo n.º 31
0
 //Constructors---------------------------------------------------------------------------------------------------------//
 public DBUserService(IDbContextScopeFactory contextScopeFac, IAppUserManager appUserManager, bool ldapAuthenticationEnabled)
 {
     this.contextScopeFac = contextScopeFac;
     this.appUserManager = appUserManager;
     this.ldapAuthenticationEnabled = ldapAuthenticationEnabled;
 }