Open sandboxFocus

Interface IDescribedObject<T>

Encapsulates an arbitrary object (typically a declaration) along with its optional human-readable description, used when generating eligibility error messages.

Namespace: Metalama.Framework.Eligibility
Assembly: Metalama.Framework.dll
Syntax
[InternalImplement]
[CompileTime]
public interface IDescribedObject<out T> : IFormattable
Type Parameters
Name Description
T

The type of object being described (typically a declaration type like IMethod or IType).

Remarks

This interface is primarily used in eligibility justification methods, particularly in MustSatisfy<T>(IEligibilityBuilder<T>, Predicate<T>, Func<IDescribedObject<T>, FormattableString>) where the getJustification parameter receives an IDescribedObject<T> to generate error messages.

The Description property provides a formatted description of the object that can be embedded in error messages. When used in a FormattableString, the object will be properly formatted by the framework's custom formatter.

User code typically does not implement this interface directly. It is provided by the framework when eligibility rules are evaluated.

Properties

Name Description
Description

Gets an optional human-readable description of Object, suitable for inclusion in error messages.

Object

Gets the object being described (typically a declaration such as a method, type, or parameter).

Extension Methods

See Also