jspuij / RESTier

A turn-key library for building RESTful services
http://odata.github.io/RESTier
Other
2 stars 0 forks source link

Remove InvocationContextExtensions #5

Closed jspuij closed 5 years ago

jspuij commented 5 years ago

This set of extension methods serves nothing, but to expose the Service provider, which we want to get rid of in the first place because of the Service-locator anti-pattern. IT's implemented as another anti-pattern. There is NO need to create extension methods when the original class is available to add the methods to.

You could argue that there is another reason to use extensions methods: When you add a new stateless API on top of a set of classes / interfaces that was never intended to support this api originally (like LINQ on enumerable stuff or Reactive extensions). There really is no reason here.

jspuij commented 5 years ago

This is a subtask of OData#629.