Open sandboxFocus

Interface ITypeFacetCollection

Read-only collection of the facets of a named type, reached through Facets.

Namespace: Metalama.Framework.Code.Collections
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
[InternalImplement]
public interface ITypeFacetCollection : IReadOnlyCollection<ITypeFacet>, IEnumerable<ITypeFacet>, IEnumerable
Remarks

The collection contains exactly the typed properties of this interface that are not null, and Count is their number. Reading a facet through its typed property is therefore equivalent to searching the collection for that kind, and it is the intended way to reach a facet.

The collection is empty for a type that has no facet, which is the case of most named types. That case allocates nothing, because every such type returns one shared instance.

Properties

Name Description
Delegate

Gets the facet of the delegate, or null when the type is not a delegate.

Enum

Gets the facet of the enum, or null when the type is not an enum.

Record

Gets the facet of the record, or null when the type is not a record.

Union

Gets the facet of the union, or null when the type is not a union.

Extension Methods

See Also