Skip to content

Commit

Permalink
Improved xml docs
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolayPianikov committed Aug 30, 2024
1 parent 042a52b commit 2727421
Show file tree
Hide file tree
Showing 33 changed files with 1,226 additions and 381 deletions.
25 changes: 6 additions & 19 deletions CSharpInteractive.HostApi/BuildMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,44 +26,31 @@ namespace HostApi;
[ExcludeFromCodeCoverage]
[Target]
public record BuildMessage(
// Event from the running command line.
Output Output,
// State of the build message. Defines the specifics of the build message, what information it contains.
BuildMessageState State,
// Associated service message.
IServiceMessage? ServiceMessage = default,
// Text of the build message.
string Text = "",
// Details of the build message error.
string ErrorDetails = "",
// Message code of the build message.
string Code = "",
// A file that is relevant to the build event.
string File = "",
// Message subcategory of the build message.
string Subcategory = "",
// A project that is relevant to the build event.
string ProjectFile = "",
// The task that initiated the build message.
string SenderName = "",
// Start position in a line of the file relevant to the build event.
int? ColumnNumber = default,
// End position in a line of the file relevant to the build event.
int? EndColumnNumber = default,
// First line of the file relating to the build event.
int? LineNumber = default,
// Last line of the file relating to the build event.
int? EndLineNumber = default,
// Importance of the build event.
DotNetMessageImportance? Importance = default)
{
private readonly Lazy<TestResult?> _testResult = new(() =>
ServiceMessage != null && TryGetTestState(ServiceMessage.Name, out var testState)
? CreateResult(CreateKey(ServiceMessage), ServiceMessage, testState)
: default(TestResult?));

/// <summary>
/// Contains the result of test execution when <see cref="State"/> is set to <see cref="BuildMessageState.TestResult"/>.
/// </summary>
public TestResult? TestResult =>
ServiceMessage != null && TryGetTestState(ServiceMessage.Name, out var testState)
? CreateResult(CreateKey(ServiceMessage), ServiceMessage, testState)
: default(TestResult?);
public TestResult? TestResult => _testResult.Value;

/// <inheritdoc />
public override string ToString() => Text;
Expand Down
6 changes: 0 additions & 6 deletions CSharpInteractive.HostApi/BuildStatistics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,11 @@ namespace HostApi;
[ExcludeFromCodeCoverage]
[Target]
public record BuildStatistics(
// Number of build errors.
int Errors = default,
// Number of build warnings.
int Warnings = default,
// Number of tests.
int Tests = default,
// Number of failed tests.
int FailedTests = default,
// Number of ignored tests.
int IgnoredTests = default,
// Number of successful tests.
int PassedTests = default)
{
/// <summary>
Expand Down
3 changes: 1 addition & 2 deletions CSharpInteractive.HostApi/CSharpInteractive.HostApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
<RootNamespace>HostApi</RootNamespace>
<ImmutypeAPI>True</ImmutypeAPI>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>CS1591</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Immutype" Version="1.0.15">
<PackageReference Include="Immutype" Version="1.0.16">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
10 changes: 5 additions & 5 deletions CSharpInteractive.HostApi/CommandLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ namespace HostApi;
/// </code>
/// </example>
/// </summary>
/// <param name="ExecutablePath">Specifies the application executable path.</param>
/// <param name="WorkingDirectory">Specifies the working directory for the application to be started.</param>
/// <param name="Args">Specifies the set of command line arguments to use when starting the application.</param>
/// <param name="Vars">Specifies the set of environment variables that apply to this process and its child processes.</param>
/// <param name="ShortName">Specifies a short name for this command line.</param>
/// <seealso cref="ICommandLineRunner.Run"/>
/// <seealso cref="ICommandLineRunner.RunAsync"/>
/// <seealso cref="IBuildRunner.Build"/>
/// <seealso cref="IBuildRunner.BuildAsync"/>
[Target]
[DebuggerTypeProxy(typeof(CommandLineDebugView))]
public partial record CommandLine(
// Specifies the application executable path.
string ExecutablePath,
// Specifies the working directory for the application to be started.
string WorkingDirectory,
// Specifies the set of command line arguments to use when starting the application.
IEnumerable<string> Args,
// Specifies the set of environment variables that apply to this process and its child processes.
IEnumerable<(string name, string value)> Vars,
// Specifies a short name for this command line.
string ShortName = "")
: IStartInfo
{
Expand Down
Loading

0 comments on commit 2727421

Please sign in to comment.