private static void Addtest(IBankManager bankManager) { bankManager.OpenAccount("fname1", "lName", 1m, AccountType.GoldAccount); bankManager.OpenAccount("fname2", "lName2", 2m, AccountType.PlatinumAccount); ShowAccouts(bankManager.GetAccounts()); }
public UserController(ILoanManager loanManager, IPayLendUserManager payLendUserManager, IPermissionManager permissionManager, IAgencyManager agency, IBankManager bankManager) { LoanManager = loanManager; PayLendUserManager = payLendUserManager; PermissionManager = permissionManager; this.AgencyManager = agency; this.BankManager = bankManager; }
public RegisterForm(IRegisterManager registerManager, IAdressManager adressManager, IBankManager bankManager, ICountryManager countryManager, IApplicationUser user) { this._registerManager = registerManager; this._adressManager = adressManager; this._bankManager = bankManager; this._countryManager = countryManager; this._user = user; InitializeComponent(); InitForm(); }
public LoginForm(IAuthManager manager, IRegisterManager registerManager, IAdressManager adressManager, IBankManager bankManager, ICountryManager countryManager, IUserInfoManager userInfoManager, IApplicationUser user) { InitializeComponent(); _manager = manager; this._registerManager = registerManager; this._adressManager = adressManager; this._bankManager = bankManager; this._countryManager = countryManager; this._user = user; this._userInfoManager = userInfoManager; }
public IDisplayList ReadDisplayList( IBankManager bankManager, uint address) { // TODO: Support branching offsets. IoUtil.SplitAddress(address, out var bankIndex, out var offset); var bankReader = bankManager[bankIndex]; bankReader.Position = offset; var displayList = new DisplayList(); IDisplayListInstruction?instruction = null; while (true) { var low = bankReader.ReadUInt32(); var high = bankReader.ReadUInt32(); var nextInstruction = new DisplayListInstruction(bankReader.Position, low, high); if (instruction == null) { displayList.Root = nextInstruction; } else { instruction.NextSibling = Optional <IDisplayListInstruction> .Of(nextInstruction); } instruction = nextInstruction; if (instruction.Opcode == F3dzexOpcode.ENDDL) { break; } if (instruction.Opcode == F3dzexOpcode.DL) { address = high; // TODO: Support branching offsets. IoUtil.SplitAddress(address, out bankIndex, out offset); bankReader = bankManager[bankIndex]; bankReader.Position = offset; } } return(displayList); }
public MainWindow() { InitializeComponent(); Title = "My bank"; BankProv = new BankProvider(); DataContext = BankProv; LogsTextBlock.Text = string.Empty; ClientBase.OnOperation += (o, e) => { LogsTextBlock.Text += $"{e.Time.ToShortTimeString()} {e.Message} {e.Sum}$ {Environment.NewLine}"; }; ClientBase.OnOperation += (o, e) => { MessageBox.Show($"{e.Time.ToShortTimeString()} {e.Message} {e.Sum}$ {Environment.NewLine}"); }; Department.OnOperation += (o, e) => { Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() => { LogsTextBlock.Text += $"{e.Time.ToShortTimeString()} [{e.DepartmentName}] {e.Message} {Environment.NewLine}"; })); }; bankManager = new DbManager(); bankManager.OnDbConnection += (o, e) => { LogsTextBlock.Text += $"{e.Time.ToShortTimeString()} {e.Message} {Environment.NewLine}"; }; try { PhysicalPersonsDataGrid.DataContext = bankManager.ConnectPhysDataTable(); } catch (Exception e) { MessageBox.Show($"Не удалось загрузить таблицу клиентов физических лиц. {e.Message}"); Close(); } try { LegalPersonsDataGrid.DataContext = bankManager.ConnectLegalDataTable(); } catch (Exception e) { MessageBox.Show($"Не удалось загрузить таблицу клиентов юридических лиц. {e.Message}"); Close(); } }
public PayLendUserManager(IPayLendUserRepository repository, ICountryManager countryManager, IAccountCodeConfirmationManager accountCodeConfirmationManager, IPayLendCardManager payLendCardManager, ILogManager logManager, IAzureStorageManager azureStorageManager, IEmailLogManager emailLogManager, IBankManager bankManager, IResetPasswordManager resetPasswordManager, IBankUserManager bankUserManager, IPayLendConfigManager payLendConfigManager, IBackOfficeTopUpManager backOfficeTopUpManager, IBorrowerAgencyDataManager borrowerAgencyDataManager, IUser_PermissionManager userPermissionManager) { _repository = repository; _countryManager = countryManager; _accountCodeConfirmationManager = accountCodeConfirmationManager; _payLendCardManager = payLendCardManager; _logManager = logManager; _azureStorageManager = azureStorageManager; _emailLogManager = emailLogManager; _bankManager = bankManager; _resetPasswordManager = resetPasswordManager; _bankUserManager = bankUserManager; _payLendConfigManager = payLendConfigManager; _backOfficeTopUpManager = backOfficeTopUpManager; _borrowerAgencyDataManager = borrowerAgencyDataManager; _userPermissionManager = userPermissionManager; }
public static void Main(string[] args) { IBankManager bankManager = Resolver.Get <IBankManager>(); try { Console.WriteLine("AddTest"); Addtest(bankManager); Console.WriteLine("WithdrawMoneyTest"); WithdrawMoneyTest(bankManager); Console.WriteLine("DepositMoneyTest"); DepositMoneyTest(bankManager); } catch (Exception e) { Console.WriteLine(e.Message); } Console.ReadKey(); }
public void TestInit() { _Bank = Bank.Open("ABC"); _Manager = new BankManager("Manager Joe", _Bank); }
public AccountRequestHandler(ICoreAccount coreAccount, IBankManager bankManager, ILogger log) { _coreAccount = coreAccount;// ?? throw new ArgumentNullException(nameof(coreAccount)); _bankManager = bankManager; _log = log; }
public BankClaimItemHandler(IGamePacketFactory packetFactory, IGameSession gameSession, IBankManager bankManager) : base(packetFactory, gameSession) { _bankManager = bankManager; }
public CharacterFactory(ILogger <ICharacterFactory> logger, IDatabase database, ILogger <Character> characterLogger, IGameWorld gameWorld, IDatabasePreloader databasePreloader, IGameDefinitionsPreloder definitionsPreloder, ICountryProvider countryProvider, ISpeedManager speedManager, IStatsManager statsManager, IHealthManager healthManager, ILevelProvider levelProvider, ILevelingManager levelingManager, IInventoryManager inventoryManager, ILinkingManager linkingManager, IGuildManager guildManager, IGameSession gameSession, IStealthManager stealthManager, IAttackManager attackManager, ISkillsManager skillsManager, IBuffsManager buffsManager, IElementProvider elementProvider, IKillsManager killsManager, IVehicleManager vehicleManager, IShapeManager shapeManager, IMovementManager movementManager, IAdditionalInfoManager additionalInfoManager, IMapProvider mapProvider, ITeleportationManager teleportationManager, IPartyManager partyManager, ITradeManager tradeManager, IFriendsManager friendsManager, IDuelManager duelManager, IBankManager bankManager, IQuestsManager questsManager, IUntouchableManager untouchableManager, IWarehouseManager warehouseManager, IShopManager shopManager, ISkillCastingManager skillCastingManager, ICastProtectionManager castProtectionManager, IGamePacketFactory packetFactory, UserManager <DbUser> userManager) { _logger = logger; _database = database; _characterLogger = characterLogger; _gameWorld = gameWorld; _databasePreloader = databasePreloader; _definitionsPreloder = definitionsPreloder; _countryProvider = countryProvider; _speedManager = speedManager; _statsManager = statsManager; _healthManager = healthManager; _levelProvider = levelProvider; _levelingManager = levelingManager; _inventoryManager = inventoryManager; _linkingManager = linkingManager; _guildManager = guildManager; _gameSession = gameSession; _stealthManager = stealthManager; _attackManager = attackManager; _skillsManager = skillsManager; _buffsManager = buffsManager; _elementProvider = elementProvider; _killsManager = killsManager; _vehicleManager = vehicleManager; _shapeManager = shapeManager; _movementManager = movementManager; _additionalInfoManager = additionalInfoManager; _mapProvider = mapProvider; _teleportationManager = teleportationManager; _partyManager = partyManager; _tradeManager = tradeManager; _friendsManager = friendsManager; _duelManager = duelManager; _bankManager = bankManager; _questsManager = questsManager; _untouchableManager = untouchableManager; _warehouseManager = warehouseManager; _shopManager = shopManager; _skillCastingManager = skillCastingManager; _castProtectionManager = castProtectionManager; _packetFactory = packetFactory; _userManager = userManager; }
private static void WithdrawMoneyTest(IBankManager bankManager) { bankManager.WithdrawMoney("2", 4m); ShowAccouts(bankManager.GetAccounts()); }
public void SetBankManager(IBankManager manager) { ValidationHelper.NotNull(manager, "manager"); this.Manager = manager; manager.Bank = this; }
public IBankManager SetBankManager(string name) { ValidationHelper.StringNullEmpty(name, "name"); this.Manager = new BankManager(name, this); return(this.Manager); }
public AccountManager(ILogger log, ISessionManager cosmosSession, IBankManager bankManager) { _cosmosSession = cosmosSession; _bankManager = bankManager; _log = log; }
public BankController(IUserManager userManager, IBankManager bankManager) { _userManager = userManager; _bankManager = bankManager; }
private static void DepositMoneyTest(IBankManager bankManager) { bankManager.DepositMoney("2", 4m); ShowAccouts(bankManager.GetAccounts()); }
public UserManager(IUserRepository repo, IBankManager bankrepo) { _repo = repo; _bankrepo = bankrepo; }
public Character(ILogger <Character> logger, IDatabasePreloader databasePreloader, IGuildManager guildManager, ICountryProvider countryProvider, ISpeedManager speedManager, IStatsManager statsManager, IAdditionalInfoManager additionalInfoManager, IHealthManager healthManager, ILevelProvider levelProvider, ILevelingManager levelingManager, IInventoryManager inventoryManager, IStealthManager stealthManager, IAttackManager attackManager, ISkillsManager skillsManager, IBuffsManager buffsManager, IElementProvider elementProvider, IKillsManager killsManager, IVehicleManager vehicleManager, IShapeManager shapeManager, IMovementManager movementManager, ILinkingManager linkinManager, IMapProvider mapProvider, ITeleportationManager teleportationManager, IPartyManager partyManager, ITradeManager tradeManager, IFriendsManager friendsManager, IDuelManager duelManager, IBankManager bankManager, IQuestsManager questsManager, IUntouchableManager untouchableManager, IWarehouseManager warehouseManager, IShopManager shopManager, ISkillCastingManager skillCastingManager, ICastProtectionManager castProtectionManager, IGameSession gameSession, IGamePacketFactory packetFactory) : base(databasePreloader, countryProvider, statsManager, healthManager, levelProvider, buffsManager, elementProvider, movementManager, untouchableManager, mapProvider) { _logger = logger; _packetFactory = packetFactory; AdditionalInfoManager = additionalInfoManager; InventoryManager = inventoryManager; StealthManager = stealthManager; LevelingManager = levelingManager; SpeedManager = speedManager; AttackManager = attackManager; SkillsManager = skillsManager; KillsManager = killsManager; VehicleManager = vehicleManager; ShapeManager = shapeManager; LinkingManager = linkinManager; TeleportationManager = teleportationManager; PartyManager = partyManager; TradeManager = tradeManager; FriendsManager = friendsManager; DuelManager = duelManager; GuildManager = guildManager; BankManager = bankManager; QuestsManager = questsManager; WarehouseManager = warehouseManager; ShopManager = shopManager; SkillCastingManager = skillCastingManager; CastProtectionManager = castProtectionManager; GameSession = gameSession; HealthManager.MP_SP_Used += SendUseMPSP; HealthManager.OnCurrentHitpointsChanged += SendCurrentHitpoints; StatsManager.OnAdditionalStatsUpdate += SendAdditionalStats; StatsManager.OnResetStats += SendResetStats; BuffsManager.OnBuffAdded += SendAddBuff; BuffsManager.OnBuffRemoved += SendRemoveBuff; AttackManager.OnStartAttack += SendAttackStart; VehicleManager.OnUsedVehicle += SendUseVehicle; SkillsManager.OnResetSkills += SendResetSkills; InventoryManager.OnAddItem += SendAddItemToInventory; InventoryManager.OnRemoveItem += SendRemoveItemFromInventory; InventoryManager.OnItemExpired += SendItemExpired; AttackManager.TargetOnBuffAdded += SendTargetAddBuff; AttackManager.TargetOnBuffRemoved += SendTargetRemoveBuff; DuelManager.OnDuelResponse += SendDuelResponse; DuelManager.OnStart += SendDuelStart; DuelManager.OnCanceled += SendDuelCancel; DuelManager.OnFinish += SendDuelFinish; LevelingManager.OnExpChanged += SendExperienceGain; QuestsManager.OnQuestMobCountChanged += SendQuestCountUpdate; QuestsManager.OnQuestFinished += SendQuestFinished; ShopManager.OnUseShopClosed += SendUseShopClosed; ShopManager.OnUseShopItemCountChanged += SendUseShopItemCountChanged; ShopManager.OnSoldItem += SendSoldItem; Bless.Instance.OnDarkBlessChanged += OnDarkBlessChanged; Bless.Instance.OnLightBlessChanged += OnLightBlessChanged; }
public AccountController(ILogger log, IAccountRequestHandler accountRequestHandler, IBankManager bankManager) { _accountRequestHandler = accountRequestHandler; _bankManager = bankManager; _log = log; }