Open sandboxFocus

Class ManagedResourceIntroductionAspect

Aspect that, when applied to an assembly, adds a managed resource to this assembly.

Inheritance
ManagedResourceIntroductionAspect
Namespace: PostSharp.Aspects
Assembly: PostSharp.dll
Syntax
public sealed class ManagedResourceIntroductionAspect : IManagedResourceIntroductionAspect, IAspect, IAspectBuildSemantics, IValidableAnnotation
Remarks

This aspect is not a custom attribute. Create instances of it at build time from an aspect that implements IAspectProvider, typically an AssemblyLevelAspect, and return them in an AspectInstance that targets the assembly. Because the content is computed at build time, it can be generated or transformed before it is embedded. At run time, read the resource with GetManifestResourceStream(string), passing Name.

Constructors

Name Description
ManagedResourceIntroductionAspect(string, byte[])

Initializes a new instance of the ManagedResourceIntroductionAspect class by passing the data as a byte array.

ManagedResourceIntroductionAspect(string, Func<byte[]>)

Initializes a new instance of the ManagedResourceIntroductionAspect class by passing a delegate for late evaluation of the resource content.

Properties

Name Description
Data

Gets the content of the managed resource.

DataProvider

Gets a delegate that provides the content of the managed resource.

Name

Gets the name of the managed resource.

See Also