Skip to content

OptionsTypeBindingRule

public sealed class OptionsTypeBindingRule

Namespace: RhoMicro.BindSight.Models

Inheritance:

Provides access to the binding behavior of a given options type.

OptionsTypeBindingRule(Type, Func<Type, IReadOnlySet<PropertyInfo>>, Func<Type, IReadOnlySet<Type>>)
Section titled “OptionsTypeBindingRule(Type, Func<Type, IReadOnlySet<PropertyInfo>>, Func<Type, IReadOnlySet<Type>>)”
public OptionsTypeBindingRule(Type type, Func<Type, IReadOnlySet<PropertyInfo>> boundPropertiesAccessor, Func<Type, IReadOnlySet<Type>> boundGenericArgumentsAccessor)

Provides access to the binding behavior of a given options type.

NameTypeDescription
boundGenericArgumentsAccessorFunc<Type, IReadOnlySet<Type>>The accessor providing access to the generic arguments of typethat are bound.
boundPropertiesAccessorFunc<Type, IReadOnlySet<PropertyInfo>>The accessor providing access to the properties of typethat are bound.
typeTypeThe type to provide binding behavior rules for.
public Type Type { get; }

Gets the type this rule is defining binding accessors for.

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

Gets the accessor providing access to the bound properties of OptionsTypeBindingRule.Type.

public Func<Type, IReadOnlySet<Type>> BoundGenericArgumentsAccessor { get; }

Gets the accessor providing access to the bound generic arguments of OptionsTypeBindingRule.Type.

public bool Equals(OptionsTypeBindingRule? other)
public override bool Equals(object? obj)

Determines whether the specified object is equal to the current object.

NameTypeDescription
objObjectThe object to compare with the current object.

true if the specified object is equal to the current object; otherwise, false.

public override int GetHashCode()

Serves as the default hash function.

A hash code for the current object.

public static OptionsTypeBindingRule CreateDefault(Type type)

Creates the default binding rule for a type.

NameTypeDescription
typeTypeThe type to create the default binding rule for.

The default binding rule for type.