本文整理汇总了VB.NET中System.Web.Compilation.ExpressionBuilder.GetCodeExpression方法的典型用法代码示例。如果您正苦于以下问题:VB.NET ExpressionBuilder.GetCodeExpression方法的具体用法?VB.NET ExpressionBuilder.GetCodeExpression怎么用?VB.NET ExpressionBuilder.GetCodeExpression使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.Compilation.ExpressionBuilder
的用法示例。
在下文中一共展示了ExpressionBuilder.GetCodeExpression方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: GetCodeExpression
Public Overrides Function GetCodeExpression(ByVal entry _
As BoundPropertyEntry, ByVal parsedData As Object, ByVal context _
As ExpressionBuilderContext) As CodeExpression
Dim type1 As Type = entry.DeclaringType
Dim descriptor1 As PropertyDescriptor = _
TypeDescriptor.GetProperties(type1)(entry.PropertyInfo.Name)
Dim expressionArray1(2) As CodeExpression
expressionArray1(0) = New CodePrimitiveExpression(entry.Expression.Trim())
expressionArray1(1) = New CodeTypeOfExpression(type1)
expressionArray1(2) = New CodePrimitiveExpression(entry.Name)
Return New CodeCastExpression(descriptor1.PropertyType, _
New CodeMethodInvokeExpression(New CodeTypeReferenceExpression _
(MyBase.GetType()), "GetEvalData", expressionArray1))
End Function