lundi 23 janvier 2017

How can I filter return values on every public method in a class? [C#]

I'm looking for a non-PostSharp method of filtering a collection of data, by a few of of the properties on the type of data. Currently, I'm going with a strongly-typed return value, that a "filterer" that returns that type can provide. However, I don't know if this is the best way with C# code. If PostSharp, or another AOP library, is the best way to achieve what I am trying to, explain why or link to a reason why. I'm not morally opposed to PostSharp; it just seems like a hassle to setup, and possible overkill.





Aucun commentaire:

Enregistrer un commentaire