Package
#n Wyam.CodeAnalysis
Usage
-
ReadSolution(DocumentConfig path)Reads the solution file at the specified path. This allows you to specify a different solution file depending on the input.
pathA delegate that returns a
FilePathwith the solution file path.
-
ReadSolution(FilePath path)Reads the solution file at the specified path.
pathThe solution file path.
Fluent Methods
Chain these methods together after the constructor to modify behavior.
-
WhereFile(Func<IFile, bool> predicate)Filters the source code file based on path.
predicateA predicate that should return
trueif the source code file should be included.
-
WhereProject(Func<string, bool> predicate)Filters the project based on name.
predicateA predicate that should return
trueif the project should be included.
-
WithExtensions(params string[] extensions)Filters the source code files based on extension.
extensionsThe extensions to include (if defined, any extensions not listed will be excluded).
Settings
The settings listed below apply globally and can be set from the command line or from a configuration file. They are used to configure options and otherwise control module behavior.
-
CodeAnalysisKeys.OutputBuildLog:System.BooleanSet this to
truein the global settings to generate a binary build log when analyzing projects or solutions. The log will be output alongside the project file.
Output Metadata
The metadata values listed below apply to individual documents and are created and set by the module as indicated in their descriptions.
-
CodeAnalysisKeys.AssemblyName:System.StringThe name of the assembly for each input document. Used to group input documents by assembly (if provided). If this is not provided for each input source document, then analysis that depends on both source files and assemblies may not correctly bind symbols across multiple inputs.
-
Keys.RelativeFileDir:Wyam.Common.IO.DirectoryPathThe path to the folder containing the file relative to the input folder.
-
Keys.RelativeFilePath:Wyam.Common.IO.FilePathThe path to the file relative to the input folder. This metadata value is used when generating links to the document.
-
Keys.RelativeFilePathBase:Wyam.Common.IO.FilePathThe path to the file relative to the input folder without extension.
-
Keys.SourceFileBase:Wyam.Common.IO.FilePathThe name of the original file without extension.
-
Keys.SourceFileDir:Wyam.Common.IO.DirectoryPathThe absolute path to the folder of the original file.
-
Keys.SourceFileExt:System.StringThe extension of the original file (including the ".").
-
Keys.SourceFileName:Wyam.Common.IO.FilePathThe file name of the original file with extension.
-
Keys.SourceFilePath:Wyam.Common.IO.FilePathThe absolute path to the original file.
-
Keys.SourceFilePathBase:Wyam.Common.IO.FilePathThe absolute path to the original file without the file extension.
-
Keys.SourceFileRoot:Wyam.Common.IO.DirectoryPathThe absolute root search path without any nested directories (I.e., the path that was searched, and possibly descended, for the given pattern).
