/// <summary> /// Initializes a new instance of the <see cref="BankService"/> class. /// </summary> /// <param name="bankStorage">contains methods of save and load accounts</param> public BankService(IBankStorage bankStorage) { Accounts = new List <Account>(); BankStorage = bankStorage ?? throw new ArgumentNullException(nameof(bankStorage)); }
/// <summary> /// Initializes a new instance of the <see cref="BankService"/> class. /// </summary> /// <param name="storage"> /// Permanent storage. /// </param> public BankService(IBankStorage storage) { this.accountsStorage = storage; this.GetAccountsFromStorage(); }