Skip to content

Commit 2727421

Browse files
Improved xml docs
1 parent 042a52b commit 2727421

33 files changed

+1226
-381
lines changed

CSharpInteractive.HostApi/BuildMessage.cs

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,44 +26,31 @@ namespace HostApi;
2626
[ExcludeFromCodeCoverage]
2727
[Target]
2828
public record BuildMessage(
29-
// Event from the running command line.
3029
Output Output,
31-
// State of the build message. Defines the specifics of the build message, what information it contains.
3230
BuildMessageState State,
33-
// Associated service message.
3431
IServiceMessage? ServiceMessage = default,
35-
// Text of the build message.
3632
string Text = "",
37-
// Details of the build message error.
3833
string ErrorDetails = "",
39-
// Message code of the build message.
4034
string Code = "",
41-
// A file that is relevant to the build event.
4235
string File = "",
43-
// Message subcategory of the build message.
4436
string Subcategory = "",
45-
// A project that is relevant to the build event.
4637
string ProjectFile = "",
47-
// The task that initiated the build message.
4838
string SenderName = "",
49-
// Start position in a line of the file relevant to the build event.
5039
int? ColumnNumber = default,
51-
// End position in a line of the file relevant to the build event.
5240
int? EndColumnNumber = default,
53-
// First line of the file relating to the build event.
5441
int? LineNumber = default,
55-
// Last line of the file relating to the build event.
5642
int? EndLineNumber = default,
57-
// Importance of the build event.
5843
DotNetMessageImportance? Importance = default)
5944
{
45+
private readonly Lazy<TestResult?> _testResult = new(() =>
46+
ServiceMessage != null && TryGetTestState(ServiceMessage.Name, out var testState)
47+
? CreateResult(CreateKey(ServiceMessage), ServiceMessage, testState)
48+
: default(TestResult?));
49+
6050
/// <summary>
6151
/// Contains the result of test execution when <see cref="State"/> is set to <see cref="BuildMessageState.TestResult"/>.
6252
/// </summary>
63-
public TestResult? TestResult =>
64-
ServiceMessage != null && TryGetTestState(ServiceMessage.Name, out var testState)
65-
? CreateResult(CreateKey(ServiceMessage), ServiceMessage, testState)
66-
: default(TestResult?);
53+
public TestResult? TestResult => _testResult.Value;
6754

6855
/// <inheritdoc />
6956
public override string ToString() => Text;

CSharpInteractive.HostApi/BuildStatistics.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,11 @@ namespace HostApi;
1414
[ExcludeFromCodeCoverage]
1515
[Target]
1616
public record BuildStatistics(
17-
// Number of build errors.
1817
int Errors = default,
19-
// Number of build warnings.
2018
int Warnings = default,
21-
// Number of tests.
2219
int Tests = default,
23-
// Number of failed tests.
2420
int FailedTests = default,
25-
// Number of ignored tests.
2621
int IgnoredTests = default,
27-
// Number of successful tests.
2822
int PassedTests = default)
2923
{
3024
/// <summary>

CSharpInteractive.HostApi/CSharpInteractive.HostApi.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@
88
<RootNamespace>HostApi</RootNamespace>
99
<ImmutypeAPI>True</ImmutypeAPI>
1010
<GenerateDocumentationFile>true</GenerateDocumentationFile>
11-
<NoWarn>CS1591</NoWarn>
1211
</PropertyGroup>
1312

1413
<ItemGroup>
15-
<PackageReference Include="Immutype" Version="1.0.15">
14+
<PackageReference Include="Immutype" Version="1.0.16">
1615
<PrivateAssets>all</PrivateAssets>
1716
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1817
</PackageReference>

CSharpInteractive.HostApi/CommandLine.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@ namespace HostApi;
1515
/// </code>
1616
/// </example>
1717
/// </summary>
18+
/// <param name="ExecutablePath">Specifies the application executable path.</param>
19+
/// <param name="WorkingDirectory">Specifies the working directory for the application to be started.</param>
20+
/// <param name="Args">Specifies the set of command line arguments to use when starting the application.</param>
21+
/// <param name="Vars">Specifies the set of environment variables that apply to this process and its child processes.</param>
22+
/// <param name="ShortName">Specifies a short name for this command line.</param>
1823
/// <seealso cref="ICommandLineRunner.Run"/>
1924
/// <seealso cref="ICommandLineRunner.RunAsync"/>
2025
/// <seealso cref="IBuildRunner.Build"/>
2126
/// <seealso cref="IBuildRunner.BuildAsync"/>
2227
[Target]
2328
[DebuggerTypeProxy(typeof(CommandLineDebugView))]
2429
public partial record CommandLine(
25-
// Specifies the application executable path.
2630
string ExecutablePath,
27-
// Specifies the working directory for the application to be started.
2831
string WorkingDirectory,
29-
// Specifies the set of command line arguments to use when starting the application.
3032
IEnumerable<string> Args,
31-
// Specifies the set of environment variables that apply to this process and its child processes.
3233
IEnumerable<(string name, string value)> Vars,
33-
// Specifies a short name for this command line.
3434
string ShortName = "")
3535
: IStartInfo
3636
{

0 commit comments

Comments
 (0)