コード例 #1
0
        public static void ProcessPropertyList(this IEnumerable <Configuration> configurations, Project project, string conditionToApply, ProjectPropertyGroupElement pgpe, string outputPropertyName, string inputCategory, string inputPropertyName)
        {
            UniqueStringPropertyList propertyList = null;
            var masterProperty = pgpe.FindOrCreatePropertyListByCondition(outputPropertyName, "");

            var commonValues = configurations.GetCommonValues(inputCategory, inputPropertyName).ToArray();

            if (commonValues.Length > 0)
            {
                foreach (var cv in commonValues)
                {
                    var i = cv;
                    i = Event <CustomReplacement> .Raise(i);

                    FindReferencedProperties(i);
                    if (!masterProperty.Contains(i))
                    {
                        if (propertyList == null)
                        {
                            propertyList = (pgpe.FindOrCreatePropertyListByCondition(outputPropertyName, conditionToApply));
                            if (conditionToApply.Is())
                            {
                                propertyList.Add("$({0})".format(outputPropertyName));
                            }
                        }
                        propertyList.Add(i);
                    }
                }
            }
        }