NLog.Layouts.SimpleLayout.Escape C# (CSharp) Méthode

Escape() public static méthode

Escapes the passed text so that it can be used literally in all places where layout is normally expected without being treated as layout.
Escaping is done by replacing all occurrences of '${' with '${literal:text=${}'
public static Escape ( string text ) : string
text string The text to be escaped.
Résultat string
        public static string Escape(string text)
        {
            return text.Replace("${", "${literal:text=${}");
        }