Skip to content

Instantly share code, notes, and snippets.

@johnbender
Created November 21, 2008 22:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnbender/27658 to your computer and use it in GitHub Desktop.
Save johnbender/27658 to your computer and use it in GitHub Desktop.
public class SomeController : IController
{
public override void Index()
{
//Index action
}
public override void Show()
{
//Show action
}
[Authenticate]
public override void Destroy()
{
//Destroy
}
}
[Serializable]
public class AuthenticateAttribute: OnMethodBoundaryAspect
{
public override void OnEntry( MethodExecutionEventArgs eventArgs)
{
//Authenticate
}
public override void OnExit( MethodExecutionEventArgs eventArgs){ }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment