Exemplo n.º 1
0
        public static bool ShouldRunOn(this ProjectItem projectItem, RunOnBuild whenToRun, bool runIfDefault)
        {
            var setting = new AutoT4ProjectItemSettings(projectItem).RunOnBuild;

            return(setting == whenToRun ||
                   (setting == RunOnBuild.Default && runIfDefault));
        }
Exemplo n.º 2
0
        public static bool ShouldRunOn(this ProjectItem projectItem, BuildEvent whenToRun, HashSet <string> successfullProjects)
        {
            var item = new AutoT4ProjectItemSettings(projectItem);

            return(item.RunOnBuild == whenToRun &&
                   (string.IsNullOrWhiteSpace(item.DependsOnProject) ||
                    (successfullProjects != null &&
                     (successfullProjects.Contains(item.DependsOnProject) ||
                      successfullProjects.Any(x => x.Contains(item.DependsOnProject))))));
        }