Class Concept
Provides a check of constraints defined by concept types.
Inherited Members
Namespace: DotNext.Runtime.CompilerServices
Assembly: DotNext.Reflection.dll
Syntax
public static class Concept
Methods
| Improve this Doc View SourceAssert(Type)
Applies constraints described by concept type.
Declaration
public static void Assert(Type conceptType)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | conceptType | A static type describing concept. |
Exceptions
| Type | Condition |
|---|---|
| ConstraintViolationException | One or more constraints defined by concept type are violated. |
| ArgumentException |
|
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 |
|---|---|---|
| Type | conceptType | A static type describing concept. |
| Type[] | other | A set of static types describing concept. |
Exceptions
| Type | Condition |
|---|---|
| ConstraintViolationException | Constraints defined by concept types are violated. |
| ArgumentException | One or more concept types are not marked with ConceptAttribute. |
Assert<TConcept>()
Applies constraints described by concept type.
Declaration
public static void Assert<TConcept>()
Type Parameters
| Name | Description |
|---|---|
| TConcept | A type describing concept. |
Exceptions
| Type | Condition |
|---|---|
| ConstraintViolationException | One or more constraints defined by concept type are violated. |
| ArgumentException |
|