PostSharp SDK 6.10 / / Class Reference / Post­Sharp.​Sdk.​Extensibility Namespace / IExpression­Evaluator Interface

IExpressionEvaluator Interface

Exposes the services that evaluate expressions inside a PostSharp project.

Namespace:  PostSharp.Sdk.Extensibility
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.10.14.0 (6.10.14.0)
Syntax
C#
public interface IExpressionEvaluator

The IExpressionEvaluator type exposes the following members.

Methods
  NameDescription
Public methodEvaluate(String, MessageLocation)
Evaluates an expression.
Public methodEvaluate(String, Boolean, MessageLocation)
Evaluates an expression and emits an error if the expression returns an empty value.
Public methodTryEvaluateBoolean
Evaluates an expression and tries to convert its result to a bool.
Public methodTryEvaluateConvertible(String, Type, Object, MessageLocation)
Evaluates an expression and tries to convert its result to a given type that implements IConvertible.
Public methodTryEvaluateConvertible<T>(String, T, MessageLocation)
Evaluates an expression and tries to convert its result to a given type that implements IConvertible.
Public methodTryEvaluateEnum(String, Type, Object, MessageLocation)
Evaluates an expression and tries to convert its result to a given enumeration type.
Public methodTryEvaluateEnum<T>(String, T, MessageLocation)
Evaluates an expression and tries to convert its result to a given enumeration type.
Public methodTryEvaluateEnum<T>(String, T, T, MessageLocation)
Evaluates an expression and tries to convert its result to a given enumeration type. Returns a default value if the expression cannot be evaluated.
See Also