private static string SubstituteVariables(IEnumerable <string> defines, string content) { VariableSubstitutions substitutions = new VariableSubstitutions(defines); string[] lines = content.Replace("\r", String.Empty).Split(new char[] { '\n' }, StringSplitOptions.None); for (int i = 0; i < lines.Length; ++i) { lines[i] = substitutions.Substitute(String.Empty, i + 1, lines[i]); } return(String.Join(Environment.NewLine, lines)); }
private static string SubstituteVariables(IEnumerable<string> defines, string content) { VariableSubstitutions substitutions = new VariableSubstitutions(defines); string[] lines = content.Replace("\r", String.Empty).Split(new char[] { '\n' }, StringSplitOptions.None); for (int i = 0; i < lines.Length; ++i) { lines[i] = substitutions.Substitute(String.Empty, i + 1, lines[i]); } return String.Join(Environment.NewLine, lines); }