Skip to content

Commit 7a7e425

Browse files
committed
Deprecated earlier version. Revsied documentation. Minor cleanup.
1 parent 3247ab5 commit 7a7e425

File tree

140 files changed

+580
-1664
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+580
-1664
lines changed

AutofacCommandLine/AutofacCommandLine.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44
<TargetFramework>net5.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<AssemblyName>J4JSoftware.CommandLine.Autofac</AssemblyName>
7-
<RootNamespace>J4JSoftware.CommandLine</RootNamespace>
7+
<RootNamespace>J4JSoftware.CommandLine.Deprecated</RootNamespace>
88
<Authors>Mark A. Olbert</Authors>
99
<Company>Jump for Joy Software</Company>
1010
<Product>J4JSoftware Command Line Processor</Product>
1111
<Description>Autofac support for J4JCommandLine</Description>
1212
<Copyright>© Mark A. Olbert all rights reserved</Copyright>
13-
<PackageDescription>Add on to J4JCommandLine to simplify using Autofac dependency injection.</PackageDescription>
13+
<PackageDescription>(Deprecated) Add on to J4JCommandLine to simplify using Autofac dependency injection.</PackageDescription>
1414
<RepositoryUrl>https://github.com/markolbert/J4JCommandLine</RepositoryUrl>
1515
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1616
<RepositoryType>git</RepositoryType>
1717
<PackageIcon>Diego nuspec.png</PackageIcon>
18-
<Version>0.5.0.0</Version>
19-
<AssemblyVersion>0.5.0.0</AssemblyVersion>
20-
<PackageReleaseNotes>added simpler way of specifying validators when using the autobind approach</PackageReleaseNotes>
18+
<Version>0.5.0.1</Version>
19+
<AssemblyVersion>0.5.0.1</AssemblyVersion>
20+
<PackageReleaseNotes>deprecated package due to fundamental redesign</PackageReleaseNotes>
2121
</PropertyGroup>
2222

2323
<ItemGroup>

AutofacCommandLine/AutofacCommandLineExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Reflection;
33
using Autofac;
44

