IExpressionNode.Evaluate Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| Evaluate(ITraceWriter, ISecretMasker, Object, EvaluationOptions) |
Evaluates the expression and returns the result. |
| Evaluate<T>(ITraceWriter, ISecretMasker, Object) |
Evaluates the expression and attempts to cast or deserialize the result to the specified type. The specified type can either be simple type or a JSON-serializable class. Allowed simple types are: Boolean, String, Version, Byte, SByte, Int16, UInt16, Int32, UInt32, Int64, UInt64, Single, Double, or Decimal. When a JSON-serializable class is specified, the following rules are applied: If the type of the evaluation result object, is assignable to the specified type, then the result will be cast and returned. If the evaluation result object is a String, it will be deserialized as the specified type. If the evaluation result object is null, null will be returned. |
| Evaluate<T>(ITraceWriter, ISecretMasker, Object, EvaluationOptions) |
Evaluates the expression and attempts to cast or deserialize the result to the specified type. The specified type can either be simple type or a JSON-serializable class. Allowed simple types are: Boolean, String, Version, Byte, SByte, Int16, UInt16, Int32, UInt32, Int64, UInt64, Single, Double, or Decimal. When a JSON-serializable class is specified, the following rules are applied: If the type of the evaluation result object, is assignable to the specified type, then the result will be cast and returned. If the evaluation result object is a String, it will be deserialized as the specified type. If the evaluation result object is null, null will be returned. |
Evaluate(ITraceWriter, ISecretMasker, Object, EvaluationOptions)
Evaluates the expression and returns the result.
public object Evaluate(Microsoft.TeamFoundation.DistributedTask.Expressions.ITraceWriter trace, Microsoft.TeamFoundation.DistributedTask.Logging.ISecretMasker secretMasker, object state, Microsoft.TeamFoundation.DistributedTask.Expressions.EvaluationOptions options = null);
abstract member Evaluate : Microsoft.TeamFoundation.DistributedTask.Expressions.ITraceWriter * Microsoft.TeamFoundation.DistributedTask.Logging.ISecretMasker * obj * Microsoft.TeamFoundation.DistributedTask.Expressions.EvaluationOptions -> obj
Public Function Evaluate (trace As ITraceWriter, secretMasker As ISecretMasker, state As Object, Optional options As EvaluationOptions = null) As Object
Parameters
- trace
- ITraceWriter
Optional trace writer
- secretMasker
- ISecretMasker
Optional secret masker
- state
- Object
State object for custom evaluation function nodes and custom named-value nodes
- options
- EvaluationOptions
Returns
Applies to
Evaluate<T>(ITraceWriter, ISecretMasker, Object)
Evaluates the expression and attempts to cast or deserialize the result to the specified type. The specified type can either be simple type or a JSON-serializable class. Allowed simple types are: Boolean, String, Version, Byte, SByte, Int16, UInt16, Int32, UInt32, Int64, UInt64, Single, Double, or Decimal. When a JSON-serializable class is specified, the following rules are applied: If the type of the evaluation result object, is assignable to the specified type, then the result will be cast and returned. If the evaluation result object is a String, it will be deserialized as the specified type. If the evaluation result object is null, null will be returned.
public T Evaluate<T>(Microsoft.TeamFoundation.DistributedTask.Expressions.ITraceWriter trace, Microsoft.TeamFoundation.DistributedTask.Logging.ISecretMasker secretMasker, object state);
abstract member Evaluate : Microsoft.TeamFoundation.DistributedTask.Expressions.ITraceWriter * Microsoft.TeamFoundation.DistributedTask.Logging.ISecretMasker * obj -> 'T
Public Function Evaluate(Of T) (trace As ITraceWriter, secretMasker As ISecretMasker, state As Object) As T
Type Parameters
- T
Parameters
- trace
- ITraceWriter
Optional trace writer
- secretMasker
- ISecretMasker
Optional secret masker
- state
- Object
State object for custom evaluation function nodes and custom named-value nodes
Returns
Applies to
Evaluate<T>(ITraceWriter, ISecretMasker, Object, EvaluationOptions)
Evaluates the expression and attempts to cast or deserialize the result to the specified type. The specified type can either be simple type or a JSON-serializable class. Allowed simple types are: Boolean, String, Version, Byte, SByte, Int16, UInt16, Int32, UInt32, Int64, UInt64, Single, Double, or Decimal. When a JSON-serializable class is specified, the following rules are applied: If the type of the evaluation result object, is assignable to the specified type, then the result will be cast and returned. If the evaluation result object is a String, it will be deserialized as the specified type. If the evaluation result object is null, null will be returned.
public T Evaluate<T>(Microsoft.TeamFoundation.DistributedTask.Expressions.ITraceWriter trace, Microsoft.TeamFoundation.DistributedTask.Logging.ISecretMasker secretMasker, object state, Microsoft.TeamFoundation.DistributedTask.Expressions.EvaluationOptions options = null);
abstract member Evaluate : Microsoft.TeamFoundation.DistributedTask.Expressions.ITraceWriter * Microsoft.TeamFoundation.DistributedTask.Logging.ISecretMasker * obj * Microsoft.TeamFoundation.DistributedTask.Expressions.EvaluationOptions -> 'T
Public Function Evaluate(Of T) (trace As ITraceWriter, secretMasker As ISecretMasker, state As Object, Optional options As EvaluationOptions = null) As T
Type Parameters
- T
Parameters
- trace
- ITraceWriter
Optional trace writer
- secretMasker
- ISecretMasker
Optional secret masker
- state
- Object
State object for custom evaluation function nodes and custom named-value nodes
- options
- EvaluationOptions