MetalamaAPI documentationAspect APIMetalama.​Framework.​AspectsIMeta­Target
Open sandboxFocus

IMetaTarget Interface

Namespace: Metalama.Framework.Aspects
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public interface IMetaTarget

Properties

Name Description
Compilation

Gets the code model of the whole compilation.

Constructor

Gets the target constructor, or throws an exception if the advice does not target a constructor.

ContractDirection

Gets the direction of the contract for which the template is being expanded.

Declaration

Gets the target declaration.

Event

Gets the target event, or throws an exception if the advice does not target an event.

Field

Gets the target field, or throws an exception if the advice does not target a field.

FieldOrProperty

Gets the target field or property, or throws an exception if the advice does not target a field or a property.

FieldOrPropertyOrIndexer

Gets the target field or property or indexer, or throws an exception if the advice does not target a field or a property or an indexer.

Indexer

Gets the target indexer, or throws an exception if the advice does not target an indexer.

Member

Gets the target member (method, constructor, field, property or event, but not a nested type), or throws an exception if the advice does not target a member.

Method

Gets the target method, or the accessor if this is a template for a field, property or event, or throws an exception if the advice does not target a method or accessor.

MethodBase

Gets the target method or constructor, or the accessor if this is a template for a field, property or event, or throws an exception if the advice does not target a method, constructor or accessor.

Parameter

Gets the target parameter or throws an exception if the advice does not target a parameter.

Parameters

Gets the list of parameters of the current Method, Constructor, Property or Indexer or throws an exception if the advice does not target a method, constructor, property or indexer.

Project

Gets the project being compiled.

Property

Gets the target field or property, or throws an exception if the advice does not target a field or a property.

Type

Gets the code model of current type including the introductions of the current aspect type.

Extension Methods

ContractExtensions.GetContractOptions(IMetaTarget)