Пример #1
0
        //      ---     ---     ---     ---     ---

        #region :: ~ Constructors ~ ::

        public Bank(string name, IFinancialInfoProvider infoProvider)
        {
            if (string.IsNullOrWhiteSpace(name))
                throw new ArgumentNullException(nameof(name), "Bank must have a valid name");

            if (infoProvider == null)
                throw new ArgumentNullException(nameof(infoProvider));

            this._name = name;
            this.infoProvider = infoProvider;
        }
Пример #2
0
        //      ---     ---     ---     ---     ---

        #region :: ~ Constructors ~ ::

        public DummyBankRepository(IFinancialInfoProvider infoProvider)
        {
            this.infoProvider = infoProvider;

            string[] bankNames =
            {
                "Сбербанк России",
                "Альфа-Банк",
                "Россельхозбанк",
                "Газпромбанк",
                "ВТБ 24",
                "Банк Москвы",
                "Промсвязьбанк",
                "Райффайзенбанк",
                "Совкомбанк",
                "ФК Открытие"
            };

            foreach (string bankName in bankNames)
            {
                this._banks.Add(new Bank(bankName, this.infoProvider));
            }
        }