Skip to content

Commit 4290dd7

Browse files
Implement dotnet test help option (#41142)
Co-authored-by: Amaury Levé <[email protected]>
1 parent 62a0d68 commit 4290dd7

Some content is hidden

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

43 files changed

+1947
-9
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
namespace Microsoft.DotNet.Cli
5+
{
6+
internal static class CliConstants
7+
{
8+
public const string HelpOptionKey = "--help";
9+
public const string MSBuildOptionKey = "--msbuild-params";
10+
public const string NoBuildOptionKey = "--no-build";
11+
public const string ServerOptionKey = "--server";
12+
public const string DotNetTestPipeOptionKey = "--dotnet-test-pipe";
13+
14+
public const string ServerOptionValue = "dotnettestcli";
15+
16+
public const string MSBuildExeName = "MSBuild.dll";
17+
18+
}
19+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using Microsoft.DotNet.Tools.Test;
5+
6+
namespace Microsoft.DotNet.Cli
7+
{
8+
internal class ErrorEventArgs : EventArgs
9+
{
10+
public string ErrorMessage { get; set; }
11+
}
12+
13+
internal class HelpEventArgs : EventArgs
14+
{
15+
public CommandLineOptionMessages CommandLineOptionMessages { get; set; }
16+
}
17+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
namespace Microsoft.DotNet.Tools.Test;
5+
6+
internal interface IClient :
7+
#if NETCOREAPP
8+
IAsyncDisposable,
9+
#endif
10+
IDisposable
11+
{
12+
bool IsConnected { get; }
13+
14+
Task ConnectAsync(CancellationToken cancellationToken);
15+
16+
Task<TResponse> RequestReplyAsync<TRequest, TResponse>(TRequest request, CancellationToken cancellationToken)
17+
where TRequest : IRequest
18+
where TResponse : IResponse;
19+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
namespace Microsoft.DotNet.Tools.Test;
5+
6+
internal interface INamedPipeBase
7+
{
8+
void RegisterSerializer(INamedPipeSerializer namedPipeSerializer, Type type);
9+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
namespace Microsoft.DotNet.Tools.Test;
5+
6+
internal interface INamedPipeSerializer
7+
{
8+
int Id { get; }
9+
10+
void Serialize(object objectToSerialize, Stream stream);
11+
12+
object Deserialize(Stream stream);
13+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
namespace Microsoft.DotNet.Tools.Test;
5+
6+
internal interface IRequest
7+
{
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
namespace Microsoft.DotNet.Tools.Test;
5+
6+
internal interface IResponse
7+
{
8+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
namespace Microsoft.DotNet.Tools.Test;
5+
6+
internal interface IServer : INamedPipeBase,
7+
#if NETCOREAPP
8+
IAsyncDisposable,
9+
#endif
10+
IDisposable
11+
{
12+
PipeNameDescription PipeName { get; }
13+
14+
Task WaitConnectionAsync(CancellationToken cancellationToken);
15+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
namespace Microsoft.DotNet.Tools.Test
5+
{
6+
internal sealed record CommandLineOptionMessage(string Name, string Description, bool IsHidden, bool IsBuiltIn) : IRequest;
7+
8+
internal sealed record CommandLineOptionMessages(string ModulePath, CommandLineOptionMessage[] CommandLineOptionMessageList) : IRequest;
9+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
namespace Microsoft.DotNet.Tools.Test;
5+
6+
internal sealed record class Module(string DLLPath, string ProjectPath) : IRequest;

0 commit comments

Comments
 (0)