Esempio n. 1
0
        internal virtual void BuildExpression(BoundPropertyEntry bpe, ControlBuilder controlBuilder,
                                              CodeExpression controlReference, CodeStatementCollection methodStatements, CodeStatementCollection statements, CodeLinePragma linePragma, ref bool hasTempObject)
        {
            CodeExpression codeExpression = GetCodeExpression(bpe,
                                                              bpe.ParsedExpressionData, new ExpressionBuilderContext(controlBuilder.VirtualPath));

            CodeDomUtility.CreatePropertySetStatements(methodStatements, statements,
                                                       controlReference, bpe.Name, bpe.Type,
                                                       codeExpression,
                                                       linePragma);
        }
Esempio n. 2
0
        private static void BuildPropertySetExpression(CodeExpression expression, string propertyName,
                                                       Type propertyType, ControlBuilder controlBuilder, CodeStatementCollection methodStatements, CodeStatementCollection statements, CodeLinePragma linePragma, bool isEncoded, ref bool hasTempObject)
        {
            if (isEncoded)
            {
                expression = new CodeMethodInvokeExpression(
                    new CodeMethodReferenceExpression(
                        new CodeTypeReferenceExpression(typeof(HttpUtility)),
                        "HtmlEncode"),
                    expression);
            }

            CodeDomUtility.CreatePropertySetStatements(methodStatements, statements,
                                                       new CodeVariableReferenceExpression("dataBindingExpressionBuilderTarget"), propertyName, propertyType,
                                                       expression,
                                                       linePragma);
        }
Esempio n. 3
0
 private static void BuildPropertySetExpression(CodeExpression expression, string propertyName, Type propertyType, ControlBuilder controlBuilder, CodeStatementCollection methodStatements, CodeStatementCollection statements, CodeLinePragma linePragma, ref bool hasTempObject)
 {
     CodeDomUtility.CreatePropertySetStatements(methodStatements, statements, new CodeVariableReferenceExpression("dataBindingExpressionBuilderTarget"), propertyName, propertyType, expression, linePragma);
 }