ReadWorkspace Class

Summary

Reads an MSBuild solution or project file and returns all referenced source files as documents. This module will be executed once and input documents will be ignored if a search path is specified. Otherwise, if a delegate is specified the module will be executed once per input document and the resulting output documents will be aggregated. Note that this requires the MSBuild tools to be installed (included with Visual Studio). See https://github.com/dotnet/roslyn/issues/212 and https://roslyn.codeplex.com/workitem/218.
Assembly
Wyam.CodeAnalysis.dll
Namespace
Wyam.CodeAnalysis
Interfaces
Base Types
  • Object
Derived Types
graph BT Type-->Base0["Object"] Type-.->Interface0["IModule"] click Interface0 "/api/Wyam.Common.Modules/IModule" Type-.->Interface1["IAsNewDocuments"] click Interface1 "/api/Wyam.Common.Modules/IAsNewDocuments" Type["ReadWorkspace"] class Type type-node Derived0["ReadProject"]-->Type click Derived0 "/api/Wyam.CodeAnalysis/ReadProject" Derived1["ReadSolution"]-->Type click Derived1 "/api/Wyam.CodeAnalysis/ReadSolution"

Syntax

public abstract class ReadWorkspace : IModule, IAsNewDocuments

Constructors

Methods

Name Value Summary
Execute(IReadOnlyList<IDocument>, IExecutionContext) IEnumerable<IDocument>
This should not be called directly, instead call IExecutionContext.Execute() if you need to execute a module from within another module.
GetProjects(IExecutionContext, IFile) IEnumerable<Project>
Gets the projects in the workspace (solution or project).
WhereFile(Func<IFile, bool>) ReadWorkspace
Filters the source code file based on path.
WhereProject(Func<string, bool>) ReadWorkspace
Filters the project based on name.
WithExtensions(string[]) ReadWorkspace
Filters the source code files based on extension.
GitHub