Demystifying the Options Pattern in .NET

preview_player
Показать описание
In this video, we explore a powerful technique in .NET called the options pattern. We'll cover the different interfaces available, compare using options to manual binding, and explore validating configuration.

#dotnet #webdevelopment #csharp

00:00 intro
00:31 options pattern history
01:23 manual binding
02:31 adding options
04:25 other interfaces
05:55 validation
8:37 summary
Рекомендации по теме
Комментарии
Автор

This was an awesome video and explanation. I've been playing around with the Options pattern the last few days and this really clarified a lot of things in my head.
Cheers Layla. :)

cgs
Автор

Good stuff, always nice to know better ways of doing options than hardcoding them into my app!

GregGum
Автор

I tend to have options like that be immutable and if I want to change something while running the app take and cache from the db. Is it best maybe not but since most of the deployed applications that I have worked with are not allowed to touch the deployed files apart from deploying a new version makes its appeal far less.

I am wondering though you said all the good things about `IOptionsMonitor` but no downsides. What would be some of its downsides ? (Apart from the obvious danger of runtime errors).

Best,

nickpolyderopoulos
Автор

Thank so much.Could you share a GitHub link that contains the sample code?

tesfayekebebe
Автор

At my end i have 1000 json file as config, when i load with ioptionmonitor . Current value it takes 7 minute to load it in memory, anyone with any idea how to tackle that ?

Rahul_aka_Bazinga