Пример #1
0
 public bool IsLiteralEntry(out IRequestedLiteralEntryModel literalEntryModel)
 {
     if (Literal)
     {
         literalEntryModel = this;
         return(true);
     }
     literalEntryModel = null;
     return(false);
 }
Пример #2
0
        private string Serialize(IRequestedLiteralEntryModel literalEntry, string dependencyOf = null)
        {
            var finalOutput = "";

            if (_settings.PrintComments)
            {
                finalOutput += string.Format(
                    "\n<!-- <literal-entry{0}> -->\n",
                    SerializeEntryAttributes(literalEntry, dependencyOf)
                    );
            }
            finalOutput += literalEntry.Content + "\n";
            if (_settings.PrintComments)
            {
                finalOutput += $"<!-- </literal-entry> -->";
            }
            return(finalOutput);
        }