-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
43 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System.Linq; | ||
using SageTools.Extension; | ||
|
||
namespace SageTools.Console; | ||
|
||
public static class Extension | ||
{ | ||
public static string GetArgValue(this string[] args, string argKey) | ||
{ | ||
if (args.IsNullOrEmpty() || argKey.IsNullOrWhiteSpace()) return default; | ||
argKey = '-' + argKey.TrimStart('-').TrimEnd('=') + '='; | ||
return args.Where(x => x.Contains(argKey)).Select(x => x.Replace(argKey, "")).FirstOrDefault(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"profiles": { | ||
"SageTools.Console": { | ||
"commandName": "Project" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.1</TargetFramework> | ||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
<Authors>LiuDanK</Authors> | ||
<Company>LiuDanK</Company> | ||
<Description>常用工具类、拓展方法等封装,目前还在实现中</Description> | ||
<Copyright>Copyright © LiuDanK 2021</Copyright> | ||
<Version>1.0.0</Version> | ||
<Version>1.8.6</Version> | ||
</PropertyGroup> | ||
|
||
</Project> | ||
</Project> |