PostSharpAPI ReferencePost­SharpPost
Open sandboxFocus

Post Class

Provides some methods that are transformed during post-compilation.

Inheritance
Post
Namespace: PostSharp
Assembly: PostSharp.dll
Syntax
public static class Post : Object

Properties

Name Description
IsTransformed

Determines whether the calling program has been transformed by PostSharp. Calls to this property are replaced at build time.

Methods

Name Description
Cast<TSource, TTarget>(TSource)

At post-compile time, casts an instance of a type into another. A post-compile time error is reported if the source type cannot be assigned to the target type.

GetMutableRef<T>(in T)

Gets a mutable reference from a read-only in reference. Calls to this method are replaced at build time.

GetValue<T>(T)

When used to retrieve the value of a field, forces the compiler to retrieve a copy of the field value instead of an address to this field. This allows to call instance methods of value-type fields without loading the field address.