EnumExpression<T> Class

Definition

EnumExpression - represents a property which is either a enum(T) or a string expression which resolves to a enum(T).

public class EnumExpression<T> : AdaptiveExpressions.Properties.ExpressionProperty<T> where T : struct
type EnumExpression<'T (requires 'T : struct)> = class
    inherit ExpressionProperty<'T (requires 'T : struct)>
Public Class EnumExpression(Of T)
Inherits ExpressionProperty(Of T)

Type Parameters

T

type of enum.

Inheritance
EnumExpression<T>

Remarks

String values are always interpreted as an enum, unless it has '=' prefix in which case it is evaluated as a expression.

Constructors

EnumExpression<T>()

Initializes a new instance of the EnumExpression<T> class.

EnumExpression<T>(Expression)

Initializes a new instance of the EnumExpression<T> class.

EnumExpression<T>(Func<Object,Object>)

Initializes a new instance of the EnumExpression<T> class.

EnumExpression<T>(JToken)

Initializes a new instance of the EnumExpression<T> class.

EnumExpression<T>(String)

Initializes a new instance of the EnumExpression<T> class.

EnumExpression<T>(T)

Initializes a new instance of the EnumExpression<T> class.

Properties

ExpressionText

Gets or sets the expression text to evaluate to get the value.

(Inherited from ExpressionProperty<T>)
Value

Gets or sets the raw value of the expression property.

(Inherited from ExpressionProperty<T>)

Methods

ConvertObject(Object)

Convert raw object to desired value type.

(Inherited from ExpressionProperty<T>)
GetObject(Object)

Get value as object.

(Inherited from ExpressionProperty<T>)
GetValue(Object)

Get the value.

(Inherited from ExpressionProperty<T>)
SetObject(Object)

Set value as object.

(Inherited from ExpressionProperty<T>)
SetValue(Object)

Sets the value.

ToExpression()

This will return the existing expression or ConstantExpression(Value) if the value is non-complex type.

(Inherited from ExpressionProperty<T>)
ToString()

Returns a string that represents the current object.

(Inherited from ExpressionProperty<T>)
TryGetObject(Object)

Try Get value as object.

(Inherited from ExpressionProperty<T>)
TryGetValue(Object)

Try to Get the value.

(Inherited from ExpressionProperty<T>)

Operators

Implicit(Expression to EnumExpression<T>)
Implicit(JToken to EnumExpression<T>)
Implicit(String to EnumExpression<T>)
Implicit(T to EnumExpression<T>)

Applies to