Ejemplo n.º 1
0
        public static void SetXmlAttributesTextVariables(XElement xe, Dictionary <string, string> variables)
        {
            TextVariables textVariables = new TextVariables(variables);

            foreach (XElement xe2 in xe.DescendantsAndSelf())
            {
                foreach (XAttribute xa in xe2.Attributes())
                {
                    xa.Value = textVariables.SetTextVariables(xa.Value);
                }
            }
        }
Ejemplo n.º 2
0
 public static void SetDictionaryTextVariables(Dictionary<string, string> variables)
 {
     bool again = true;
     TextVariables textVariables = new TextVariables(variables);
     while (again)
     {
         again = false;
         foreach (KeyValuePair<string, string> variable in variables)
         {
             string newValue = textVariables.SetTextVariables(variable.Value);
             if (textVariables.FindVariable)
             {
                 variables[variable.Key] = newValue;
                 again = true;
             }
         }
     }
 }
Ejemplo n.º 3
0
        public static void SetDictionaryTextVariables(Dictionary <string, string> variables)
        {
            bool          again         = true;
            TextVariables textVariables = new TextVariables(variables);

            while (again)
            {
                again = false;
                foreach (KeyValuePair <string, string> variable in variables)
                {
                    string newValue = textVariables.SetTextVariables(variable.Value);
                    if (textVariables.FindVariable)
                    {
                        variables[variable.Key] = newValue;
                        again = true;
                    }
                }
            }
        }
Ejemplo n.º 4
0
 public static void SetXmlAttributesTextVariables(XElement xe, Dictionary<string, string> variables)
 {
     TextVariables textVariables = new TextVariables(variables);
     foreach (XElement xe2 in xe.DescendantsAndSelf())
     {
         foreach (XAttribute xa in xe2.Attributes())
         {
             xa.Value = textVariables.SetTextVariables(xa.Value);
         }
     }
 }
Ejemplo n.º 5
0
 public static string SetTextVariables(string text, Dictionary<string, string> variables, bool removeUnknowVariable = false)
 {
     TextVariables textVariables = new TextVariables(variables);
     return textVariables.SetTextVariables(text, removeUnknowVariable);
 }
Ejemplo n.º 6
0
        public static string SetTextVariables(string text, Dictionary <string, string> variables, bool removeUnknowVariable = false)
        {
            TextVariables textVariables = new TextVariables(variables);

            return(textVariables.SetTextVariables(text, removeUnknowVariable));
        }
Ejemplo n.º 7
0
 public static string zSetTextVariables(this string text, Dictionary <string, string> variables, bool removeUnknowVariable = false)
 {
     return(TextVariables.SetTextVariables(text, variables, removeUnknowVariable));
 }