public AbilitiesController(
            [NotNull] IRepository <int, IAbility> abilityRepository,
            [NotNull] IInventoryModel inventoryModel,
            [NotNull] IAbilityCollectionView abilityCollectionView,
            [NotNull] IAbilityActivator abilityActivator)
        {
            _abilityActivator      = abilityActivator ?? throw new ArgumentNullException(nameof(abilityActivator));
            _inventoryModel        = inventoryModel ?? throw new ArgumentNullException(nameof(inventoryModel));
            _abilityRepository     = abilityRepository ?? throw new ArgumentNullException(nameof(abilityRepository));
            _abilityCollectionView = abilityCollectionView ?? throw new ArgumentNullException(nameof(abilityCollectionView));

            SetupView(_abilityCollectionView);
        }
 private void CleanupView(IAbilityCollectionView view)
 {
     view.UseRequested -= OnAbilityUseRequested;
 }
 private void SetupView(IAbilityCollectionView view)
 {
     view.UseRequested += OnAbilityUseRequested;
     view.Init();
 }
Exemple #4
0
 private void CleanupView(IAbilityCollectionView view)
 {
     // здесь могут быть дополнительные зачистки
     view.UseRequested -= OnAbilityUseRequested;
 }
Exemple #5
0
 private void SetupView(IAbilityCollectionView view)
 {
     // здесь могут быть дополнительные настройки
     view.UseRequested += OnAbilityUseRequested;
 }