Exemple #1
0
        public ManageAccountsViewModel(ITradesContext tradesContext, IUpdateCachedData <Account> updateCachedData, ICachedData <Account> cachedData)
        {
            _tradesContext    = tradesContext;
            _updateCachedData = updateCachedData;
            _cachedData       = cachedData;

            _editAccountViewModel = new EditAccountViewModel(_tradesContext, _updateCachedData, _cachedData);
            _newAccountViewModel  = new NewAccountViewModel(_tradesContext);

            NewAccountVM.NewAccountAdd += EditAccountVM.OnNewAccountAdd;
        }
Exemple #2
0
        public App()
        {
            _container = new UnityContainer();
            _container.Configure();

            _curAccountCache = _container.Resolve <IUpdateCachedData <Account> >();
            _tradesContext   = _container.Resolve <ITradesContext>();
            _logger          = _container.Resolve <ILogger>();

            InitOnAppStart();
        }
        public CurrentAccountCache(ITradesContext context)
        {
            _context = context;

            CurrentAccount = _context.Accounts.FirstOrDefault(a => a.IsActive);
        }
 public CurrentAccountTradeContext(ITradesContext context, ICachedData <Account> curAccountCache)
 {
     _context         = context;
     _curAccountCache = curAccountCache;
 }