Exemplo n.º 1
0
        public void Translate(Span span, ITemplateBuilder templateBuilder)
        {
            if (span == null)
            {
                throw new ArgumentNullException("span");
            }

            if (templateBuilder == null)
            {
                throw new ArgumentNullException("templateBuilder");
            }

            templateBuilder.Write(span.Content);
        }
Exemplo n.º 2
0
        public void Translate(Span span, ITemplateBuilder templateBuilder)
        {
            if (span == null)
            {
                throw new ArgumentNullException("span");
            }

            if (templateBuilder == null)
            {
                throw new ArgumentNullException("templateBuilder");
            }

            if (!String.Equals(span.Content, "@"))
            {
                templateBuilder.Write(span.Content, true);
            }
        }
Exemplo n.º 3
0
        public void Translate(Span span, ITemplateBuilder templateBuilder)
        {
            if (span == null)
            {
                throw new ArgumentNullException("span");
            }

            if (templateBuilder == null)
            {
                throw new ArgumentNullException("templateBuilder");
            }

            var content = new StringBuilder(span.Content);

            content.Replace("\"", "\\\"");
            content.Replace("'", "\\'");
            content.Replace("\r", "\\r");
            content.Replace("\n", "\\n");

            templateBuilder.Write(content.ToString(), true);
        }