Interface IEntityAttributeValueTypeSpecifier
As C# doesn't support dependent types, we cannot define a class which is given by generic constraints to the values of the entities, attributes and values in terms of some (value) dependent type at compile time. We have to check whether an entity/attribute/value triplet belongs to a particular class at runtime via a type membership predicate, IsTypeMember<V>(IEntityIdentifier, IAttribute<V>, V) instead
public interface IEntityAttributeValueTypeSpecifier
Methods
IsTypeMemberForAnyValue(IEntityIdentifier, IAttribute)
Whether the entity and attribute are a member for some value. Attributes are matched by name; the value type is the provider's to check.
bool IsTypeMemberForAnyValue(IEntityIdentifier entityIdentifier, IAttribute attribute)
Parameters
entityIdentifierIEntityIdentifierattributeIAttribute
Returns
IsTypeMember<V>(IEntityIdentifier, IAttribute<V>, V)
Whether the triplet is a member.
bool IsTypeMember<V>(IEntityIdentifier entityIdentifier, IAttribute<V> attribute, V value) where V : struct
Parameters
entityIdentifierIEntityIdentifierattributeIAttribute<V>valueV
Returns
Type Parameters
V
Exceptions
- AttributeTypeMismatchException
The specifier admits values of another type for the attribute.