Пример #1
0
        public IClientModel Evaluate(IClientContext context, IClientModel model, string name, IDictionary<string, string> parameters)
        {
            var key = parameters.Keys.First().Trim('"');
            var builder = new StringBuilder();
            using (var writer = new StringWriter(builder))
            {
                _handler.RenderLabel(key, new RenderingContext(writer));
            }

            context.WriteLiteral(builder.ToString());
            return model;
        }
Пример #2
0
        public IClientModel Evaluate(IClientContext context, IClientModel model, string name, IDictionary <string, string> parameters)
        {
            var key     = parameters.Keys.First().Trim('"');
            var builder = new StringBuilder();

            using (var writer = new StringWriter(builder))
            {
                _handler.RenderLabel(key, new RenderingContext(writer));
            }

            context.WriteLiteral(builder.ToString());
            return(model);
        }
Пример #3
0
 public void WriteLiteral(string content)
 {
     _adaptee.WriteLiteral(content);
 }
Пример #4
0
 public IClientModel Evaluate(IClientContext context, IClientModel model, string name, IDictionary<string, string> parameters)
 {
     context.WriteLiteral(context.TemplateId);
     return model;
 }
 public IClientModel Evaluate(IClientContext context, IClientModel model, string name, IDictionary <string, string> parameters)
 {
     context.WriteLiteral(context.TemplateId);
     return(model);
 }
 protected override IClientModel VisitWriteLiteralNode(WriteLiteralNode writeLiteralNode)
 {
     _clientContext.WriteLiteral(writeLiteralNode.LiteralContent);
     return(base.VisitWriteLiteralNode(writeLiteralNode));
 }