DEV Community

Discussion on: Refactoring C# code using partial classes

Collapse
 
victorioberra profile image
Victorio Berra

Extension methods are very widely used. Check out IdentityServer and IdentityModel.

Collapse
 
jwp profile image
John Peters

I've worked at two companies in last 5 years, neither allowed extension methods.

I was astonished at their arrogance.

Thread Thread
 
victorioberra profile image
Victorio Berra

It's probably because they are difficult to test. There are solutions, but they are a little gross I'll admit. Regardless, they result in such a clean API surface compared to having to pass a bunch of things in as parameters.

Thread Thread
 
tyrrrz profile image
Oleksii Holub

They are not any harder to test than anything else.