5-
namespace J4JSoftware.CommandLine
5+
namespace J4JSoftware.CommandLine.Deprecated
66
{
77
public static class AutofacCommandLineExtensions
88
{

Binder.Tests/EmbeddedProperties.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,32 @@ namespace J4JSoftware.Binder.Tests
55
{
66
public class EmbeddedProperties : BaseTest
77
{
8-
[Theory]
9-
[MemberData(nameof(TestDataSource.GetEmbeddedPropertyData), MemberType=typeof(TestDataSource))]
8+
[ Theory ]
9+
[ MemberData( nameof(TestDataSource.GetEmbeddedPropertyData), MemberType = typeof(TestDataSource) ) ]
1010
public void Allocations( TestConfig config )
1111
{
1212
Initialize( config );
1313

1414
Bind<EmbeddedTarget, bool>( x => x.Target1.ASwitch );
15-
Bind<EmbeddedTarget, string>(x => x.Target1.ASingleValue);
16-
Bind<EmbeddedTarget, TestEnum>(x => x.Target1.AnEnumValue);
17-
Bind<EmbeddedTarget, TestFlagEnum>(x => x.Target1.AFlagEnumValue);
18-
Bind<EmbeddedTarget, List<string>>(x => x.Target1.ACollection);
15+
Bind<EmbeddedTarget, string>( x => x.Target1.ASingleValue );
16+
Bind<EmbeddedTarget, TestEnum>( x => x.Target1.AnEnumValue );
17+
Bind<EmbeddedTarget, TestFlagEnum>( x => x.Target1.AFlagEnumValue );
18+
Bind<EmbeddedTarget, List<string>>( x => x.Target1.ACollection );
1919

2020
ValidateTokenizing();
2121
}
2222

23-
[Theory]
24-
[MemberData(nameof(TestDataSource.GetEmbeddedPropertyData), MemberType = typeof(TestDataSource))]
25-
public void Parsing(TestConfig config)
23+
[ Theory ]
24+
[ MemberData( nameof(TestDataSource.GetEmbeddedPropertyData), MemberType = typeof(TestDataSource) ) ]
25+
public void Parsing( TestConfig config )
2626
{
27-
Initialize(config);
27+
Initialize( config );
2828

29-
Bind<EmbeddedTarget, bool>(x => x.Target1.ASwitch);
30-
Bind<EmbeddedTarget, string>(x => x.Target1.ASingleValue);
31-
Bind<EmbeddedTarget, TestEnum>(x => x.Target1.AnEnumValue);
32-
Bind<EmbeddedTarget, TestFlagEnum>(x => x.Target1.AFlagEnumValue);
33-
Bind<EmbeddedTarget, List<string>>(x => x.Target1.ACollection);
29+
Bind<EmbeddedTarget, bool>( x => x.Target1.ASwitch );
30+
Bind<EmbeddedTarget, string>( x => x.Target1.ASingleValue );
31+
Bind<EmbeddedTarget, TestEnum>( x => x.Target1.AnEnumValue );
32+
Bind<EmbeddedTarget, TestFlagEnum>( x => x.Target1.AFlagEnumValue );
33+
Bind<EmbeddedTarget, List<string>>( x => x.Target1.ACollection );
3434

3535
ValidateConfiguration<EmbeddedTarget>();
3636
}

Binder.Tests/MiscTests.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,23 @@ public class MiscTests : BaseTest
88
{
99
[ Theory ]
1010
[ InlineData( CommandLineStyle.Linux, "-x abc", "abc" ) ]
11-
[ InlineData(CommandLineStyle.Linux, "-x \"abc\"", "abc" ) ]
11+
[ InlineData( CommandLineStyle.Linux, "-x \"abc\"", "abc" ) ]
1212
public void StringHandling( CommandLineStyle style, string cmdLine, params string[] result )
1313
{
14-
Initialize(style);
14+
Initialize( style );
1515

1616
var option = Options.Bind<MiscTarget, string?>( x => x.AStringValue, "x" );
1717
option.Should().NotBeNull();
1818

19-
var parser = new Parser(Options, LoggerFactory);
19+
var parser = new Parser( Options, LoggerFactory );
2020
parser.Parse( cmdLine ).Should().BeTrue();
2121

2222
Options.UnknownKeys.Should().BeEmpty();
2323
Options.UnkeyedValues.Should().BeEmpty();
2424

2525
option!.Values.Count.Should().Be( result.Length );
2626

27-
for( var idx = 0; idx < result.Length; idx++ )
28-
{
29-
option.Values[ idx ].Should().Be( result[ idx ] );
30-
}
27+
for( var idx = 0; idx < result.Length; idx++ ) option.Values[ idx ].Should().Be( result[ idx ] );
3128
}
3229
}
3330
}

Binder.Tests/ParserTests.cs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
62
using FluentAssertions;
73
using J4JSoftware.Configuration.CommandLine;
84
using Xunit;
@@ -11,14 +7,14 @@ namespace J4JSoftware.Binder.Tests
117
{
128
public class ParserTests : BaseTest
139
{
14-
[Theory]
15-
[MemberData(nameof(TestDataSource.GetTokenizerData), MemberType = typeof(TestDataSource))]
10+
[ Theory ]
11+
[ MemberData( nameof(TestDataSource.GetTokenizerData), MemberType = typeof(TestDataSource) ) ]
1612
public void Tokenizer( TokenizerConfig config )
1713
{
1814
var tokenizer = new Tokenizer(
19-
AvailableTokens.GetDefault(CommandLineStyle.Windows, LoggerFactory),
15+
AvailableTokens.GetDefault( CommandLineStyle.Windows, LoggerFactory ),
2016
LoggerFactory,
21-
new ConsolidateQuotedText(StringComparison.OrdinalIgnoreCase, LoggerFactory()),
17+
new ConsolidateQuotedText( StringComparison.OrdinalIgnoreCase, LoggerFactory() ),
2218
new MergeSequentialSeparators() );
2319

2420
var tokens = tokenizer.Tokenize( config.CommandLine );
@@ -39,7 +35,7 @@ [ Theory ]
3935
[ MemberData( nameof(TestDataSource.GetParserData), MemberType = typeof(TestDataSource) ) ]
4036
public void Parser( TestConfig config )
4137
{
42-
Initialize(config);
38+
Initialize( config );
4339

4440
var parser = new Parser( Options, LoggerFactory );
4541

@@ -50,4 +46,4 @@ public void Parser( TestConfig config )
5046
ValidateConfiguration<BasicTarget>();
5147
}
5248
}
53-
}
49+
}

Binder.Tests/SingleProperties.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ [ MemberData( nameof(TestDataSource.GetSinglePropertyData), MemberType = typeof(
99
public void Allocations( TestConfig config )
1010
{
1111
Initialize( config );
12-
13-
Options.CreateOptionsFromContextKeys( config.OptionConfigurations);
12+
13+
Options.CreateOptionsFromContextKeys( config.OptionConfigurations );
1414

1515
ValidateTokenizing();
1616
}
@@ -21,7 +21,7 @@ public void Parsing( TestConfig config )
2121
{
2222
Initialize( config );
2323

24-
Options.CreateOptionsFromContextKeys(config.OptionConfigurations);
24+
Options.CreateOptionsFromContextKeys( config.OptionConfigurations );
2525

2626
ValidateConfiguration<BasicTarget>();
2727
}

Binder.Tests/appConfig.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
{
2-
"Logger": {
3-
"SourceRootPath": "C:/Programming/J4JCommandLine/Binder.Tests",
4-
"EventElements": "All",
5-
"Channels": {
6-
"Debug": {
7-
"MinimumLevel": "Verbose"
8-
}
2+
"SourceRootPath": "C:/Programming/J4JCommandLine/Binder.Tests",
3+
"EventElements": "All",
4+
"Channels": {
5+
"Debug": {
6+
"MinimumLevel": "Verbose"
97
}
108
}
11-
}
9+
}

Binder.Tests/results/BasicTarget.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Collections.Generic;
2+
23
#pragma warning disable 8618
34

45
namespace J4JSoftware.Binder.Tests

Binder.Tests/results/MiscTarget.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
6-
7-
namespace J4JSoftware.Binder.Tests
1+
namespace J4JSoftware.Binder.Tests
82
{
93
public class MiscTarget
104
{
115
public string? AStringValue { get; set; }
126
}
13-
}
7+
}

Binder.Tests/results/TestFlagEnum.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
namespace J4JSoftware.Binder.Tests
44
{
5-
[Flags]
5+
[ Flags ]
66
public enum TestFlagEnum
77
{
88
EnumValue1 = 1 << 0,
9-
EnumValue2 = 1 << 1,
9+
EnumValue2 = 1 << 1
1010
}
1111
}

0 commit comments

Comments
 (0)