Comment() public static method

public static Comment ( string value ) : HandlebarsDotNet.Compiler.CommentExpression
value string
return HandlebarsDotNet.Compiler.CommentExpression
示例#1
0
        private static object Convert(object item)
        {
            if (item is CommentToken commentToken)
            {
                return(HandlebarsExpression.Comment(commentToken.Value));
            }

            if (item is LayoutToken)
            {
                return(HandlebarsExpression.Comment(null));
            }

            return(item);
        }
        private static object Convert(object item)
        {
            var commentToken = item as CommentToken;

            if (commentToken != null)
            {
                return(HandlebarsExpression.Comment(commentToken.Value));
            }
            else if (item is LayoutToken)
            {
                return(HandlebarsExpression.Comment(null));
            }
            else
            {
                return(item);
            }
        }