Commented examples
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 |
---|---|
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 <xref:System.ComponentModel.INotifyPropertyChanged> interface and instruments properties. |
Change Tracking | Automatically implements the <xref:System.ComponentModel.IChangeTracking> or <xref:System.ComponentModel.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. |
If you have developed an original aspect with Metalama, consider contributing to this list.