Пример #1
0
                public NoCategoryTagProvider()
                {
                    _variables = new BuildDictionary <string>();

                    _variables["User"]     = Environment.UserName;
                    _variables["UserName"] = Environment.UserName;

                    _variables["Machine"]        = Environment.MachineName;
                    _variables["MachineName"]    = Environment.MachineName;
                    _variables["UserDomain"]     = Environment.UserDomainName;
                    _variables["UserDomainName"] = Environment.UserDomainName;

                    if (IntPtr.Size == 4)
                    {
                        _variables["Platform"] = "Win32";
                    }
                    else if (IntPtr.Size == 8)
                    {
                        _variables["Platform"] = "Win64";
                    }
                    else
                    {
                        _variables["Platform"] = "Unknown";
                    }
                }
Пример #2
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();
                }
            }
Пример #3
0
                public EnvironmentTagProvider()
                {
                    _variables = new BuildDictionary <string>();

                    foreach (System.Collections.DictionaryEntry de in
                             Environment.GetEnvironmentVariables())
                    {
                        _variables[(string)de.Key] = (string)de.Value;
                    }
                }
Пример #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="system"></param>
        public BuildContext(BuildSystem system, BuildType type)
        {
            _buildType   = type;
            _buildState  = BuildState.None;
            _buildSystem = system;
            _properties  = new BuildProperties();
            _objects     = new BuildDictionary <object>();

            _targetPlatform      = String.Empty;
            _targetConfiguration = String.Empty;

            _tocContext   = new BuildTocContext();
            _buildOutputs = new List <BuildTuple <BuildFormatType, string> >();

            // Reset to the default properties
            this.Reset();
        }
Пример #5
0
 protected BuildTagResolver()
 {
     _userProviders = new BuildMultiMap <string, BuildTagProvider>(
         StringComparer.OrdinalIgnoreCase);
     _userFunctions = new BuildDictionary <Func <string, string> >();
 }
Пример #6
0
 private BuildGroupContext()
 {
     _properties = new BuildProperties();
     _objects    = new BuildDictionary<object>();
 }