Table of Contents

Class Solution

Namespace
DotNetDo
Assembly
DotNetDo.Core.dll

An immutable snapshot of a solution file and its declared projects.

public sealed class Solution

Properties

Directory

The containing directory.

public AbsolutePath Directory { get; }

Property Value

AbsolutePath

Path

The absolute filesystem path.

public AbsolutePath Path { get; }

Property Value

AbsolutePath

Projects

Projects declared by the loaded solution.

public IReadOnlyList<ProjectInfo> Projects { get; }

Property Value

IReadOnlyList<ProjectInfo>

this[string]

Returns the already-loaded workspace solution.

public ProjectInfo this[string solutionPath] { get; }

Property Value

ProjectInfo

Methods

Load(AbsolutePath, CancellationToken)

Loads an absolute solution file asynchronously without evaluating its projects.

public static Task<Solution> Load(AbsolutePath path, CancellationToken cancellationToken = default)

Parameters

path AbsolutePath
cancellationToken CancellationToken

Returns

Task<Solution>

Load(string, CancellationToken)

Loads an absolute or working-directory-relative solution file asynchronously.

public static Task<Solution> Load(string path, CancellationToken cancellationToken = default)

Parameters

path string
cancellationToken CancellationToken

Returns

Task<Solution>

ToString()

Returns the absolute solution file path.

public override string ToString()

Returns

string

Operators

implicit operator string(Solution)

Returns the absolute solution file path.

public static implicit operator string(Solution solution)

Parameters

solution Solution

Returns

string