Class AggregatingTypeShapeProvider
An ITypeShapeProvider that returns the first shape found from iterating over a given list of providers.
public sealed class AggregatingTypeShapeProvider : ITypeShapeProvider
- Inheritance
-
AggregatingTypeShapeProvider
- Implements
- Inherited Members
- Extension Methods
Remarks
This aggregator implements the chain of responsibility pattern.
Whether this aggregator caches the results of the providers is undefined, and should be non-observable assuming the providers themselves do not change their return values over time.
Constructors
AggregatingTypeShapeProvider(params ITypeShapeProvider[])
Initializes a new instance of the AggregatingTypeShapeProvider class.
public AggregatingTypeShapeProvider(params ITypeShapeProvider[] providers)
Parameters
providersITypeShapeProvider[]The sequence of providers to solicit for type shapes.
Properties
Providers
Gets the list of providers making up this aggregate provider.
public IReadOnlyList<ITypeShapeProvider> Providers { get; }
Property Value
Methods
GetTypeShape(Type)
Gets a ITypeShape instance corresponding to the specified type.
public ITypeShape? GetTypeShape(Type type)
Parameters
typeTypeThe type for which a shape is requested.
Returns
- ITypeShape
A ITypeShape instance corresponding to the current type, or null if a shape is not available.