AppUtil 2.0.19.1
See the version list below for details.
dotnet add package AppUtil --version 2.0.19.1
NuGet\Install-Package AppUtil -Version 2.0.19.1
<PackageReference Include="AppUtil" Version="2.0.19.1" />
paket add AppUtil --version 2.0.19.1
#r "nuget: AppUtil, 2.0.19.1"
// Install AppUtil as a Cake Addin
#addin nuget:?package=AppUtil&version=2.0.19.1
// Install AppUtil as a Cake Tool
#tool nuget:?package=AppUtil&version=2.0.19.1
程序主体
using System;
using System.IO;
using AppUtil;
using Microsoft.Extensions.Configuration;
using System.Linq;
namespace ConsoleNetCore
{
class Program
{
static void Main(string[] args)
{
var builder = new ConfigurationBuilder()
.SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), ""))
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
var configuration = builder.Build();
ExecuteEnvironment.StartEnv(() =>
{
var ev = ExecuteEnvironment.Instance;
ev.SetCmdDisplayer(new TabCmdDisplayer());
ev.AddCmdByAttributeLite(new DefaultScanTargetAssembly(
ExecuteEnvironment.GetHashSetFiles(configuration.GetSection("AssembleFilesToLoaded").Value)
))
.AddFiltersByAttribute(new DefaultScanTargetAssembly(
ExecuteEnvironment.GetHashSetFiles(configuration.GetSection("AssembleFilterFilesToLoaded").Value)
));
return ev;
}, n => { Console.WriteLine("Start execting " + n); }, n => { Console.WriteLine("Done"); });
}
}
}
appsettings.json配置文件
{ "AssembleFilesToLoaded":"LeetCodeSolution.dll", "AssembleFilterFilesToLoaded":"LeetCodeSolution.dll" }
.csproj文件中的引用
<ItemGroup> <PackageReference Include="AppUtil" Version="2.0.6" /> <PackageReference Include="Microsoft.Extensions.Configuration" Version="2.1.1" /> <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="2.1.1" /> <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.1" /> </ItemGroup>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net452 is compatible. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.5.2
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
2.0.19.1:优化ScanTargetAssembly
2.0.19:新增ScanTargetAssembly对IScanTargetAssembly的实现
2.0.18.3:新增ExecuteEnvironment.IsCmdHandlerSingleton设置CmdHandler是否单例
2.0.18.2:新增对.net framework4.5.2支持
2.0.18.1:修复ExecuteEnvironment.ClearAutoCmd
2.0.18:新增SerialAutoExecuter抽象类,用于命令集合一同执行(线程安全)
2.0.17:新增接口ICmdExtract和ICmdParameterExtract以便后续多命令扩展,添加执行环境输入模式(手工输入或自动)、可添加自动命令集合用于自动执行
2.0.16.2:优化find命令
2.0.16.1:ExecuteName提取微调
2.0.16:增强ExecuteName和Parameters提取以及修复ExecuteEnvironment调用RegexParameterGenerator无法生成参数
2.0.15:ExecutableAttribute新增属性IsExecuteNameIgnoreCase(是否忽略命令名称大小写)
2.0.14:新增命令匹配是否忽略大小写,退出命令忽略大小写,新增RegexParameterGenerator用于复杂参数的提取
2.0.13:修复进度条光标闪烁问题
2.0.12:新增命令搜索功能;
2.0.11:优化进度显示;
2.0.10:新增ProgressCharBar和ProgressBlockBar的构造函数,减少参数并新增设置方法;
2.0.9:新增ProgressCharBar和ProgressBlockBar用于显示处理进度的进度条;
2.0.8:新增方法ExecuteEnvironment.GetHashSetFiles,用于DefaultScanTargetAssembly的参数生成;
2.0.7:新增方法ExecuteEnvironment.GetHashSetFiles,用于DefaultScanTargetAssembly的参数生成;
2.0.6/2.0.5:ExecuteEnvironment新增StartEnv启动方法,方便启动;