No video

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

  Рет қаралды 1,810

SingletonSean

SingletonSean

Күн бұрын

Пікірлер: 4
@shubhamgohel9064
@shubhamgohel9064 10 ай бұрын
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 10 ай бұрын
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 10 ай бұрын
Thanx. Can we use the Factory method?
@ivandrofly
@ivandrofly 10 ай бұрын
Thanks
Mediator - DESIGN PATTERNS (C#/.NET)
16:15
SingletonSean
Рет қаралды 3,1 М.
Look at two different videos 😁 @karina-kola
00:11
Andrey Grechka
Рет қаралды 15 МЛН
Running With Bigger And Bigger Feastables
00:17
MrBeast
Рет қаралды 155 МЛН
Command Pattern - DESIGN PATTERNS (C#/.NET)
18:11
SingletonSean
Рет қаралды 4,4 М.
Building a .NET MAUI Application in 7 Days
26:59
SingletonSean
Рет қаралды 1,5 М.
How principled coders outperform the competition
11:11
Coderized
Рет қаралды 1,6 МЛН
Understanding The Visitor Design Pattern
32:08
Ryan Schachte
Рет қаралды 57 М.
C# Chain of Responsibility Design Pattern | Code Examples
19:42
Code Radiance
Рет қаралды 11 М.
Singleton Design Pattern in C# - Do it THAT way
13:15
tutorialsEU - C#
Рет қаралды 25 М.
Turns out REST APIs weren't the answer (and that's OK!)
10:38
Dylan Beattie
Рет қаралды 149 М.
Ranking ALL Design Patterns for Games under 30min
25:51
This is GameDev
Рет қаралды 8 М.
Look at two different videos 😁 @karina-kola
00:11
Andrey Grechka
Рет қаралды 15 МЛН