alexeysuvorov/MethodDecorator — pull request #2 by davidalpert (2014-03-16 03:59:15+00:00)
Title: Ship an assembly with a strongly-typed base attribute class and interface to derive from or implement.

This branch extends the "add-this" branch to add a new MethodDecoratorEx.dll assembly to the nuget package.

This new assembly contains a strongly-typed interface and base class that you can reference, implement, and derive from in consuming projects to ensure that your method decorators have the proper syntax to get picked up by the MethodDecoratorEx.Fody weaver.

This makes implementing your own weaver as easy as deriving from the base class and overriding only those methods that you're interested in.

The shipping assembly also sets the stage to extend the MethodDecorator as follows:

- [ ] Add an enumeration with ContinueState
- [ ] Update the signature of OnEnter to return a ContinueState value describing the intention of the decorator
- [ ] Update the generated IL such that the return value from OnEnter is inspected and execution then branched (e.g. ContinueState.Continue vs. ContinueState.Skip)
- [ ] Extend the return value of OnEnter to be a class that supports additional ContinueStates such as Throw (with an exception instance) or Return (with a return value to use in place of the method's actual return).