Skip to content

Commit c927ac0

Browse files
committed
docs: Updated XML Summaries
1 parent 10e9dca commit c927ac0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2194
-245
lines changed

src/NetEvolve.ProjectBuilders.TUnit/TemporaryDirectory.cs

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,55 @@
99

1010
/// <summary>
1111
/// Represents a temporary directory that is automatically created and cleaned up for TUnit tests.
12-
/// This class integrates with TUnit's <see cref="IAsyncInitializer"/> to automatically initialize
13-
/// the temporary directory before test execution and implements <see cref="IAsyncDisposable"/>
14-
/// to ensure proper cleanup after test completion.
1512
/// </summary>
1613
/// <remarks>
1714
/// <para>
18-
/// This class serves as a TUnit-specific wrapper around <see cref="TemporaryDirectoryBuilder"/>
19-
/// to provide seamless integration with TUnit's test lifecycle management.
15+
/// This class serves as a TUnit-specific adapter around <see cref="TemporaryDirectoryBuilder"/>
16+
/// to provide seamless integration with TUnit's test lifecycle management. It implements both
17+
/// <see cref="IAsyncInitializer"/> for automatic initialization and <see cref="IAsyncDisposable"/>
18+
/// for automatic cleanup.
2019
/// </para>
2120
/// <para>
22-
/// The temporary directory is created in a unique location to avoid conflicts between parallel
23-
/// test executions and is automatically deleted when disposed, ensuring clean test isolation.
21+
/// The temporary directory is automatically:
22+
/// <list type="bullet">
23+
/// <item><description>Created before test execution via <see cref="IAsyncInitializer.InitializeAsync"/></description></item>
24+
/// <item><description>Cleaned up and deleted after test completion via <see cref="DisposeAsync"/></description></item>
25+
/// <item><description>Placed in a unique location to avoid conflicts between parallel test executions</description></item>
26+
/// </list>
2427
/// </para>
2528
/// <para>
26-
/// Usage in TUnit tests:
29+
/// Provides directory and file management methods through <see cref="ITemporaryDirectoryBuilder"/>,
30+
/// including directory creation, file creation, and path resolution.
31+
/// </para>
32+
/// <para>
33+
/// Usage example in TUnit tests:
2734
/// <code>
2835
/// [ClassDataSource&lt;TemporaryDirectory&gt;]
2936
/// public class MyTests(TemporaryDirectory directory)
3037
/// {
3138
/// [Test]
32-
/// public async Task MyTest()
39+
/// public async Task TestCreateFile()
3340
/// {
34-
/// var filePath = directory.GetFilePath("test.txt");
3541
/// using var stream = directory.CreateFile("test.txt");
36-
/// // ... test code ...
42+
/// stream.WriteAsync(new byte[] { 1, 2, 3 }, 0, 3);
43+
///
44+
/// string fullPath = directory.GetFilePath("test.txt");
45+
/// Assert.That(File.Exists(fullPath));
46+
/// }
47+
///
48+
/// [Test]
49+
/// public void TestCreateDirectory()
50+
/// {
51+
/// var subDir = directory.CreateDirectory("subdirectory");
52+
/// Assert.That(Directory.Exists(Path.Combine(directory.FullPath, "subdirectory")));
3753
/// }
3854
/// }
3955
/// </code>
4056
/// </para>
4157
/// </remarks>
58+
/// <seealso cref="IAsyncInitializer"/>
59+
/// <seealso cref="IAsyncDisposable"/>
60+
/// <seealso cref="TemporaryDirectoryBuilder"/>
4261
public sealed class TemporaryDirectory : ITemporaryDirectoryBuilder, IAsyncInitializer
4362
{
4463
private readonly TemporaryDirectoryBuilder _directory = new();

src/NetEvolve.ProjectBuilders.XUnit/TemporaryDirectoryFixture.cs

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,30 @@
99

1010
/// <summary>
1111
/// Represents a temporary directory fixture that is automatically created and cleaned up for xUnit tests.
12-
/// This class integrates with xUnit's <see cref="IAsyncLifetime"/> to automatically initialize
13-
/// the temporary directory before test execution and implements <see cref="IAsyncDisposable"/>
14-
/// to ensure proper cleanup after test completion.
1512
/// </summary>
1613
/// <remarks>
1714
/// <para>
18-
/// This class serves as an xUnit-specific wrapper around <see cref="TemporaryDirectoryBuilder"/>
15+
/// This class serves as an xUnit-specific adapter around <see cref="TemporaryDirectoryBuilder"/>
1916
/// to provide seamless integration with xUnit's test lifecycle management through the fixture pattern.
17+
/// It implements <see cref="IAsyncLifetime"/> for automatic initialization and cleanup.
2018
/// </para>
2119
/// <para>
22-
/// The temporary directory is created in a unique location to avoid conflicts between parallel
23-
/// test executions and is automatically deleted when disposed, ensuring clean test isolation.
20+
/// The temporary directory is automatically:
21+
/// <list type="bullet">
22+
/// <item><description>Created before test execution via <see cref="IAsyncLifetime.InitializeAsync"/></description></item>
23+
/// <item><description>Cleaned up and deleted after test completion via <see cref="IAsyncLifetime.DisposeAsync"/></description></item>
24+
/// <item><description>Placed in a unique location to avoid conflicts between parallel test executions</description></item>
25+
/// </list>
2426
/// </para>
2527
/// <para>
26-
/// Usage in xUnit tests with class fixtures:
28+
/// Provides directory and file management methods through <see cref="ITemporaryDirectoryBuilder"/>,
29+
/// including directory creation, file creation, and path resolution.
30+
/// </para>
31+
/// <para>
32+
/// Works with xUnit class fixtures and collection fixtures for flexible test lifecycle management.
33+
/// </para>
34+
/// <para>
35+
/// Class fixture usage example:
2736
/// <code>
2837
/// public class MyTests : IClassFixture&lt;TemporaryDirectoryFixture&gt;
2938
/// {
@@ -35,27 +44,26 @@
3544
/// }
3645
///
3746
/// [Fact]
38-
/// public void MyTest()
47+
/// public void TestCreateFile()
3948
/// {
40-
/// // Directory is automatically initialized via IAsyncLifetime
41-
/// var filePath = _directory.GetFilePath("test.txt");
49+
/// // Directory is automatically initialized before this test runs
4250
/// using var stream = _directory.CreateFile("test.txt");
43-
/// // ... test code ...
44-
///
45-
/// // Directory is automatically cleaned up after all tests in the class complete
51+
/// var fullPath = _directory.GetFilePath("test.txt");
52+
/// Assert.True(File.Exists(fullPath));
53+
/// // Directory is automatically cleaned up after this test completes
4654
/// }
4755
/// }
4856
/// </code>
4957
/// </para>
5058
/// <para>
51-
/// Usage in xUnit tests with collection fixtures:
59+
/// Collection fixture usage example:
5260
/// <code>
53-
/// [CollectionDefinition("Temporary Directory")]
61+
/// [CollectionDefinition("Temporary Directory Collection")]
5462
/// public class TemporaryDirectoryCollection : ICollectionFixture&lt;TemporaryDirectoryFixture&gt;
5563
/// {
5664
/// }
5765
///
58-
/// [Collection("Temporary Directory")]
66+
/// [Collection("Temporary Directory Collection")]
5967
/// public class MyTests
6068
/// {
6169
/// private readonly TemporaryDirectoryFixture _directory;
@@ -66,18 +74,26 @@
6674
/// }
6775
///
6876
/// [Fact]
69-
/// public void MyTest()
77+
/// public void TestOne()
7078
/// {
7179
/// // Directory is shared across all tests in the collection
72-
/// var filePath = _directory.GetFilePath("test.txt");
73-
/// // ... test code ...
80+
/// using var stream = _directory.CreateFile("test1.txt");
81+
/// }
82+
///
83+
/// [Fact]
84+
/// public void TestTwo()
85+
/// {
86+
/// // Same directory instance from TestOne
87+
/// using var stream = _directory.CreateFile("test2.txt");
7488
/// }
7589
/// }
7690
/// </code>
7791
/// </para>
7892
/// </remarks>
7993
/// <seealso cref="IClassFixture{TFixture}"/>
8094
/// <seealso cref="ICollectionFixture{TFixture}"/>
95+
/// <seealso cref="IAsyncLifetime"/>
96+
/// <seealso cref="TemporaryDirectoryBuilder"/>
8197
public sealed class TemporaryDirectoryFixture : ITemporaryDirectoryBuilder, IAsyncLifetime
8298
{
8399
private readonly TemporaryDirectoryBuilder _directory = new();
Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
namespace NetEvolve.ProjectBuilders.Abstractions;
22

33
/// <summary>
4-
/// Represents an unspecific file builder, which can be configured to build a file.
4+
/// Represents a generic file builder interface for creating project files.
55
/// </summary>
6+
/// <remarks>
7+
/// <para>
8+
/// This interface serves as a base abstraction for all file builders in the project.
9+
/// It extends <see cref="IObjectBuilder"/> to provide async creation and disposal capabilities
10+
/// for file-based objects used in the project building process.
11+
/// </para>
12+
/// <para>
13+
/// Implementations of this interface are responsible for creating specific types of files,
14+
/// such as project files (.csproj, .vbproj) and configuration files (global.json).
15+
/// </para>
16+
/// </remarks>
17+
/// <seealso cref="IObjectBuilder"/>
18+
/// <seealso cref="IProjectBuilder"/>
19+
/// <seealso cref="IGlobalJsonBuilder"/>
620
public interface IFileBuilder : IObjectBuilder { }

src/NetEvolve.ProjectBuilders/Abstractions/IGlobalJsonBuilder.cs

Lines changed: 56 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,76 @@
33
using NetEvolve.ProjectBuilders.Models;
44

55
/// <summary>
6-
/// Represents a global.json file builder.
6+
/// Represents a builder for creating and configuring global.json SDK configuration files.
77
/// </summary>
8+
/// <remarks>
9+
/// <para>
10+
/// This interface provides a fluent API for building global.json files that configure
11+
/// the .NET SDK version and roll-forward behavior for a project or directory tree.
12+
/// </para>
13+
/// <para>
14+
/// The global.json file is used to:
15+
/// <list type="bullet">
16+
/// <item><description>Pin a specific .NET SDK version for the project</description></item>
17+
/// <item><description>Configure SDK roll-forward policies</description></item>
18+
/// <item><description>Allow or disallow prerelease SDK versions</description></item>
19+
/// </list>
20+
/// </para>
21+
/// <para>
22+
/// See <see href="https://learn.microsoft.com/en-us/dotnet/core/tools/global-json"/> for more information.
23+
/// </para>
24+
/// </remarks>
25+
/// <seealso cref="IFileBuilder"/>
826
public interface IGlobalJsonBuilder : IFileBuilder
927
{
1028
/// <summary>
11-
/// If set to <see langword="true" />, the global.json file will allow prerelease versions.
29+
/// Configures whether prerelease SDK versions are allowed for this project.
1230
/// </summary>
31+
/// <remarks>
32+
/// When set to <see langword="true"/>, the .NET SDK resolution will consider prerelease
33+
/// versions that match the specified major, minor, and patch versions. The default is
34+
/// <see langword="false"/>, which restricts to released SDK versions only.
35+
/// </remarks>
1336
/// <param name="allowPrerelease">
14-
/// If set to <see langword="true" />, the global.json file will allow prerelease versions.
37+
/// <see langword="true"/> to allow prerelease SDK versions; <see langword="false"/> otherwise.
1538
/// </param>
16-
/// <returns>The current instance of the <see cref="IGlobalJsonBuilder"/>.</returns>
39+
/// <returns>The current instance of the <see cref="IGlobalJsonBuilder"/> for fluent chaining.</returns>
1740
IGlobalJsonBuilder SetAllowPrerelease(bool allowPrerelease);
1841

1942
/// <summary>
20-
/// Sets the roll forward option for the global.json file.
43+
/// Sets the roll-forward behavior for SDK version resolution.
2144
/// </summary>
45+
/// <remarks>
46+
/// The roll-forward policy determines how the SDK resolves versions when the exact
47+
/// specified version is not available. Different policies allow rolling forward to
48+
/// different release levels (patch, feature, minor, or major).
49+
/// </remarks>
2250
/// <param name="rollForward">
23-
/// The roll forward option for the global.json file.
51+
/// The roll-forward policy to apply. For example, <see cref="RollForward.LatestMinor"/>
52+
/// allows rolling forward to the latest patch and feature level within the same major.minor version.
2453
/// </param>
25-
/// <returns>The current instance of the <see cref="IGlobalJsonBuilder"/>.</returns>
54+
/// <returns>The current instance of the <see cref="IGlobalJsonBuilder"/> for fluent chaining.</returns>
55+
/// <seealso cref="RollForward"/>
2656
IGlobalJsonBuilder SetRollForward(RollForward rollForward);
2757

58+
/// <summary>
59+
/// Sets the .NET SDK version to use for this project or directory tree.
60+
/// </summary>
61+
/// <remarks>
62+
/// The version string should be in semantic versioning format, for example "8.0.204" or "10.0.100".
63+
/// This version becomes the preferred SDK version for all dotnet commands executed in this
64+
/// directory and its subdirectories (unless overridden by nested global.json files).
65+
/// </remarks>
66+
/// <param name="runtimeVersion">
67+
/// The SDK version as a string (e.g., "8.0.204", "10.0.100").
68+
/// Must not be <see langword="null"/>, empty, or whitespace.
69+
/// </param>
70+
/// <returns>The current instance of the <see cref="IGlobalJsonBuilder"/> for fluent chaining.</returns>
71+
/// <exception cref="ArgumentNullException">
72+
/// Thrown when <paramref name="runtimeVersion"/> is <see langword="null"/>.
73+
/// </exception>
74+
/// <exception cref="ArgumentException">
75+
/// Thrown when <paramref name="runtimeVersion"/> is empty or whitespace.
76+
/// </exception>
2877
IGlobalJsonBuilder SetRuntimeSdk(string runtimeVersion);
2978
}

src/NetEvolve.ProjectBuilders/Abstractions/IItemGroup.cs

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,39 @@
33
using System.Collections.ObjectModel;
44

55
/// <summary>
6-
/// Represents a <b>&lt;ItemGroup&gt;</b> in a project file.
6+
/// Represents an ItemGroup element in an MSBuild project file.
77
/// </summary>
8+
/// <remarks>
9+
/// <para>
10+
/// The ItemGroup is one of the fundamental building blocks in MSBuild project files. It contains
11+
/// items that represent inputs to the build process, such as package references, project references,
12+
/// framework references, and other file-based items.
13+
/// </para>
14+
/// <para>
15+
/// Each item in the group can have various attributes and properties that influence how the
16+
/// build system processes it. Items can be conditional using the Condition attribute.
17+
/// </para>
18+
/// <para>
19+
/// See <see href="https://learn.microsoft.com/en-us/visualstudio/msbuild/itemgroup-element-msbuild"/> for more information.
20+
/// </para>
21+
/// </remarks>
822
public interface IItemGroup
923
{
1024
/// <summary>
11-
/// The items of the item group.
25+
/// Gets a read-only collection of items in this item group.
1226
/// </summary>
27+
/// <value>A read-only collection of <see cref="IItemGroupItem"/> objects.</value>
1328
ReadOnlyCollection<IItemGroupItem> Items { get; }
1429

1530
/// <summary>
16-
/// Adds a new item to the item group.
31+
/// Adds a new item of the specified type to this item group.
1732
/// </summary>
1833
/// <typeparam name="T">
19-
/// The type of the item to add.
34+
/// The type of the item to add. Must be a non-abstract class implementing <see cref="IItemGroupItem"/>
35+
/// with a public parameterless constructor.
2036
/// </typeparam>
2137
/// <returns>
22-
/// The added item.
38+
/// The newly created and added item instance.
2339
/// </returns>
2440
T Add<T>()
2541
where T : class, IItemGroupItem, new();

0 commit comments

Comments
 (0)