File: Commands\BuildServer\BuildServerCommandParser.cs
Web Access
Project: ..\..\..\src\Cli\dotnet\dotnet.csproj (dotnet)
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
 
#nullable disable
 
using System.CommandLine;
using Microsoft.DotNet.Cli.Commands.BuildServer.Shutdown;
using Microsoft.DotNet.Cli.Extensions;
 
namespace Microsoft.DotNet.Cli.Commands.BuildServer;
 
internal static class BuildServerCommandParser
{
    public static readonly string DocsLink = "https://aka.ms/dotnet-build-server";
 
    private static readonly Command Command = ConstructCommand();
 
    public static Command GetCommand()
    {
        return Command;
    }
 
    private static Command ConstructCommand()
    {
        var command = new DocumentedCommand("build-server", DocsLink, CliCommandStrings.BuildServerCommandDescription);
 
        command.Subcommands.Add(BuildServerShutdownCommandParser.GetCommand());
 
        command.SetAction((parseResult) => parseResult.HandleMissingCommand());
 
        return command;
    }
}