This chapter shows a few examples that demonstrate how to use Metalama. Each of them is designed as a tutorial, progressively introducing features of growing complexity. You can use these examples to support your learning process.
Example | Description |
---|---|
Validation | Simple aspects relative to validation or normalization of fields, properties, or parameters. |
Logging | Shows several logging aspects, adding complexity at every step. |
Caching | Caches the method return value as a function of its parameters. |
Exception Handling | Demonstrates several exception-handling strategies including retry, Polly, and adding parameter values for richer reports. |
INotifyPropertyChanged | Automatically implements the INotifyPropertyChanged interface and instruments properties. |
Change Tracking | Automatically implements the IChangeTracking or IRevertibleChangeTracking interface interface and instruments fields and properties accordingly. |
Clone | Implements the Deep Clone pattern. |
Memento | Implements the classic Memento pattern. |
Enum View-Model | Creates a view-model class to wrap an enum value. |
Shared Fabric | Demonstrates a fabric that targets several projects. Contributed by Whit Waldo. |
ToString | Implements the ToString method. |
Builder | Implements the Builder pattern, i.e. a mutable Builder type nested inside an immutable type. |
If you have developed an original aspect with Metalama, consider contributing to this list.