Exemplo n.º 1
0
        private IDictionary <string, string> GetGlobalProperties()
        {
            IDictionary <string, string> globalProperties;

            if (InheritGlobalProperties && _projectInstanceLazy.Value != null)
            {
                // Clone the properties since they will be modified
                globalProperties = new Dictionary <string, string>(_projectInstanceLazy.Value.GlobalProperties, StringComparer.OrdinalIgnoreCase);

                foreach (string propertyToRemove in GlobalPropertiesToRemove.SplitSemicolonDelimitedList().Where(i => globalProperties.ContainsKey(i)))
                {
                    globalProperties.Remove(propertyToRemove);
                }
            }
            else
            {
                globalProperties = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase);
            }

            foreach (KeyValuePair <string, string> globalProperty in GlobalProperties.SplitProperties())
            {
                globalProperties[globalProperty.Key] = globalProperty.Value;
            }

            return(globalProperties);
        }