コード例 #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;
        }
コード例 #2
0
ファイル: App.xaml.cs プロジェクト: luckdodgers/TradeStats
        public App()
        {
            _container = new UnityContainer();
            _container.Configure();

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

            InitOnAppStart();
        }