Open sandboxFocus

Method InternalsCanOnlyBeUsedFrom

InternalsCanOnlyBeUsedFrom(IAspectReceiver<IDeclaration>, Func<ReferencePredicateBuilder, ReferencePredicate>, string?, ReferenceKinds)

Reports a warning when any of the internal APIs of the current selection in used from a different context than the one allowed, except if this concept has access to the type using inheritance rules.

Declaration
public static void InternalsCanOnlyBeUsedFrom(this IAspectReceiver<IDeclaration> receiver, Func<ReferencePredicateBuilder, ReferencePredicate> predicate, string? description = null, ReferenceKinds referenceKinds = (ReferenceKinds)-1)
Parameters
Type Name Description
IAspectReceiver<IDeclaration> receiver
Func<ReferencePredicateBuilder, ReferencePredicate> predicate
string description
ReferenceKinds referenceKinds

InternalsCanOnlyBeUsedFrom<TDeclaration>(IAspectReceiver<TDeclaration>, Func<ReferencePredicateBuilder, TDeclaration, ReferencePredicate>, string?, ReferenceKinds)

Reports a warning when any of the internal APIs of the current selection in used from a different context than the one allowed, except if this concept has access to the type using inheritance rules. This overload supplies the selected declaration to the predicate.

Declaration
public static void InternalsCanOnlyBeUsedFrom<TDeclaration>(this IAspectReceiver<TDeclaration> receiver, Func<ReferencePredicateBuilder, TDeclaration, ReferencePredicate> predicate, string? description = null, ReferenceKinds referenceKinds = (ReferenceKinds)-1) where TDeclaration : class, IDeclaration
Parameters
Type Name Description
IAspectReceiver<TDeclaration> receiver
Func<ReferencePredicateBuilder, TDeclaration, ReferencePredicate> predicate
string description
ReferenceKinds referenceKinds
Type Parameters
Name Description
TDeclaration

InternalsCanOnlyBeUsedFrom<TDeclaration, TTag>(IAspectReceiver<TDeclaration, TTag>, Func<ReferencePredicateBuilder, TDeclaration, TTag, ReferencePredicate>, string?, ReferenceKinds)

Reports a warning when any of the internal APIs of the current selection in used from a different context than the one allowed, except if this concept has access to the type using inheritance rules. This overload supplies the selected declaration and the tag (added using Tag<TTag>(Func<TDeclaration, TTag>)) to the predicate.

Declaration
public static void InternalsCanOnlyBeUsedFrom<TDeclaration, TTag>(this IAspectReceiver<TDeclaration, TTag> receiver, Func<ReferencePredicateBuilder, TDeclaration, TTag, ReferencePredicate> predicate, string? description = null, ReferenceKinds referenceKinds = (ReferenceKinds)-1) where TDeclaration : class, IDeclaration
Parameters
Type Name Description
IAspectReceiver<TDeclaration, TTag> receiver
Func<ReferencePredicateBuilder, TDeclaration, TTag, ReferencePredicate> predicate
string description
ReferenceKinds referenceKinds
Type Parameters
Name Description
TDeclaration
TTag