Beispiel #1
0
        protected override Expression VisitStaticExpression(StaticExpression stex)
        {
            var encodedTextWriter = Expression.Property(CompilationContext.BindingContext, "TextWriter");

#if netstandard
            var writeMethod = typeof(EncodedTextWriter).GetRuntimeMethod("Write", new [] { typeof(string), typeof(bool) });
#else
            var writeMethod = typeof(EncodedTextWriter).GetMethod("Write", new [] { typeof(string), typeof(bool) });
#endif

            return(Expression.Call(encodedTextWriter, writeMethod, Expression.Constant(stex.Value), Expression.Constant(false)));
        }
Beispiel #2
0
 protected virtual Expression VisitStaticExpression(StaticExpression stex)
 {
     return(stex);
 }
Beispiel #3
0
 protected virtual System.Linq.Expressions.Expression VisitStaticExpression(StaticExpression stex)
 {
     return(stex);
 }