Open sandboxFocus

Method HasAspect

HasAspect(Type)

Determines if the current declaration has at least one aspect of the given type.

Declaration
public bool HasAspect(Type aspectType)
Parameters
Type Name Description
Type aspectType
Returns
Type Description
bool
Remarks

You can call this method only for aspects that have been already been applied or are being applied, i.e. you can query aspects that are applied before the current aspect, or you can query instances of the current aspects applied in a parent class.

HasAspect<TAspect>()

Determines if the current declaration has at least one aspect of the given type.

Declaration
public bool HasAspect<TAspect>() where TAspect : IAspect<T>
Returns
Type Description
bool
Type Parameters
Name Description
TAspect
Remarks

You can call this method only for aspects that have been already been applied or are being applied, i.e. you can query aspects that are applied before the current aspect, or you can query instances of the current aspects applied in a parent class.