extension method for a method C# -
is there way have extension method on method? example method takes user object parameter , need security check if user can use method @ beginning of method. can method have extension method "check can user use me" , return bool.
thanks.
you can use aspect oriented programming (aop) implement cross-cutting security checks in code.
in .net have choice of several aop frameworks, example:
in particular postsharp documentation has some nice examples on how implement security using aop.
Comments
Post a Comment