Skip to main content
.NETStandard2.0

Metalama. A tool for aspect-oriented programming (AOP) using templates written in pure C#.

Published
Nov 2, 2022
4y ago
Total Downloads
1.5M
1,543,694

Known Vulnerabilities (1)

Install

dotnet add package Metalama.Framework --version 0.5.54-preview
ProductVersions
.NET Standard
netstandard2.0

README

The Metalama.Framework package is the principal package of Metalama. Reference this package if you want to use Metalama in your code.

Referencing this package replaces the compiler with Metalama.Compiler, a shallow fork of Roslyn that adds an extension point to transform the syntax trees.

What is Metalama?

Metalama is a modern, Roslyn-based meta-programming framework C# with focus on aspect-oriented programmning, code generation and code validation.

It is an extension of the Microsoft "Roslyn" C# compiler that allows you to automatically transform your source code at build time or design time based on encapsulated code transformations called aspects. Metalama can be used for aspect-oriented programming, code generation, or architecture validation.

Metalama is intended to replace the MSIL-based stack that is now the foundation of PostSharp.

Documentation and examples

Link Description
Documentation Conceptual and API documentation.
Try Metalama Try Metalama from your browser. Based on https://try.dot.net/
Metalama.Samples A dozen of examples in a GitHub repo.
Metalama.Open.AutoCancellationToken A low-level Metalama aspect that adds cancellation tokens to your method declarations and your method calls.
Metalama.Open.Virtuosity A low-level Metalama aspect that makes your methods virtual. (A fork of Virtuosity.Fody.)
Metalama.Open.Costura A low-level Metalama aspect that embeds dependent assemblies as managed resources. (A fork of Costura.Fody.)
Metalama.Framework.Extensions Open-source extensions to Metalama.Framework.

Metalama components

For a diagram of the multiple packages that compose Metalama, see https://doc.metalama.net/deployment/packages.

Feedback and support

If you have any feedback regarding Metalama, please open an issue, start a discussion, or contact us directly at [email protected].

You can also join our Slack community and ask your technical questions in real time.

Slack

Changes from Previous Version

No structural changes between v0.5.53-preview and v0.5.54-preview.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.Published vulnerability advisories exist for this version. Read the advisory and choose a remediated version before release.No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.