ExpressionBuilder.EvaluateExpression 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.
When overridden in a derived class, returns an object that represents an evaluated expression.
public:
virtual System::Object ^ EvaluateExpression(System::Object ^ target, System::Web::UI::BoundPropertyEntry ^ entry, System::Object ^ parsedData, System::Web::Compilation::ExpressionBuilderContext ^ context);
public virtual object EvaluateExpression (object target, System.Web.UI.BoundPropertyEntry entry, object parsedData, System.Web.Compilation.ExpressionBuilderContext context);
abstract member EvaluateExpression : obj * System.Web.UI.BoundPropertyEntry * obj * System.Web.Compilation.ExpressionBuilderContext -> obj
override this.EvaluateExpression : obj * System.Web.UI.BoundPropertyEntry * obj * System.Web.Compilation.ExpressionBuilderContext -> obj
Public Overridable Function EvaluateExpression (target As Object, entry As BoundPropertyEntry, parsedData As Object, context As ExpressionBuilderContext) As Object
Parameters
- target
- Object
The object containing the expression.
- entry
- BoundPropertyEntry
The object that represents information about the property bound to by the expression.
- parsedData
- Object
The object containing parsed data as returned by ParseExpression(String, Type, ExpressionBuilderContext).
- context
- ExpressionBuilderContext
Contextual information for the evaluation of the expression.
Returns
An object that represents the evaluated expression; otherwise, null
if the inheritor does not implement EvaluateExpression(Object, BoundPropertyEntry, Object, ExpressionBuilderContext).
Examples
The following code example demonstrates how to use the overridden EvaluateExpression method to return an evaluated expression.
public override object EvaluateExpression(object target, BoundPropertyEntry entry,
object parsedData, ExpressionBuilderContext context)
{
return GetEvalData(entry.Expression, target.GetType(), entry.Name);
}
Public Overrides Function EvaluateExpression(ByVal target As Object, _
ByVal entry As BoundPropertyEntry, ByVal parsedData As Object, _
ByVal context As ExpressionBuilderContext) As Object
Return GetEvalData(entry.Expression, target.GetType(), entry.Name)
End Function
Remarks
If you want your ExpressionBuilder object to be active on a page that supports the no-compile feature, you can override the EvaluateExpression method and the SupportsEvaluate property. The EvaluateExpression method should return the evaluation of the current expression.
Notes to Inheritors
If you override the EvaluateExpression(Object, BoundPropertyEntry, Object, ExpressionBuilderContext) method, you must also override the SupportsEvaluate property.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기