Class Type<T>.Operator<TOperand>
Represents binary operator applicable to type T.
Inherited Members
Namespace: DotNext.Reflection
Assembly: DotNext.Reflection.dll
Syntax
public static class Operator<TOperand>
Type Parameters
| Name | Description |
|---|---|
| TOperand | Type of second operand. |
Methods
| Improve this Doc View SourceGet<TResult>(BinaryOperator, OperatorLookup)
Gets binary operator.
Declaration
public static BinaryOperator<T, TOperand, TResult> Get<TResult>(BinaryOperator op, OperatorLookup lookup = OperatorLookup.Any)
Parameters
| Type | Name | Description |
|---|---|---|
| BinaryOperator | op | Binary operator type. |
| OperatorLookup | lookup | Operator resolution strategy. |
Returns
| Type | Description |
|---|---|
| BinaryOperator<T, TOperand, TResult> | Binary operator; or null, if it doesn't exist. |
Type Parameters
| Name | Description |
|---|---|
| TResult | Result of binary operator. |
Require<TResult>(BinaryOperator, OperatorLookup)
Gets binary operator.
Declaration
public static BinaryOperator<T, TOperand, TResult> Require<TResult>(BinaryOperator op, OperatorLookup lookup = OperatorLookup.Any)
Parameters
| Type | Name | Description |
|---|---|---|
| BinaryOperator | op | Binary operator type. |
| OperatorLookup | lookup | Operator resolution strategy. |
Returns
| Type | Description |
|---|---|
| BinaryOperator<T, TOperand, TResult> | Binary operator. |
Type Parameters
| Name | Description |
|---|---|
| TResult | Result of binary operator. |
Exceptions
| Type | Condition |
|---|---|
| MissingOperatorException | Operator doesn't exist. |