Reflection IT Blog

Benieuwd naar de laatste ontwikkelingen rondom software ontwikkeling en Reflection IT? Onze slimme koppen delen regelmatig hun kennis en ervaring. Zo weet jij wat er speelt!

sourcegenerator tagged Blog posts

Introducing ReflectionIT.PropertyThrowGenerator - Add compile‑time validated properties to your C# classes with zero boilerplate

01-Jun-2026

.NET 6, 7 and 8 introduced a set of powerful Argument...Exception.ThrowIf... helper methods. They’re fast, they’re clean, and they eliminate a ton of repetitive guard‑clause code. But let’s be honest: writing validation logic in every property setter still gets old quickly.

So I built ReflectionIT.PropertyThrowGenerator — a Roslyn source generator that injects validation logic directly into your partial properties using simple [ThrowIf...] attributes. You declare what should be validated, and the generator writes the how.

No more boilerplate. No more forgetting a null check. No more copy‑paste errors.

Just clean, validated properties.

Introducing ReflectionIT.DisposeGenerator — A Modern Source Generator for the Dispose Pattern

29-Apr-2026

Over the years I’ve implemented the Dispose pattern in C# more times than I can count. And if you’ve done the same, you know the drill: boilerplate, subtle rules, edge cases, async variants, thread‑safety, unmanaged resources, inheritance… and the constant risk of getting one tiny detail wrong.

So I decided to fix that.

Today I’m happy to introduce a new open‑source project:

Get in touch

Met dit formulier kunt u informatie over een In-Company of Small-Group training aanvragen. U kunt in het bericht aangeven welke training u wilt, voor hoeveel personen, wanneer deze verzorgd moet worden en op welke locatie. Wij nemen vervolgens contact met u op.

U kunt ons ook bereiken via telefoonnummer +31 (0)493-688810 of per mail training@reflectionit.nl.