Esempio n. 1
0
 public ApplicationDbContext(
     DbContextOptions options,
     ICurrentContextService currentContextService)
     : base(options)
 {
     _currentContextService = currentContextService;
 }
Esempio n. 2
0
        public UniquePredicate(IApplicationDbContext db, ICurrentContextService userAccessor)
        {
            Ensure.That(db, nameof(db)).IsNotNull();
            Ensure.That(userAccessor, nameof(userAccessor)).IsNotNull();

            _db           = db;
            _userAccessor = userAccessor;
        }
Esempio n. 3
0
        public ExistsInCurrentContextValidator(
            IApplicationDbContext db,
            ICurrentContextService currentContextService)
        {
            Ensure.That(db, nameof(db)).IsNotNull();
            Ensure.That(currentContextService, nameof(currentContextService)).IsNotNull();

            _db = db;
            _currentContextService = currentContextService;
        }
Esempio n. 4
0
        public virtual void OnInitialized(IContainerProvider containerProvider)
        {
            secureCommands = new List <DelegateCommand>();

            this._shellExtensionService = containerProvider.Resolve <IShellExtensionService>();
            this._currentContextService = containerProvider.Resolve <ICurrentContextService>();
            this._container             = containerProvider;
            this._authenticationService = _container.Resolve <IAuthenticationUIService>();
            this._eventAggregator       = _container.Resolve <IEventAggregator>();
            this._eventAggregator.GetEvent <AuthenticatedEvent>().Subscribe(HandleUserAuthentication);
        }
        public UniqueInCurrentContextValidator(
            IApplicationDbContext db,
            ICurrentContextService userAccessor,
            Func <T, Expression <Func <TEntity, bool> > > predicate)
        {
            Ensure.That(db, nameof(db)).IsNotNull();
            Ensure.That(userAccessor, nameof(userAccessor)).IsNotNull();
            Ensure.That(predicate, nameof(predicate)).IsNotNull();

            _db           = db;
            _userAccessor = userAccessor;
            _predicate    = predicate;
        }
        public UniqueWithInstanceInCurrentContextValidator(
            IApplicationDbContext db,
            ICurrentContextService currentContextService,
            Func <T, object> propertyFinder,
            Func <TEntity, T, Expression <Func <TEntity, bool> > > predicate)
        {
            Ensure.That(db, nameof(db)).IsNotNull();
            Ensure.That(currentContextService, nameof(currentContextService)).IsNotNull();
            Ensure.That(propertyFinder, nameof(propertyFinder)).IsNotNull();
            Ensure.That(predicate, nameof(predicate)).IsNotNull();

            _db = db;
            _currentContextService = currentContextService;
            _propertyFinder        = propertyFinder;
            _predicate             = predicate;
        }
 public ExistsInCurrentContextValidatorProvider(IApplicationDbContext db, ICurrentContextService userAccessor)
 => (_db, _userAccessor) = (db, userAccessor);
Esempio n. 8
0
 public GetAccountsListQueryHandler(IApplicationDbContext db, ICurrentContextService currentContextService)
 => (_db, _currentContextService) = (db, currentContextService);
Esempio n. 9
0
 public Workitem(IContainerExtension container)
 {
     _containerProvider     = container;
     _shellExtensionService = container.Resolve <IShellExtensionService>();
     _currentContextService = container.Resolve <ICurrentContextService>();
 }
Esempio n. 10
0
 public DeleteTransactionCommandHandler(IApplicationDbContext db, ICurrentContextService userAccessor)
 {
     _db           = db;
     _userAccessor = userAccessor;
 }
Esempio n. 11
0
 public GetTransactionQueryHandler(IApplicationDbContext db, ICurrentContextService userAccessor)
 {
     _db           = db;
     _userAccessor = userAccessor;
 }
Esempio n. 12
0
 public EditTagCommandHandler(IApplicationDbContext db, ICurrentContextService userAccessor)
 => _db = db;