Тёмный

Chain of Responsibility Pattern - DESIGN PATTERNS (C#/.NET) 

SingletonSean
Подписаться 23 тыс.
Просмотров 1,9 тыс.
50% 1

Опубликовано:

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 4   
@shubhamgohel9064
@shubhamgohel9064 Год назад
That's a good one, but can you please do with the DI? Because, currently you are passing the next handler directly but what if I have 3 or 4 handlers? Like H1 - H2 - H3 - H4. How should I manage this with DI? Also, what if each handler takes different types of arguments? The best example is a restaurant menu.
@SingletonSean
@SingletonSean Год назад
Good questions! I think even with DI, you'd have to manually resolve and pass in each handler, especially since they all implement the same interface. Also, I would usually use this pattern if all the handlers take the same arguments. This makes the chain flexible, where we can re-order the different handlers without worrying about type issues.
@shubhamgohel9064
@shubhamgohel9064 Год назад
Thanx. Can we use the Factory method?
@ivandrofly
@ivandrofly Год назад
Thanks
Далее
Mediator - DESIGN PATTERNS (C#/.NET)
16:15
Просмотров 3,2 тыс.
Being Competent With Coding Is More Fun
11:13
Просмотров 81 тыс.
Bearwolf - GODZILLA Пародия Beatrise
00:33
Просмотров 78 тыс.
FATAL CHASE 😳 😳
00:19
Просмотров 1,1 млн
Why SingletonSean?
5:39
Просмотров 1,3 тыс.
factories
1:03:08
Просмотров 38
Understanding The Visitor Design Pattern
32:08
Просмотров 58 тыс.
Facade Pattern - DESIGN PATTERNS (C#/.NET)
8:33
Просмотров 4,5 тыс.
Ranking ALL Design Patterns for Games under 30min
25:51
9.  Sử dụng Chain Of Responsibility Design Pattern
16:25
Bearwolf - GODZILLA Пародия Beatrise
00:33
Просмотров 78 тыс.