Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# top-most EditorConfig file
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline=true
trim_trailing_whitespace=true

# Visual Studio Spell checker configs (https://learn.microsoft.com/en-us/visualstudio/ide/text-spell-checker?view=vs-2022#how-to-customize-the-spell-checker)
spelling_exclusion_path = ./exclusion.dic

# Solution files
[*.{sln,slnx}]
indent_size = 2

# MSBuild project files
[*.{csproj,props,targets}]
indent_size = 2

# Xml config files
[*.{ruleset,config,nuspec,resx,runsettings,DotSettings}]
indent_size = 2

# JSON files
[*.json]
indent_size = 2

# YAML files
[*.{yml]
indent_size = 2

# PowerShell files
[*.ps1]
indent_size = 2

# Markdown files
[*.md]
charset = utf-8-bom
trim_trailing_whitespace = false

# C# code style settings
[*.{cs}]

## TODO: Define custom settings
3 changes: 2 additions & 1 deletion ConsoleAppFramework.sln
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6DF6534A-0F9D-44A4-BF89-AE1F3B243914}"
ProjectSection(SolutionItems) = preProject
.dockerignore = .dockerignore
.editorconfig = .editorconfig
.gitignore = .gitignore
Directory.Build.props = Directory.Build.props
ReadMe.md = ReadMe.md
exclusion.dic = exclusion.dic
exclusion.dic = exclusion.dic
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleAppFramework", "src\ConsoleAppFramework\ConsoleAppFramework.csproj", "{09BEEA7B-B6D3-4011-BCAB-6DF976713695}"
Expand Down
2 changes: 1 addition & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ConsoleAppFramework
ConsoleAppFramework
===
[![GitHub Actions](https://github.com/Cysharp/ConsoleAppFramework/workflows/Build-Debug/badge.svg)](https://github.com/Cysharp/ConsoleAppFramework/actions) [![Releases](https://img.shields.io/github/release/Cysharp/ConsoleAppFramework.svg)](https://github.com/Cysharp/ConsoleAppFramework/releases)

Expand Down
2 changes: 1 addition & 1 deletion exclusion.dic
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
abcd
abcd
abcde
abcdefg
aiueo
Expand Down
2 changes: 1 addition & 1 deletion sandbox/CliFrameworkBenchmark/Benchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@ public void ExecuteSpectreConsoleCli()
// app.Add("", ConsoleAppFrameworkCommand.Execute);
// app.Run(Arguments);
//}
}
}
66 changes: 33 additions & 33 deletions sandbox/CliFrameworkBenchmark/CliFrameworkBenchmark.csproj
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<nullable>annotations</nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPackable>false</IsPackable>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<nullable>annotations</nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPackable>false</IsPackable>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\GeneratorSandbox\Filters.cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\GeneratorSandbox\Filters.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
<PackageReference Include="CliFx" Version="2.3.5" />
<PackageReference Include="clipr" Version="1.6.1" />
<PackageReference Include="Cocona" Version="2.2.0" />
<PackageReference Include="Cocona.Lite" Version="2.2.0" />
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<!--<PackageReference Include="ConsoleAppFramework" Version="4.2.4" />-->
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.1.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.0" />
<PackageReference Include="PowerArgs" Version="4.0.3" />
<PackageReference Include="Spectre.Console.Cli" Version="0.49.1" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageReference Include="System.CommandLine.NamingConventionBinder" Version="2.0.0-beta4.22272.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
<PackageReference Include="CliFx" Version="2.3.5" />
<PackageReference Include="clipr" Version="1.6.1" />
<PackageReference Include="Cocona" Version="2.2.0" />
<PackageReference Include="Cocona.Lite" Version="2.2.0" />
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<!--<PackageReference Include="ConsoleAppFramework" Version="4.2.4" />-->
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.1.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.0" />
<PackageReference Include="PowerArgs" Version="4.0.3" />
<PackageReference Include="Spectre.Console.Cli" Version="0.49.1" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageReference Include="System.CommandLine.NamingConventionBinder" Version="2.0.0-beta4.22272.1" />
</ItemGroup>


<ItemGroup>
<ProjectReference Include="..\..\src\ConsoleAppFramework\ConsoleAppFramework.csproj">
<OutputItemType>Analyzer</OutputItemType>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\ConsoleAppFramework\ConsoleAppFramework.csproj">
<OutputItemType>Analyzer</OutputItemType>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion sandbox/CliFrameworkBenchmark/Commands/CliFxCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ public class CliFxCommand : CliFx.ICommand

[CommandOption("bool", 'b')]
public bool BoolOption { get; set; }

