Open sandboxFocus

Class CanOnlyBeUsedFromAttribute

Aspect that, when applied to a type or member, reports a warning whenever the target type or member is used from a different type than the ones specified by the Types, Namespaces, NamespaceOfTypes or CurrentNamespace properties.

Inheritance
CanOnlyBeUsedFromAttribute
Namespace: Metalama.Extensions.Architecture.Aspects
Assembly: Metalama.Extensions.Architecture.dll
Syntax
public class CanOnlyBeUsedFromAttribute : BaseUsageValidationAttribute, IConditionallyInheritableAspect, IAspect<IMemberOrNamedType>, IAspect, ICompileTimeSerializable, ITemplateProvider, IEligible<IMemberOrNamedType>

Constructors

Name Description
CanOnlyBeUsedFromAttribute()

Methods

Name Description
BuildAspect(IAspectBuilder<IMemberOrNamedType>)

Initializes the aspect. The implementation must add advice, child aspects and validators using the builder parameter.

BuildEligibility(IEligibilityBuilder<IMemberOrNamedType>)

Configures the eligibility of the aspect or attribute. Implementations are not allowed to reference non-static members. Implementations must call the implementation of the base class if it exists.

Extension Methods