Open sandboxFocusImprove this doc

Status of the migration of PostSharp features to Metalama

PostSharp Aspect Framework

The PostSharp Framework has been entirely ported to Metalama, with a few notable limitations:

  • Methods from an external assembly cannot be intercepted; only those from the current project can be.

  • The event of suspending and resuming an async state machine, as in PostSharp, cannot be advised. Specifically, the await keyword cannot be advised.

  • The raise semantic of an event cannot be intercepted, only the add and remove semantics can be.

  • Some constructor-related advice types are not yet implemented:

    • After the last constructor
    • After MemberwiseClone

PostSharp Architecture Framework

The equivalent of PostSharp Architecture Framework (e.g. the PostSharp.Constraints namespace) is the Metalama.Extensions.Architecture package.

See Verifying architecture for details.

PostSharp Patterns

Library Migration Status Documentation Feature gaps
Contracts Completed Metalama.Patterns.Contracts None
Caching Completed Metalama.Patterns.Caching None
INotifyPropertyChanged Completed Metalama.Patterns.Observability See Migrating the [NotifyPropertyChanged] aspects
WPF Completed Metalama.Patterns.Wpf None
Undo/Redo Not started
Diagnostics (logging) Not started
Multi-threading Not started
Aggregatable Not started
Weak event Not started