In Creating simple aspects, you learned how to build simple aspects composed of a single transformation (or advice). This section introduces more advanced scenarios and explains how to create aspects composed of multiple pieces of advice. Before diving deeper into these topics, familiarize yourself with a few additional concepts.
| Article | Description |
|---|---|
| Transforming code: concepts | Explains essential concepts. We recommend reading this article first. |
| Overriding methods | Advanced techniques for overriding methods. Continuation of Getting started with overriding methods. |
| Overriding fields or properties | Advanced techniques for overriding fields and properties. Continuation of Getting started with overriding fields and properties. |
| Overriding events | Techniques for overriding events. |
| Validating parameter, field, and property values with contracts | Advanced techniques for validating field, property, or parameter values using contracts. Continuation of Getting started with contracts. |
| Introducing members | Explains how to introduce new members to an existing type using aspects. |
| Implementing interfaces | Details how to make an existing type implement a new interface using aspects. |
| Introducing types | Explains how to introduce new types (both top-level and nested types). |
| Adding initializers | Describes how to add initialization logic to constructors. |
| Introducing constructor parameters | Explains how to add new parameters to constructors and retrieve their value from constructors of derived classes. |
| Overriding constructors | Explains how to override constructors. |
| Adding or removing custom attributes | Explains how to add or remove custom attributes. |
| Sharing state with advice | Discusses how the BuildAspect method can pass parameters or state to templates. |