Comments on: Observer Design Pattern in C# https://code-maze.com/csharp-observer-design-pattern/ Learn. Code. Succeed. Thu, 15 Dec 2022 08:22:53 +0000 hourly 1 https://wordpress.org/?v=6.7.5 By: Marinko Spasojević https://code-maze.com/csharp-observer-design-pattern/#comment-7145 Thu, 15 Dec 2022 08:22:53 +0000 https://drafts.code-maze.com/?p=65324#comment-7145 In reply to Tadej.

Hello Tadej. If you inspect the ListApplications method inside the HRSpecialist observer class, you will see that it already checks that. So what you can do is create a method in that class to do the check for you and then just call it before listing all the applications. But again, the ListApplications method already does that for you.

]]>
By: Tadej https://code-maze.com/csharp-observer-design-pattern/#comment-7085 Wed, 14 Dec 2022 14:54:11 +0000 https://drafts.code-maze.com/?p=65324#comment-7085 Thank you fir this article!
I have additional question about it.
From your example I see you’re calling observer1.ListApplications() when you know the provider.AddApplication(new(1, “Jesus”)) has been called once before.
My question is, is there any chance to know if the application has been added and only than call ListApplications()?
Thank you for this article and thanks for any suggestion on my question.
Tadej

]]>
By: MarinkoSpasojevic https://code-maze.com/csharp-observer-design-pattern/#comment-6698 Sun, 02 Oct 2022 07:12:18 +0000 https://drafts.code-maze.com/?p=65324#comment-6698 In reply to bobmano.

You are most welcome.

]]>
By: MarinkoSpasojevic https://code-maze.com/csharp-observer-design-pattern/#comment-6697 Sun, 02 Oct 2022 07:11:36 +0000 https://drafts.code-maze.com/?p=65324#comment-6697 In reply to amine_x.

Thank you very much.

]]>
By: bobmano https://code-maze.com/csharp-observer-design-pattern/#comment-6696 Sat, 01 Oct 2022 21:59:28 +0000 https://drafts.code-maze.com/?p=65324#comment-6696 Thank you : )

]]>
By: amine_x https://code-maze.com/csharp-observer-design-pattern/#comment-6695 Sat, 01 Oct 2022 21:57:18 +0000 https://drafts.code-maze.com/?p=65324#comment-6695 Good explanation, keep going and thank you so much

]]>
By: Mahmoud https://code-maze.com/csharp-observer-design-pattern/#comment-5108 Sat, 12 Feb 2022 20:26:09 +0000 https://drafts.code-maze.com/?p=65324#comment-5108 Thanks, The article is very useful!

]]>
By: Tarek Haydar https://code-maze.com/csharp-observer-design-pattern/#comment-5096 Fri, 11 Feb 2022 10:49:54 +0000 https://drafts.code-maze.com/?p=65324#comment-5096 clear explanation, thank you

]]>