public ValueTask ExecuteAsync(IConsole console) => ValueTask.CompletedTask;
}
2 changes: 1 addition & 1 deletion sandbox/CliFrameworkBenchmark/Commands/CliprCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ public class CliprCommand
public void Execute()
{
}
}
}
2 changes: 1 addition & 1 deletion sandbox/CliFrameworkBenchmark/Commands/CoconaCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public void Execute(
bool boolOption)
{
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public class CommandLineParserCommand
public void Execute()
{
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ public static void Execute(string? str, int intOption, bool boolOption, Cancella
// {
// return Next.InvokeAsync(cancellationToken);
// }
//}
//}
2 changes: 1 addition & 1 deletion sandbox/CliFrameworkBenchmark/Commands/McMasterCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ public class McMasterCommand
public bool BoolOption { get; set; }

public int OnExecute() => 0;
}
}
2 changes: 1 addition & 1 deletion sandbox/CliFrameworkBenchmark/Commands/PowerArgsCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ namespace Cocona.Benchmark.External.Commands;
// public void Main()
// {
// }
//}
//}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Spectre.Console.Cli;
using Spectre.Console.Cli;
using System.ComponentModel;

namespace Cocona.Benchmark.External.Commands;
Expand All @@ -21,4 +21,4 @@ public override int Execute(CommandContext context, Settings settings)
{
return 0;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ public static Task<int> ExecuteAsync(string[] args)
command.Handler = CommandHandler.Create(ExecuteHandler);
return command.InvokeAsync(args);
}
}
}
2 changes: 1 addition & 1 deletion sandbox/CliFrameworkBenchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

https://github.com/Tyrrrz/CliFx/tree/master/CliFx.Benchmarks/

https://github.com/mayuki/Cocona/tree/master/perf/Cocona.Benchmark.External
https://github.com/mayuki/Cocona/tree/master/perf/Cocona.Benchmark.External
4 changes: 2 additions & 2 deletions sandbox/FilterShareProject/Class1.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ConsoleAppFramework;
using ConsoleAppFramework;

namespace FilterShareProject;

Expand All @@ -17,4 +17,4 @@ public void Execute(int x)
{
Console.WriteLine("Hello?");
}
}
}
6 changes: 3 additions & 3 deletions sandbox/FilterShareProject/FilterShareProject.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
<Configurations>Debug;Release</Configurations>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions sandbox/GeneratorSandbox/Filters.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


using ConsoleAppFramework;
using System.ComponentModel.DataAnnotations;

Expand Down Expand Up @@ -119,4 +119,4 @@ public override async Task InvokeAsync(ConsoleAppContext context, CancellationTo
// await using var scope = serviceProvider.CreateAsyncScope();
// await Next.InvokeAsync(context, cancellationToken);
// }
//}
//}
66 changes: 33 additions & 33 deletions sandbox/GeneratorSandbox/GeneratorSandbox.csproj
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<LangVersion>13</LangVersion>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<LangVersion>13</LangVersion>

<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>1701;1702;CS8321</NoWarn>
<IsPackable>false</IsPackable>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>1701;1702;CS8321</NoWarn>
<IsPackable>false</IsPackable>

<DefineConstants>USE_EXTERNAL_CONSOLEAPP_ABSTRACTIONS</DefineConstants>
<DefineConstants>USE_EXTERNAL_CONSOLEAPP_ABSTRACTIONS</DefineConstants>

<Configurations>Debug;Release</Configurations>
</PropertyGroup>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>

<ItemGroup>
<!--<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
<ItemGroup>
<!--<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.0" />-->
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.0" />
<!--<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />-->
<!--<PackageReference Include="ZLogger" Version="2.5.9" />-->
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\ConsoleAppFramework.Abstractions\ConsoleAppFramework.Abstractions.csproj" />
<ProjectReference Include="..\..\src\ConsoleAppFramework\ConsoleAppFramework.csproj">
<OutputItemType>Analyzer</OutputItemType>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\FilterShareProject\FilterShareProject.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.0" />
<!--<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />-->
<!--<PackageReference Include="ZLogger" Version="2.5.9" />-->
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\ConsoleAppFramework.Abstractions\ConsoleAppFramework.Abstractions.csproj" />
<ProjectReference Include="..\..\src\ConsoleAppFramework\ConsoleAppFramework.csproj">
<OutputItemType>Analyzer</OutputItemType>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\FilterShareProject\FilterShareProject.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions sandbox/GeneratorSandbox/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#nullable enable
#nullable enable

using ConsoleAppFramework;
using GeneratorSandbox;
Expand Down Expand Up @@ -272,4 +272,4 @@ public class Batch2Attribute : BatchAttribute
}


}
}
32 changes: 16 additions & 16 deletions sandbox/NativeAot/NativeAot.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>

<PublishAot>true</PublishAot>
<IsAotCompatible>true</IsAotCompatible>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>
<PublishAot>true</PublishAot>
<IsAotCompatible>true</IsAotCompatible>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\ConsoleAppFramework\ConsoleAppFramework.csproj">
<OutputItemType>Analyzer</OutputItemType>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\ConsoleAppFramework\ConsoleAppFramework.csproj">
<OutputItemType>Analyzer</OutputItemType>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>

</Project>
Loading