Class ConceptExtensions
Provides extensions related to types and others related to ConceptAs<T>.
public static class ConceptExtensions
- Inheritance
-
ConceptExtensions
- Inherited Members
Methods
GetConceptValue(object)
Takes a Concept{T} value object as an object and returns the correct primitive value, also as an object.
public static object GetConceptValue(this object conceptObject)
Parameters
conceptObject
objectThe concept as an object.
Returns
- object
The value of the primitive type on which the concept is based.
Exceptions
- TypeIsNotAConcept
Thrown if type is not a concept.
GetConceptValueType(Type)
Get the type of the value inside a ConceptAs<T>.
public static Type GetConceptValueType(this Type type)
Parameters
Returns
- Type
The type of the ConceptAs<T> value.
IsConcept(object)
Check if an object is an instance of a concept or not.
public static bool IsConcept(this object instance)
Parameters
instance
objectinstance to check.
Returns
- bool
True if object is a concept, false if not.
IsConcept(Type)
Check if a type is a concept or not.
public static bool IsConcept(this Type objectType)
Parameters
Returns
- bool
True if type is a concept, false if not.