Metalama
Metalama is a meta-programming framework for C# based on Roslyn, Microsoft's managed compiler platform.
Features
Metalama has the following principal features:
Feature | Description |
---|---|
Aspect-Oriented Programming | Encapsulate repetitive patterns of code (such as logging, caching, INotifyPropertyChanged, multi-threading) into executable artifacts named aspects that add behaviors to your code at compile time, so that your source code remains clean and succinct — easier to read and maintain. |
Code Generation | Generate repetitive code, in the editor or at compile time, instead of writing it by hand. With Metalama, you can author your own code actions or refactorings that are available in the lightbulb or screwdriver menu. |
Code Validation | Verify that hand-written code complies to team rules and conventions. Metalama lets you report diagnostics (e.g. warnings or errors) or suppress source code diagnostics simply. |
Documentation structure
Site | Description |
---|---|
Metalama Conceptual Documentation | Conceptual and procedural documentation |
Aspect API Documentation | Aspect API reference |
Introspection API Documentation | Introspection API reference |
Advanced API Documentation | Advanced API reference |
The conceptual documentation is hosted on https://github.com/postsharp/Metalama.Documentation. You can suggest improvements and corrections using the discussions board, and even submit a pull request.
Examples
Link | Description |
---|---|
Try Metalama | Try Metalama from your browser. |
Metalama.Samples | A dozen of open-source examples in a GitHub repo. |
Licensing
Metalama is currently released under the terms of the Evaluation License of PostSharp.
Feedback
If you have any feedback regarding Metalama, please open an issue, start a discussion, or contact us directly at hello@postsharp.net.