public void InheritedRelatedLocalAttributesShouldTrigger() { var syntaxTree = SyntaxTreeTestFactory.FromTestFilePath("InheritedRelatedLocalAttribute.cs"); var compilation = CompilationHelper.CreateCompilation(new[] { syntaxTree }); var transformable = TransformLocator.IsTransformable(compilation, syntaxTree); transformable.ShouldBe(true); }
public void UnrelatedAssemblyAttributesShouldNotTrigger() { var syntaxTree = SyntaxTreeTestFactory.FromTestFilePath("UnrelatedAssemblyAttribute.cs"); var compilation = CompilationHelper.CreateCompilation(new[] { syntaxTree }); var transformable = TransformLocator.IsTransformable(compilation, syntaxTree); transformable.ShouldBe(false); }
/// <inheritdoc /> public override bool Execute() { try { var task = System.Threading.Tasks.Task.Run(() => TransformLocator.GetAffectedDocumentsAsync(BuildEngine.ProjectFileOfTaskNode)); var affectedDocuments = task.Result; TouchedFilePaths = affectedDocuments.Select(d => new TaskItem(d.FilePath)).ToArray(); return(true); } catch (Exception e) { Log.LogErrorFromException(e); return(false); } }