public static void RemoveLiteralAndPlaceholders(this Snippet snippet, string identifier) { Literal literal = snippet.Literals.FirstOrDefault(f => f.Identifier == identifier); if (literal != null) { snippet.Literals.Remove(literal); snippet.ReplacePlaceholders(literal.Identifier, ""); } }
public static void RemoveLiteralAndReplacePlaceholders(this Snippet snippet, string identifier, string replacement) { snippet.RemoveLiteral(identifier); snippet.ReplacePlaceholders(identifier, replacement); }