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

            var pth = configurations.GetCommonValue(inputCategory, inputPropertyName);

            if (pth.Is())
            {
                pth = Event <CustomReplacement> .Raise(pth);

                FindReferencedProperties(pth);
                if (pth.IndexOf("$(") == -1)
                {
                    pth = outputFolder.RelativePathTo(pth.GetFullPath());
                }
                if (pth.Equals("$(OutDir)", StringComparison.InvariantCultureIgnoreCase))
                {
                    return;
                }

                if (masterProperty.Value != pth)
                {
                    pgpe.FindOrCreatePropertyByCondition(outputPropertyName, conditionToApply).Value = pth;
                }
            }
        }
コード例 #2
0
        public static void ProcessProperty(this IEnumerable <Configuration> configurations, Project project, string conditionToApply, ProjectPropertyGroupElement pgpe, string outputPropertyName, string inputCategory, string inputPropertyName)
        {
            // ProjectPropertyElement masterProperty = null;

            var value = configurations.GetCommonValue(inputCategory, inputPropertyName);

            if (value.Is())
            {
                value = Event <CustomReplacement> .Raise(value);

                FindReferencedProperties(value);
                if (pgpe.FindOrCreatePropertyByCondition(outputPropertyName, "").Value != value)
                {
                    pgpe.FindOrCreatePropertyByCondition(outputPropertyName, conditionToApply).Value = value;
                }
            }
        }