File tree Expand file tree Collapse file tree 3 files changed +16
-9
lines changed
Extensions/FluentValidationsExtensions Expand file tree Collapse file tree 3 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 4
4
<TargetFramework >netstandard2.0</TargetFramework >
5
5
<RootNamespace >MatthiWare.CommandLine</RootNamespace >
6
6
<PackageId >MatthiWare.CommandLineParser</PackageId >
7
- <Version >0.5.2 </Version >
7
+ <Version >0.6.0 </Version >
8
8
<Authors >Matthias Beerens</Authors >
9
9
<Company >MatthiWare</Company >
10
10
<Product >Command Line Parser</Product >
14
14
<RepositoryUrl >https://github.com/MatthiWare/CommandLineParser.Core</RepositoryUrl >
15
15
<PackageTags >Commandline parser commandline-parser cli</PackageTags >
16
16
<LangVersion >7.3</LangVersion >
17
- <AssemblyVersion >0.5.2 .0</AssemblyVersion >
18
- <FileVersion >0.5.2 .0</FileVersion >
17
+ <AssemblyVersion >0.6.0 .0</AssemblyVersion >
18
+ <FileVersion >0.6.0 .0</FileVersion >
19
19
<PackageLicenseFile >LICENSE</PackageLicenseFile >
20
- <PackageReleaseNotes >- Fix incorrect error message</PackageReleaseNotes >
20
+ <PackageReleaseNotes >- Improve Dependency Injection
21
+ - Dependency version upgrades</PackageReleaseNotes >
21
22
<Copyright >Copyright Matthias Beerens 2018</Copyright >
22
23
<RepositoryType >git</RepositoryType >
23
24
</PropertyGroup >
Original file line number Diff line number Diff line change 4
4
<TargetFramework >netstandard2.0</TargetFramework >
5
5
<RootNamespace >MatthiWare.CommandLine.Extensions.FluentValidations</RootNamespace >
6
6
<AssemblyName >CommandLineParser.FluentValidations</AssemblyName >
7
- <Version >0.5.2 </Version >
7
+ <Version >0.6.0 </Version >
8
8
<Authors >Matthias Beerens</Authors >
9
9
<Company >MatthiWare</Company >
10
10
<Product >FluentValidations Extension For MatthiWare.CommandLineParser</Product >
14
14
<RepositoryUrl >https://github.com/MatthiWare/CommandLineParser.Core</RepositoryUrl >
15
15
<PackageTags >Commandline parser commandline-parser cli fluent-validations extension</PackageTags >
16
16
<LangVersion >7.3</LangVersion >
17
- <AssemblyVersion >0.5.2 .0</AssemblyVersion >
18
- <FileVersion >0.5.2 .0</FileVersion >
17
+ <AssemblyVersion >0.6.0 .0</AssemblyVersion >
18
+ <FileVersion >0.6.0 .0</FileVersion >
19
19
<PackageLicenseFile >LICENSE</PackageLicenseFile >
20
- <PackageReleaseNotes >- Remove generic new constraint</PackageReleaseNotes >
20
+ <PackageReleaseNotes >- Improve Dependency Injection
21
+ - Dependency version upgrades</PackageReleaseNotes >
21
22
<Copyright >Copyright Matthias Beerens 2019</Copyright >
22
23
<PackageId >MatthiWare.CommandLineParser.Extensions.FluentValidations</PackageId >
23
24
<RepositoryType >git</RepositoryType >
Original file line number Diff line number Diff line change 2
2
using System . Reflection ;
3
3
using System . Threading . Tasks ;
4
4
using MatthiWare . CommandLine ;
5
+ using MatthiWare . CommandLine . Abstractions ;
5
6
using MatthiWare . CommandLine . Extensions . FluentValidations ;
6
7
using Microsoft . Extensions . DependencyInjection ;
7
8
using SampleApp . DependencyInjection ;
@@ -27,7 +28,11 @@ static async Task<int> Main(string[] args)
27
28
28
29
var parserOptions = new CommandLineParserOptions { AppName = "Sample App" } ;
29
30
30
- var parser = new CommandLineParser < Options > ( parserOptions , services ) ;
31
+ services . AddCommandLineParser < Options > ( parserOptions ) ;
32
+
33
+ var provider = services . BuildServiceProvider ( ) ;
34
+
35
+ var parser = provider . GetRequiredService < ICommandLineParser < Options > > ( ) ;
31
36
32
37
#region Example to add FluentValidations to the project
33
38
parser . UseFluentValidations ( ( config ) =>
You can’t perform that action at this time.
0 commit comments