mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-18 01:25:41 -05:00
Add developers startup arg (#997)
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using Microsoft.SqlTools.Hosting.Utility;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.Utility
|
||||
@@ -11,8 +13,36 @@ namespace Microsoft.SqlTools.ServiceLayer.Utility
|
||||
{
|
||||
internal const string ServiceLayerServiceName = "MicrosoftSqlToolsServiceLayer.exe";
|
||||
|
||||
public ServiceLayerCommandOptions(string[] args) : base(args, ServiceLayerServiceName)
|
||||
private static readonly string[] serviceLayerCommandArgs = { "-d", "--developers" };
|
||||
|
||||
/**
|
||||
* List of contributors to this project, used as part of the onboarding process.
|
||||
*/
|
||||
private readonly string[] contributors = new string[] {
|
||||
// Put your Github username here!
|
||||
"Charles-Gagnon"
|
||||
};
|
||||
|
||||
public ServiceLayerCommandOptions(string[] args) : base(args.Where(arg => !serviceLayerCommandArgs.Contains(arg)).ToArray(), ServiceLayerServiceName)
|
||||
{
|
||||
for (int i = 0; i < args.Length; ++i)
|
||||
{
|
||||
string arg = args[i].ToLowerInvariant();
|
||||
|
||||
switch (arg)
|
||||
{
|
||||
case "-d":
|
||||
case "--developers":
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("**********************************************************************************");
|
||||
Console.WriteLine("These are some of the developers who have contributed to this project - thank you!");
|
||||
Console.WriteLine("**********************************************************************************");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine(string.Join(Environment.NewLine, contributors.Select(contributor => $"\t{contributor}")));
|
||||
this.ShouldExit = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetLocale(string locale)
|
||||
|
||||
Reference in New Issue
Block a user