Ejemplo n.º 1
0
            public SystemTagResolver()
            {
                _regEx = new Regex(@"\$\{(?<TagName>[^\$\{\}]*)\}", RegexOptions.Compiled);

                _providers = new BuildMultiMap <string, BuildTagProvider>(
                    StringComparer.OrdinalIgnoreCase);
                _functions = new BuildDictionary <Func <string, string> >();

                EnvironmentTagProvider envProvider = new EnvironmentTagProvider();

                _providers.Add(envProvider.Category, envProvider);

                NoCategoryTagProvider noCatProvider = new NoCategoryTagProvider();

                _providers.Add(noCatProvider.Category, noCatProvider);

                // Add some functions...
                _functions.Add("String.ToLower", new Func <string, string>(ToLower));
                _functions.Add("String.ToUpper", new Func <string, string>(ToUpper));

                _guidValues = new Guid[10];
                for (int i = 0; i < 10; i++)
                {
                    _guidValues[i] = Guid.NewGuid();
                }
            }
Ejemplo n.º 2
0
 protected BuildTagResolver()
 {
     _userProviders = new BuildMultiMap <string, BuildTagProvider>(
         StringComparer.OrdinalIgnoreCase);
     _userFunctions = new BuildDictionary <Func <string, string> >();
 }