Skip to content

OptionsTypeBindingRuleDefaults

public static class OptionsTypeBindingRuleDefaults

Namespace: RhoMicro.BindSight.Models

Inheritance:

Provides binding rule defaults.

public static Func<Type, IReadOnlySet<Type>> EmptyGenericArgumentsAccessor { get; }

Gets a generic argument accessor that will always return an empty set.

public static Func<Type, IReadOnlySet<PropertyInfo>> EmptyPropertyAccessor { get; }

Gets a property accessor that will always return an empty set.

public static Func<Type, IReadOnlySet<Type>> ItemTypeAccessor { get; }

Gets a generic argument accessor that retrieves the single type argument of a type, or an empty set if it has no type arguments or more than one argument.

public static Func<Type, IReadOnlySet<Type>> ValueTypeAccessor { get; }

Gets a generic argument accessor that retrieves the second type argument of a type, or an empty set if it has more or less than two type arguments.

public static Func<Type, IReadOnlySet<PropertyInfo>> PropertiesAccessor { get; }

Gets the default property accessor that yields all bindable properties of a type.

public static ImmutableHashSet<Type> Primitives { get; }

Gets the set of bindable primitive types.

public static ImmutableHashSet<Type> ListTypes { get; }

Gets the set of bindable list-like types.

public static ImmutableHashSet<Type> MutableListTypes { get; }

Gets the set of mutable bindable list-like types.

public static ImmutableHashSet<Type> ImmutableListTypes { get; }

Gets the set of immutable bindable list-like types.

public static ImmutableHashSet<Type> DictionaryTypes { get; }

Gets the set of bindable dictionary-like types.

public static ImmutableHashSet<Type> MutableDictionaryTypes { get; }

Gets the set of mutable bindable dictionary-like types.

public static ImmutableHashSet<Type> ImmutableDictionaryTypes { get; }

Gets the set of immutable bindable dictionary-like types.

public static bool IsDictionaryType(Type type)

Gets a value indicating whether a given type is a dictionary-like type.

NameTypeDescription
typeTypeThe type to check.

true if type is a dictionary-like type; otherwise, false.

public static bool IsListType(Type type)

Gets a value indicating whether a given type is a list-like type.

NameTypeDescription
typeTypeThe type to check.

true if type is a list-like type; otherwise, false.

public static Func<Type, IReadOnlySet<Type>> GetGenericArgumentsAccessor(Type type)

Gets the default generic arguments accessor for the given type.

NameTypeDescription
typeTypeThe type to get an accessor for.

The default generic arguments accessor for type.

public static Func<Type, IReadOnlySet<PropertyInfo>> GetPropertiesAccessor(Type type)

Gets the default properties accessor for the given type.

NameTypeDescription
typeTypeThe type to get an accessor for.

The default properties accessor for type.