Class Concept
Provides a check of constraints defined by concept types.
Namespace: DotNext.Runtime.CompilerServices
Assembly: DotNext.Reflection.dll
Syntax
public static class Concept : object
Methods
| Improve this Doc View SourceAssert(Type)
Applies constraints described by concept type.
Declaration
public static void Assert(Type conceptType)
Parameters
Type | Name | Description |
---|---|---|
DotNext.Reflection.Type | conceptType | A static type describing concept. |
Exceptions
Type | Condition |
---|---|
ConstraintViolationException | One or more constraints defined by concept type are violated. |
Assert(Type, Type[])
Applies a chain of constraints described by multiple concept types.
Declaration
public static void Assert(Type conceptType, params Type[] other)
Parameters
Type | Name | Description |
---|---|---|
DotNext.Reflection.Type | conceptType | A static type describing concept. |
DotNext.Reflection.Type[] | other | A set of static types describing concept. |
Exceptions
Type | Condition |
---|---|
ConstraintViolationException | Constraints defined by concept types are violated. |
Assert<C>()
Applies constraints described by concept type.
Declaration
public static void Assert<C>()
Type Parameters
Name | Description |
---|---|
C | A type describing concept. |
Exceptions
Type | Condition |
---|---|
ConstraintViolationException | One or more constraints defined by concept type are violated. |