PostSharpAPI ReferencePost­Sharp.​AspectsManaged­Resource­Introduction­AspectManaged­Resource­Introduction­Aspect
Open sandboxFocus

ManagedResourceIntroductionAspect Constructor

ManagedResourceIntroductionAspect(String, Byte[])

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

Declaration
public ManagedResourceIntroductionAspect(string name, byte[] data)
Parameters
Type Name Description
System.String name

Name of the managed resource.

System.Byte[] data

Content of the managed resource.

ManagedResourceIntroductionAspect(String, Func<Byte[]>)

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

Declaration
public ManagedResourceIntroductionAspect(string name, Func<byte[]> dataProvider)
Parameters
Type Name Description
System.String name

Name of the managed resource.

System.Func<System.Byte[]> dataProvider

A method that returns the data to be introduced. If the method returns null, the aspect will be ignored and no managed resource will be introduced. .