示例#1
0
        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));
        }
示例#2
0
        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);
        }