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. However, before we go deeper into these topics, we need to familiarize you with a few additional concepts.
Article | Description |
---|---|
Transforming code: concepts | This article elucidates essential concepts. We recommend reading this article first before proceeding to the article that covers the advice you need. |
Overriding methods | This article introduces advanced techniques for overriding methods. It is the continuation of Getting started: overriding a method. |
Overriding fields or properties | This article offers advanced techniques for overriding fields and properties. It is the continuation of Getting started: overriding fields and properties. |
Overriding events | This article demonstrates techniques for overriding events. |
Validating parameter, field, and property values with contracts | This article introduces advanced techniques for validating the values of fields, properties, or parameters using contracts. It is the continuation of Getting started: contracts. |
Introducing members | This article explains how to introduce new members to an existing type using aspects. |
Implementing interfaces | This article details how to make an existing type implement a new interface using aspects. |
Introducing types | This article explains how to introduce new types (both top-level types or nested types). |
Adding initializers | This article describes how to add initialization logic to constructors. |
Introducing constructor parameters | This article explains how to add new parameters to constructors and retrieve their value from constructors of derived classes. |
Overriding constructors | This article explains how to override constructors. |
Adding custom attributes | This article explains how to add or remove custom attributes. |
Sharing state with advice | This article discusses how the BuildAspect method can pass parameters or state to the templates. |