Class DependencyGraph
Uses MSBuild to load and evaluate all projects from a set of project and/or solution
paths on disk by recursively resolving any <ProjectReference> nodes. This
class is immutable.
Inheritance
System.Object
DependencyGraph
Assembly: Xamarin.MSBuild.Sdk.dll
Syntax
public class DependencyGraph : object
Properties
|
Improve this Doc
View Source
ProjectCollection
Declaration
public ProjectCollection ProjectCollection { get; }
Property Value
| Type |
Description |
| ProjectCollection |
|
|
Improve this Doc
View Source
Relationships
A list of dependency relationships within the graph.
Declaration
public IReadOnlyList<> Relationships { get; }
Property Value
| Type |
Description |
| IReadOnlyList<System.> |
|
|
Improve this Doc
View Source
TopologicallySortedProjects
Declaration
public IReadOnlyList<ProjectDependencyNode> TopologicallySortedProjects { get; }
Property Value
Methods
|
Improve this Doc
View Source
Create(IEnumerable<String>, IEnumerable<KeyValuePair<String, String>>, DependencyGraph.ProjectCollectionFactory)
Declaration
public static DependencyGraph Create(IEnumerable<string> solutionOrProjectPaths, IEnumerable<KeyValuePair<string, string>> globalProperties, DependencyGraph.ProjectCollectionFactory projectCollectionFactory = null)
Parameters
| Type |
Name |
Description |
| IEnumerable<System.String> |
solutionOrProjectPaths |
The set of solution or projects paths to process.
|
| IEnumerable<KeyValuePair<System.String, System.String>> |
globalProperties |
Any global properties that should influence evaluation. May be null.
|
| DependencyGraph.ProjectCollectionFactory |
projectCollectionFactory |
A function that takes a set of global properties and returns an MSBuild ProjectCollection.
This is particularly useful if any of the more advanced constructors for ProjectCollection
are needed (such as for locating custom tool chains or to provide custom logging).
|
Returns
|
Improve this Doc
View Source
Create(IEnumerable<String>, IEnumerable<>)
Declaration
public static DependencyGraph Create(IEnumerable<string> solutionOrProjectPaths, IEnumerable<> globalProperties = null)
Parameters
| Type |
Name |
Description |
| IEnumerable<System.String> |
solutionOrProjectPaths |
The set of solution or projects paths to process.
|
| IEnumerable<System.> |
globalProperties |
Any global properties that should influence evaluation.
|
Returns
|
Improve this Doc
View Source
Create(IEnumerable<String>, [])
Declaration
public static DependencyGraph Create(IEnumerable<string> solutionOrProjectPaths, params[] globalProperties)
Parameters
| Type |
Name |
Description |
| IEnumerable<System.String> |
solutionOrProjectPaths |
The set of solution or projects paths to process.
|
| System.[] |
globalProperties |
Any global properties that should influence evaluation.
|
Returns
|
Improve this Doc
View Source
Create(String, IEnumerable<>)
Declaration
public static DependencyGraph Create(string solutionOrProjectPath, IEnumerable<> globalProperties = null)
Parameters
| Type |
Name |
Description |
| System.String |
solutionOrProjectPath |
A solution or project path to process.
|
| IEnumerable<System.> |
globalProperties |
Any global properties that should influence evaluation.
|
Returns
|
Improve this Doc
View Source
Create(String, [])
Declaration
public static DependencyGraph Create(string solutionOrProjectPath, params[] globalProperties)
Parameters
| Type |
Name |
Description |
| System.String |
solutionOrProjectPath |
A solution or project path to process.
|
| System.[] |
globalProperties |
Any global properties that should influence evaluation.
|
Returns
|
Improve this Doc
View Source
GenerateVisualization(DependencyGraphVisualizationKind)
Declaration
public string GenerateVisualization(DependencyGraphVisualizationKind visualizationKind)
Parameters
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
LoadGraph(CancellationToken)
Loads and fully resolves all projects in the full graph. This method
may take some time (block) for large projects.
Declaration
public DependencyGraph LoadGraph(CancellationToken cancellationToken = null)
Parameters
| Type |
Name |
Description |
| CancellationToken |
cancellationToken |
|
Returns
|
Improve this Doc
View Source
LoadGraphAsync(CancellationToken)
Loads and fully resolves all projects in the full graph. This method
may take some time for large projects and will be performed on the
thread pool.
Declaration
public Task<DependencyGraph> LoadGraphAsync(CancellationToken cancellationToken = null)
Parameters
| Type |
Name |
Description |
| CancellationToken |
cancellationToken |
|
Returns