Class SelectionTypeInfo
- Namespace
- BlazOrbit.Abstractions
- Assembly
- BlazOrbit.Core.dll
Reflective shape descriptor for a selection value type. Detects single vs. multi-select mode and builds the materialize/extract pair used by SelectionState<TValue>.
public sealed class SelectionTypeInfo
- Inheritance
-
objectSelectionTypeInfo
Constructors
SelectionTypeInfo(Type)
public SelectionTypeInfo(Type valueType)
Parameters
valueTypeTypeConcrete CLR type of the selection value. May be a scalar (single-select), an array (
T[]) or a generic collection (System.Collections.Generic.List<T>, System.Collections.Generic.HashSet<T>). For multi-select collection types the ctor needs the parameterless constructor and anAddmethod preserved onvalueType.
Properties
ElementType
Element type carried by the selection (the inner T for collections).
public Type ElementType { get; }
Property Value
- Type
IsMultiple
True when ValueType is a collection / array type.
public bool IsMultiple { get; }
Property Value
- bool
ValueType
The original CLR type that was inspected.
public Type ValueType { get; }
Property Value
- Type
Methods
ContainsValue(object?, object?)
Returns whether collection contains value.
public bool ContainsValue(object? collection, object? value)
Parameters
collectionobjectvalueobject
Returns
- bool
CreateValue<TValue>(IEnumerable<object>)
Builds a value of TValue from the supplied items.
public TValue CreateValue<TValue>(IEnumerable<object> values)
Parameters
valuesIEnumerable<object>
Returns
- TValue
Type Parameters
TValue
ExtractValues(object?)
Unpacks a value into its constituent items (single-element sequence for scalars).
public IEnumerable<object> ExtractValues(object? value)
Parameters
valueobject
Returns
- IEnumerable<object>
ValuesEqual(object?, object?)
Default value-equality used across selection comparisons.
public bool ValuesEqual(object? a, object? b)
Parameters
aobjectbobject
Returns
- bool