/// <summary> /// Finds all content which will be copied into the output directory for this project. This includes content from any project references as "copy local" recursively (though MSBuild only traverses a single reference for actual binaries, in such cases) /// </summary> /// <param name="OutputDir">The output directory</param> /// <param name="BuildProducts">Receives the set of build products</param> /// <param name="ProjectFileToInfo">Map of project file to information, to resolve build products from referenced projects copied locally</param> private void FindCopiedContent(DirectoryReference OutputDir, HashSet <FileReference> OutputFiles, Dictionary <FileReference, CsProjectInfo> ProjectFileToInfo) { // Copy any referenced projects too. foreach (KeyValuePair <FileReference, bool> ProjectReference in ProjectReferences) { CsProjectInfo OtherProjectInfo; if (ProjectFileToInfo.TryGetValue(ProjectReference.Key, out OtherProjectInfo)) { OtherProjectInfo.FindCopiedContent(OutputDir, OutputFiles, ProjectFileToInfo); } } // Add the content which is copied to the output directory foreach (KeyValuePair <FileReference, bool> ContentReference in ContentReferences) { FileReference ContentFile = ContentReference.Key; if (ContentReference.Value) { OutputFiles.Add(FileReference.Combine(OutputDir, ContentFile.GetFileName())); } } }
/// <summary> /// Constructs a file pattern which matches a single file /// </summary> /// <param name="File">Location of the file</param> public FilePattern(FileReference File) { BaseDirectory = File.Directory; Tokens.Add(File.GetFileName()); }