diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..9f4fe5d --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,71 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ master ] + schedule: + - cron: '31 23 * * 0' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'csharp' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..e7dcc46 --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,34 @@ +name: .NET Test + +on: + push: + pull_request: + branches: [ master, develop, release* ] + +jobs: + + build: + + env: + SOLUTION: "./source/Appccelerate.Bootstrapper.sln" + + runs-on: windows-latest + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 5.0.x + + - name: Restore dependencies + run: dotnet restore ${{env.SOLUTION}} + + - name: Build + run: dotnet build ${{env.SOLUTION}} --no-restore + + - name: Test + run: dotnet test ${{env.SOLUTION}} --no-build --verbosity minimal diff --git a/.gitignore b/.gitignore index 5c1d8a8..5291ba9 100644 --- a/.gitignore +++ b/.gitignore @@ -107,4 +107,5 @@ _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML -Specs \ No newline at end of file +Specs +source/.idea/.idea.Appccelerate.Bootstrapper/.idea/ diff --git a/README.md b/README.md index c4a5e5d..835bde8 100644 --- a/README.md +++ b/README.md @@ -1 +1,8 @@ -Please see http://www.appccelerate.com/bootstrapper.html for documentation. +# Appccelerate.Bootstrapper + +[![.NET Test](https://github.com/dav1dev/bootstrapper/actions/workflows/dotnet.yml/badge.svg)](https://github.com/dav1dev/bootstrapper/actions/workflows/dotnet.yml) +[![CodeQL](https://github.com/dav1dev/bootstrapper/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/dav1dev/bootstrapper/actions/workflows/codeql-analysis.yml) + +Every application goes through start up and shutdown phases. The bootstrapper provides you an approved and extendable mechanism for bootstrapping the software life cycle. + +Please see [appccelerate.github.io/bootstrapper](https://appccelerate.github.io/bootstrapper.html) for documentation. diff --git a/source/Analyzers.Facts.ruleset b/source/Analyzers.Facts.ruleset new file mode 100644 index 0000000..b17a65a --- /dev/null +++ b/source/Analyzers.Facts.ruleset @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/Analyzers.Productive.ruleset b/source/Analyzers.Productive.ruleset new file mode 100644 index 0000000..040d8ee --- /dev/null +++ b/source/Analyzers.Productive.ruleset @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source/Analyzers.Specs.ruleset b/source/Analyzers.Specs.ruleset new file mode 100644 index 0000000..97a624d --- /dev/null +++ b/source/Analyzers.Specs.ruleset @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/Appccelerate.Bootstrapper.Facts/AbstractStrategyTest.cs b/source/Appccelerate.Bootstrapper.Facts/AbstractStrategyTest.cs index 904eac8..efd0581 100644 --- a/source/Appccelerate.Bootstrapper.Facts/AbstractStrategyTest.cs +++ b/source/Appccelerate.Bootstrapper.Facts/AbstractStrategyTest.cs @@ -19,7 +19,6 @@ namespace Appccelerate.Bootstrapper { using System; - using Appccelerate.Bootstrapper.Execution; using Appccelerate.Bootstrapper.Extension; using Appccelerate.Bootstrapper.Reporting; @@ -48,7 +47,7 @@ public void BuildRunSyntax_WhenCalledMultipleTimes_ShouldThrowException() { this.testee.BuildRunSyntax(); - this.testee.Invoking(x => x.BuildRunSyntax()).ShouldThrow(); + this.testee.Invoking(x => x.BuildRunSyntax()).Should().Throw(); } [Fact] @@ -65,7 +64,7 @@ public void BuildShutdownSyntax_WhenCalledMultipleTimes_ShouldThrowException() { this.testee.BuildShutdownSyntax(); - this.testee.Invoking(x => x.BuildShutdownSyntax()).ShouldThrow(); + this.testee.Invoking(x => x.BuildShutdownSyntax()).Should().Throw(); } [Fact] @@ -114,12 +113,13 @@ public void Dispose_MultipleTimes_ShouldNotThrow() { this.testee.Dispose(); - this.testee.Invoking(t => t.Dispose()).ShouldNotThrow(); + this.testee.Invoking(t => t.Dispose()).Should().NotThrow(); } private class TestableAbstractStrategy : AbstractStrategy { - public TestableAbstractStrategy(ISyntaxBuilder runSyntaxBuilder, ISyntaxBuilder shutdownSyntaxBuilder) + public TestableAbstractStrategy(ISyntaxBuilder runSyntaxBuilder, + ISyntaxBuilder shutdownSyntaxBuilder) : base(runSyntaxBuilder, shutdownSyntaxBuilder) { } diff --git a/source/Appccelerate.Bootstrapper.Facts/Appccelerate.Bootstrapper.Facts.csproj b/source/Appccelerate.Bootstrapper.Facts/Appccelerate.Bootstrapper.Facts.csproj index 46f13e0..85af532 100644 --- a/source/Appccelerate.Bootstrapper.Facts/Appccelerate.Bootstrapper.Facts.csproj +++ b/source/Appccelerate.Bootstrapper.Facts/Appccelerate.Bootstrapper.Facts.csproj @@ -1,139 +1,37 @@ - - - + - Debug - AnyCPU - {E5D38B10-5386-4774-A5E1-4E30C99DD1BC} - Library - Properties Appccelerate.Bootstrapper - Appccelerate.Bootstrapper.Facts - v4.5 - 512 - 4e36768d + net48 + false - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + + + Appccelerate.Bootstrapper.Facts + Copyright © 2008-2021 + Appccelerate team + Appccelerate + Appccelerate.Bootstrapper + - - ..\packages\Appccelerate.Fundamentals.2.8.0\lib\portable-windows8+net45\Appccelerate.Fundamentals.dll - - - ..\packages\FakeItEasy.1.25.1\lib\net40\FakeItEasy.dll - - - ..\packages\FluentAssertions.3.2.2\lib\net45\FluentAssertions.dll - - - ..\packages\FluentAssertions.3.2.2\lib\net45\FluentAssertions.Core.dll - - - - - - - - - - - ..\packages\xunit.1.9.2\lib\net20\xunit.dll - - - ..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + - - - + - - - {8F1AEC30-49CF-482C-BC4E-281984487847} - Appccelerate.Bootstrapper - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - - - - - - - - \ No newline at end of file + + + ../Analyzers.Facts.ruleset + + diff --git a/source/Appccelerate.Bootstrapper.Facts/Behavior/DisposeExtensionBehaviorTest.cs b/source/Appccelerate.Bootstrapper.Facts/Behavior/DisposeExtensionBehaviorTest.cs index 25feaf9..82323ef 100644 --- a/source/Appccelerate.Bootstrapper.Facts/Behavior/DisposeExtensionBehaviorTest.cs +++ b/source/Appccelerate.Bootstrapper.Facts/Behavior/DisposeExtensionBehaviorTest.cs @@ -43,7 +43,7 @@ public void Behave_ShouldDisposeDisposableExtensions() this.testee.Behave(new List { notDisposableExtension, disposableExtension }); A.CallTo(() => notDisposableExtension.Dispose()).MustNotHaveHappened(); - A.CallTo(() => disposableExtension.Dispose()).MustHaveHappened(Repeated.Exactly.Once); + A.CallTo(() => disposableExtension.Dispose()).MustHaveHappenedOnceExactly(); } [Fact] diff --git a/source/Appccelerate.Bootstrapper.Facts/DefaultBootstrapperTest.cs b/source/Appccelerate.Bootstrapper.Facts/DefaultBootstrapperTest.cs index 4ded0d5..608c576 100644 --- a/source/Appccelerate.Bootstrapper.Facts/DefaultBootstrapperTest.cs +++ b/source/Appccelerate.Bootstrapper.Facts/DefaultBootstrapperTest.cs @@ -59,7 +59,7 @@ public void Initialize_MultipleTimes_ShouldThrowException() this.testee.Initialize(this.strategy); - this.testee.Invoking(x => x.Initialize(A.Fake>())).ShouldThrow(); + this.testee.Invoking(x => x.Initialize(A.Fake>())).Should().Throw(); } [Fact] @@ -75,7 +75,7 @@ public void Initialize_ShouldCreateReportingContext() [Fact] public void AddExtension_WhenNotInitialized_ShouldThrowInvalidOperationException() { - this.testee.Invoking(x => x.AddExtension(A.Fake())).ShouldThrow(); + this.testee.Invoking(x => x.AddExtension(A.Fake())).Should().Throw(); } [Fact] @@ -152,7 +152,7 @@ public void Run_ShouldExecuteSyntaxAndExtensionsOnRunExecutor() public void Run_ShouldThrowExceptionWhenNotInitialized() { this.testee.Invoking(t => t.Run()) - .ShouldThrow(); + .Should().Throw(); } [Fact] @@ -195,7 +195,7 @@ public void Shutdown_ShouldExecuteSyntaxAndExtensionsOnShutdownExecutor() public void Shutdown_ShouldThrowExceptionWhenNotInitialized() { this.testee.Invoking(t => t.Shutdown()) - .ShouldThrow(); + .Should().Throw(); } [Fact] diff --git a/source/Appccelerate.Bootstrapper.Facts/Execution/ExecutorTest.cs b/source/Appccelerate.Bootstrapper.Facts/Execution/ExecutorTest.cs index 1873a33..979a85a 100644 --- a/source/Appccelerate.Bootstrapper.Facts/Execution/ExecutorTest.cs +++ b/source/Appccelerate.Bootstrapper.Facts/Execution/ExecutorTest.cs @@ -16,6 +16,8 @@ // //------------------------------------------------------------------------------- +using Xunit; + namespace Appccelerate.Bootstrapper.Execution { using System.Collections.Generic; @@ -58,7 +60,7 @@ public static IEnumerable Testees } [Theory] - [PropertyData("Testees")] + [MemberData(nameof(Testees))] public void Execute_ShouldExecuteSyntaxWithExtensions(IExecutor testee) { this.SetupSyntaxReturnsExecutables(); @@ -70,7 +72,7 @@ public void Execute_ShouldExecuteSyntaxWithExtensions(IExecutor test } [Theory] - [PropertyData("Testees")] + [MemberData(nameof(Testees))] public void Execute_ShouldCreateExecutableContextForExecutables(IExecutor testee) { this.SetupSyntaxReturnsExecutables(); @@ -82,7 +84,7 @@ public void Execute_ShouldCreateExecutableContextForExecutables(IExecutor testee) { this.SetupSyntaxReturnsExecutables(); @@ -100,7 +102,7 @@ public void Execute_ShouldProvideExecutableContextForExecutables(IExecutor testee) { string expectedName = testee.GetType().FullNameToString(); diff --git a/source/Appccelerate.Bootstrapper.Specs/BootstrapperWithConfigurationSectionBehaviorSpecification.cs b/source/Appccelerate.Bootstrapper.Facts/Formatters/TypeExtensionsFacts.cs similarity index 50% rename from source/Appccelerate.Bootstrapper.Specs/BootstrapperWithConfigurationSectionBehaviorSpecification.cs rename to source/Appccelerate.Bootstrapper.Facts/Formatters/TypeExtensionsFacts.cs index d115aff..4178d62 100644 --- a/source/Appccelerate.Bootstrapper.Specs/BootstrapperWithConfigurationSectionBehaviorSpecification.cs +++ b/source/Appccelerate.Bootstrapper.Facts/Formatters/TypeExtensionsFacts.cs @@ -1,5 +1,5 @@ //------------------------------------------------------------------------------- -// +// // Copyright (c) 2008-2015 // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,24 +16,29 @@ // //------------------------------------------------------------------------------- -namespace Appccelerate.Bootstrapper +using Xunit; + +namespace Appccelerate.Formatters { - using Appccelerate.Bootstrapper.Dummies; - using Machine.Specifications; + using System; + using System.Collections.Generic; + using FluentAssertions; - public class BootstrapperWithConfigurationSectionBehaviorSpecification + using Xunit.Extensions; + + public class TypeExtensionsFacts { - protected const string Concern = "Bootstrapping with configuration section"; - - protected static CustomExtensionWithConfigurationStrategy Strategy; - - protected static IBootstrapper Bootstrapper; - - Establish context = () => + [Theory] + [InlineData( + typeof(KeyValuePair), + "System.Collections.Generic.KeyValuePair")] + [InlineData( + typeof(ICollection), + "System.Collections.Generic.ICollection")] + public void PrintsFullNameOfAGenericTypeWithReadableTypeParameters(Type type, string expectedPrettyPrint) { - Bootstrapper = new DefaultBootstrapper(); - - Strategy = new CustomExtensionWithConfigurationStrategy(); - }; + type.FullNameToString() + .Should().Be(expectedPrettyPrint); + } } } \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper.Facts/NuGet.config b/source/Appccelerate.Bootstrapper.Facts/NuGet.config deleted file mode 100644 index 5d5bc35..0000000 --- a/source/Appccelerate.Bootstrapper.Facts/NuGet.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper.Facts/Properties/AssemblyInfo.cs b/source/Appccelerate.Bootstrapper.Facts/Properties/AssemblyInfo.cs deleted file mode 100644 index aff09f8..0000000 --- a/source/Appccelerate.Bootstrapper.Facts/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,25 +0,0 @@ -//------------------------------------------------------------------------------- -// -// Copyright (c) 2008-2015 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------- - -using System.Reflection; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Appccelerate.Bootstrapper.Test")] -[assembly: AssemblyDescription("")] diff --git a/source/Appccelerate.Bootstrapper.Facts/Properties/GlobalAssemblyInfo.cs b/source/Appccelerate.Bootstrapper.Facts/Properties/GlobalAssemblyInfo.cs deleted file mode 100644 index 21da808..0000000 --- a/source/Appccelerate.Bootstrapper.Facts/Properties/GlobalAssemblyInfo.cs +++ /dev/null @@ -1,34 +0,0 @@ -//------------------------------------------------------------------------------- -// -// Copyright (c) 2008-2015 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------- - -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyCompany("Appccelerate")] -[assembly: AssemblyProduct("Appccelerate")] -[assembly: AssemblyCopyright("Copyright © 2008-2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] diff --git a/source/Appccelerate.Bootstrapper.Facts/Settings.stylecop b/source/Appccelerate.Bootstrapper.Facts/Settings.stylecop deleted file mode 100644 index 0f7f7ab..0000000 --- a/source/Appccelerate.Bootstrapper.Facts/Settings.stylecop +++ /dev/null @@ -1,70 +0,0 @@ - - - True - NoMerge - - - - - - \.g\.cs$ - \.Designer\.cs$ - \.generated\.cs$ - \.g\.i\.cs$ - TemporaryGeneratedFile_.*\.cs$ - AssemblyInfo_.*\.cs$ - - - - - - - - - - False - - - - - False - - - - - - - - - - False - - - - - - - - - - False - - - - - False - - - - - False - - - - - Appccelerate - Copyright (c) 2008-2015 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - - - \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper.Facts/Syntax/Executables/ExecutableTest.cs b/source/Appccelerate.Bootstrapper.Facts/Syntax/Executables/ExecutableTest.cs index a31178e..ff3a251 100644 --- a/source/Appccelerate.Bootstrapper.Facts/Syntax/Executables/ExecutableTest.cs +++ b/source/Appccelerate.Bootstrapper.Facts/Syntax/Executables/ExecutableTest.cs @@ -16,6 +16,8 @@ // //------------------------------------------------------------------------------- +using Xunit; + namespace Appccelerate.Bootstrapper.Syntax.Executables { using System.Collections.Generic; @@ -52,7 +54,7 @@ public static IEnumerable Testees } [Theory] - [PropertyData("Testees")] + [MemberData(nameof(Testees))] public void ShouldReturnTypeName(IExecutable testee) { string expectedName = testee.GetType().FullNameToString(); @@ -61,7 +63,7 @@ public void ShouldReturnTypeName(IExecutable testee) } [Theory] - [PropertyData("Testees")] + [MemberData(nameof(Testees))] public void Execute_ShouldExecuteBehavior(IExecutable testee) { var first = A.Fake>(); @@ -78,7 +80,7 @@ public void Execute_ShouldExecuteBehavior(IExecutable testee) } [Theory] - [PropertyData("Testees")] + [MemberData(nameof(Testees))] public void Execute_ShouldCreateBehaviorContextForBehaviors(IExecutable testee) { var first = A.Fake>(); diff --git a/source/Appccelerate.Bootstrapper.Facts/Syntax/SyntaxBuilderTest.cs b/source/Appccelerate.Bootstrapper.Facts/Syntax/SyntaxBuilderTest.cs index 063520c..e756a78 100644 --- a/source/Appccelerate.Bootstrapper.Facts/Syntax/SyntaxBuilderTest.cs +++ b/source/Appccelerate.Bootstrapper.Facts/Syntax/SyntaxBuilderTest.cs @@ -153,7 +153,7 @@ public void BeginWithLateBound_BehaviorMultipleTimes_ShouldAddBehaviorToLastExec .With(() => secondBehavior) .With(() => thirdBehavior); - A.CallTo(() => extension.Add(A>._)).MustHaveHappened(Repeated.Exactly.Times(3)); + A.CallTo(() => extension.Add(A>._)).MustHaveHappened(3, Times.Exactly); } [Fact] @@ -291,7 +291,7 @@ public void EndWithLateBound_BehaviorMultipleTimes_ShouldAddBehaviorToLastExecut .With(() => thirdBehavior); A.CallTo(() => firstExtension.Add(A>._)).MustNotHaveHappened(); - A.CallTo(() => secondExtension.Add(A>._)).MustHaveHappened(Repeated.Exactly.Times(3)); + A.CallTo(() => secondExtension.Add(A>._)).MustHaveHappened(3, Times.Exactly); } [Fact] @@ -418,7 +418,7 @@ public void WithLateBoundAfterExecuteWithAction_BehaviorMultipleTimes_ShouldAddB .With(() => secondBehavior) .With(() => thirdBehavior); - A.CallTo(() => extension.Add(A>._)).MustHaveHappened(Repeated.Exactly.Times(3)); + A.CallTo(() => extension.Add(A>._)).MustHaveHappened(3, Times.Exactly); } [Fact] @@ -557,7 +557,7 @@ public void WithLateBoundAfterExecuteWithActionOnExtension_BehaviorMultipleTimes .With(() => secondBehavior) .With(() => thirdBehavior); - A.CallTo(() => extension.Add(A>._)).MustHaveHappened(Repeated.Exactly.Times(3)); + A.CallTo(() => extension.Add(A>._)).MustHaveHappened(3, Times.Exactly); } [Fact] diff --git a/source/Appccelerate.Bootstrapper.Facts/packages.config b/source/Appccelerate.Bootstrapper.Facts/packages.config deleted file mode 100644 index 95ef507..0000000 --- a/source/Appccelerate.Bootstrapper.Facts/packages.config +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper.Sample/Appccelerate.Bootstrapper.Sample.csproj b/source/Appccelerate.Bootstrapper.Sample/Appccelerate.Bootstrapper.Sample.csproj index 7f5b4da..469faa5 100644 --- a/source/Appccelerate.Bootstrapper.Sample/Appccelerate.Bootstrapper.Sample.csproj +++ b/source/Appccelerate.Bootstrapper.Sample/Appccelerate.Bootstrapper.Sample.csproj @@ -1,132 +1,32 @@ - - - + - Debug - AnyCPU - {0F6C73B4-C99B-4B25-A418-8908B0DAD637} Exe - Properties - Appccelerate.Bootstrapper.Sample - Appccelerate.Bootstrapper.Sample - v4.5 - 512 - bf1e0607 + net48 System,Microsoft,Windows,Presentation,Funq + false - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + + + Appccelerate.EventBroker.Sample + Copyright © 2008-2021 + Appccelerate team + Appccelerate + Appccelerate.Bootstrapper + - - ..\packages\Appccelerate.Fundamentals.2.8.0\lib\portable-windows8+net45\Appccelerate.Fundamentals.dll - + + + Libs\Funq.dll - - ..\packages\log4net.2.0.3\lib\net40-full\log4net.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - {8f1aec30-49cf-482c-bc4e-281984487847} - Appccelerate.Bootstrapper - + - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - - - - - - - - \ No newline at end of file + diff --git a/source/Appccelerate.Bootstrapper.Sample/Complex/Extensions/ExtensionWhichRegistersSomething.cs b/source/Appccelerate.Bootstrapper.Sample/Complex/Extensions/ExtensionWhichRegistersSomething.cs index 8fec4bf..6df522f 100644 --- a/source/Appccelerate.Bootstrapper.Sample/Complex/Extensions/ExtensionWhichRegistersSomething.cs +++ b/source/Appccelerate.Bootstrapper.Sample/Complex/Extensions/ExtensionWhichRegistersSomething.cs @@ -35,8 +35,6 @@ public class ExtensionWhichRegistersSomething : ComplexExtensionBase /// public override void ContainerInitializing(ICollection funqlets) { - Ensure.ArgumentNotNull(funqlets, "funqlets"); - base.ContainerInitializing(funqlets); Log.Info("ExtensionWhichRegistersSomething is initializing the container."); diff --git a/source/Appccelerate.Bootstrapper.Sample/Complex/Extensions/ExtensionWithCustomConfigurationSection.cs b/source/Appccelerate.Bootstrapper.Sample/Complex/Extensions/ExtensionWithCustomConfigurationSection.cs index a2a1838..f8f39de 100644 --- a/source/Appccelerate.Bootstrapper.Sample/Complex/Extensions/ExtensionWithCustomConfigurationSection.cs +++ b/source/Appccelerate.Bootstrapper.Sample/Complex/Extensions/ExtensionWithCustomConfigurationSection.cs @@ -45,9 +45,6 @@ public override string Describe() /// public void Apply(ConfigurationSection section) { - Ensure.ArgumentNotNull(section, "section"); - Ensure.ArgumentTypeAssignableFrom(typeof(CustomConfigurationSection), section.GetType(), "section"); - this.section = (CustomConfigurationSection)section; } diff --git a/source/Appccelerate.Bootstrapper.Sample/Customization/AsynchronousRunExecutor.cs b/source/Appccelerate.Bootstrapper.Sample/Customization/AsynchronousRunExecutor.cs index ca62db4..965c9e8 100644 --- a/source/Appccelerate.Bootstrapper.Sample/Customization/AsynchronousRunExecutor.cs +++ b/source/Appccelerate.Bootstrapper.Sample/Customization/AsynchronousRunExecutor.cs @@ -49,8 +49,6 @@ public string Describe() /// public void Execute(ISyntax syntax, IEnumerable extensions, IExecutionContext executionContext) { - Ensure.ArgumentNotNull(syntax, "syntax"); - foreach (IExecutable executable in syntax) { using (var worker = new Task( diff --git a/source/Appccelerate.Bootstrapper.Sample/Customization/AsynchronousShutdownExecutor.cs b/source/Appccelerate.Bootstrapper.Sample/Customization/AsynchronousShutdownExecutor.cs index f6e2642..103d27f 100644 --- a/source/Appccelerate.Bootstrapper.Sample/Customization/AsynchronousShutdownExecutor.cs +++ b/source/Appccelerate.Bootstrapper.Sample/Customization/AsynchronousShutdownExecutor.cs @@ -49,8 +49,6 @@ public string Describe() /// public void Execute(ISyntax syntax, IEnumerable extensions, IExecutionContext executionContext) { - Ensure.ArgumentNotNull(syntax, "syntax"); - var reversedExtensions = new Stack(extensions); foreach (IExecutable executable in syntax) diff --git a/source/Appccelerate.Bootstrapper.Sample/Customization/CustomExtensionResolver.cs b/source/Appccelerate.Bootstrapper.Sample/Customization/CustomExtensionResolver.cs index c2d06bf..8849430 100644 --- a/source/Appccelerate.Bootstrapper.Sample/Customization/CustomExtensionResolver.cs +++ b/source/Appccelerate.Bootstrapper.Sample/Customization/CustomExtensionResolver.cs @@ -29,8 +29,6 @@ public class CustomExtensionResolver : IExtensionResolver /// public void Resolve(IExtensionPoint extensionPoint) { - Ensure.ArgumentNotNull(extensionPoint, "extensionPoint"); - extensionPoint.AddExtension(new ExtensionWhichNeedsDependency()); extensionPoint.AddExtension(new ExtensionWhichIsFunqlet()); extensionPoint.AddExtension(new ExtensionWithExtensionConfigurationSection()); diff --git a/source/Appccelerate.Bootstrapper.Sample/Customization/DecoratingExecutable.cs b/source/Appccelerate.Bootstrapper.Sample/Customization/DecoratingExecutable.cs index fa387cc..5f4f892 100644 --- a/source/Appccelerate.Bootstrapper.Sample/Customization/DecoratingExecutable.cs +++ b/source/Appccelerate.Bootstrapper.Sample/Customization/DecoratingExecutable.cs @@ -64,8 +64,6 @@ public void Add(IBehavior behavior) /// public void Execute(IEnumerable extensions, IExecutableContext executableContext) { - Ensure.ArgumentNotNull(executableContext, "executableContext"); - Console.WriteLine("::: Executing executable {0}", executableContext.Name); this.decoratedExecutable.Execute(extensions, executableContext); diff --git a/source/Appccelerate.Bootstrapper.Sample/NuGet.config b/source/Appccelerate.Bootstrapper.Sample/NuGet.config deleted file mode 100644 index 5d5bc35..0000000 --- a/source/Appccelerate.Bootstrapper.Sample/NuGet.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper.Sample/Properties/AssemblyInfo.cs b/source/Appccelerate.Bootstrapper.Sample/Properties/AssemblyInfo.cs deleted file mode 100644 index 693d13e..0000000 --- a/source/Appccelerate.Bootstrapper.Sample/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,25 +0,0 @@ -//------------------------------------------------------------------------------- -// -// Copyright (c) 2008-2015 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------- - -using System.Reflection; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Appccelerate.Bootstrapper.Sample")] -[assembly: AssemblyDescription("")] \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper.Sample/Properties/GlobalAssemblyInfo.cs b/source/Appccelerate.Bootstrapper.Sample/Properties/GlobalAssemblyInfo.cs deleted file mode 100644 index 21da808..0000000 --- a/source/Appccelerate.Bootstrapper.Sample/Properties/GlobalAssemblyInfo.cs +++ /dev/null @@ -1,34 +0,0 @@ -//------------------------------------------------------------------------------- -// -// Copyright (c) 2008-2015 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------- - -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyCompany("Appccelerate")] -[assembly: AssemblyProduct("Appccelerate")] -[assembly: AssemblyCopyright("Copyright © 2008-2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] diff --git a/source/Appccelerate.Bootstrapper.Sample/Settings.stylecop b/source/Appccelerate.Bootstrapper.Sample/Settings.stylecop deleted file mode 100644 index 70dd30d..0000000 --- a/source/Appccelerate.Bootstrapper.Sample/Settings.stylecop +++ /dev/null @@ -1,112 +0,0 @@ - - - - args - aspx - async - bootstrapper - csv - deserialize - deserialized - funqlet - Funqlet - funqlets - msdn - remoting - serialized - serializer - - NoMerge - - - - - - \.g\.cs$ - \.Designer\.cs$ - \.generated\.cs$ - \.g\.i\.cs$ - TemporaryGeneratedFile_.*\.cs$ - AssemblyInfo_.*\.cs$ - - - - - - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - Appccelerate - Copyright (c) 2008-2015 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - False - True - - - - - - - False - - - - - - - - - - False - - - - - - - - - - False - - - - - - - \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper.Sample/packages.config b/source/Appccelerate.Bootstrapper.Sample/packages.config deleted file mode 100644 index 5a24633..0000000 --- a/source/Appccelerate.Bootstrapper.Sample/packages.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper.Specs/Appccelerate.Bootstrapper.Specs.csproj b/source/Appccelerate.Bootstrapper.Specs/Appccelerate.Bootstrapper.Specs.csproj index f529657..343a852 100644 --- a/source/Appccelerate.Bootstrapper.Specs/Appccelerate.Bootstrapper.Specs.csproj +++ b/source/Appccelerate.Bootstrapper.Specs/Appccelerate.Bootstrapper.Specs.csproj @@ -1,140 +1,37 @@ - - - + - Debug - AnyCPU - {50EDAC5A-8CE3-4608-BD4E-29D9FB8FFC47} - Library - Properties Appccelerate.Bootstrapper - Appccelerate.Bootstrapper.Specs - v4.5 - 512 - 832015bb + net48 + false - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + + + Appccelerate.Bootstrapper.Specs + Copyright © 2008-2021 + Appccelerate team + Appccelerate + Appccelerate.Bootstrapper + - - ..\packages\Appccelerate.Fundamentals.2.8.0\lib\portable-windows8+net45\Appccelerate.Fundamentals.dll - - - ..\packages\FakeItEasy.1.25.1\lib\net40\FakeItEasy.dll - - - ..\packages\FluentAssertions.3.2.2\lib\net45\FluentAssertions.dll - - - ..\packages\FluentAssertions.3.2.2\lib\net45\FluentAssertions.Core.dll - - - ..\packages\Machine.Specifications.0.9.1\lib\net45\Machine.Specifications.dll - - - ..\packages\Machine.Specifications.0.9.1\lib\net45\Machine.Specifications.Clr4.dll - - - - - - - - - - - ..\packages\xunit.1.9.2\lib\net20\xunit.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + - - - Designer - - + - - - {8F1AEC30-49CF-482C-BC4E-281984487847} - Appccelerate.Bootstrapper - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - - - - - - - - \ No newline at end of file + + + ../Analyzers.Specs.ruleset + + diff --git a/source/Appccelerate.Bootstrapper.Specs/BootstrapperReportingSpecification.cs b/source/Appccelerate.Bootstrapper.Specs/BootstrapperReportingSpecification.cs deleted file mode 100644 index 7aa9bcb..0000000 --- a/source/Appccelerate.Bootstrapper.Specs/BootstrapperReportingSpecification.cs +++ /dev/null @@ -1,92 +0,0 @@ -//------------------------------------------------------------------------------- -// -// Copyright (c) 2008-2015 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------- - -namespace Appccelerate.Bootstrapper -{ - using System; - using System.Collections.Generic; - using System.Collections.ObjectModel; - using Appccelerate.Bootstrapper.Dummies; - using Appccelerate.Bootstrapper.Reporting; - using Machine.Specifications; - - public class BootstrapperReportingSpecification - { - protected const string Concern = "Bootstrapper reporting"; - - protected static CustomExtensionWithBehaviorStrategy Strategy; - - protected static CustomExtensionBase First; - - protected static CustomExtensionBase Second; - - protected static IBootstrapper Bootstrapper; - - protected static IReportingContext ReportingContext; - - protected static Queue SequenceQueue; - - private static ReporterCollection Reporters; - - Establish context = () => - { - SequenceQueue = new Queue(); - - Reporters = new ReporterCollection(); - - Bootstrapper = new DefaultBootstrapper(Reporters); - - Strategy = new CustomExtensionWithBehaviorStrategy(SequenceQueue); - First = new FirstExtension(SequenceQueue); - Second = new SecondExtension(SequenceQueue); - - RegisterReporter(new InterceptingReporter(ctx => ReportingContext = ctx)); - }; - - protected static void RegisterReporter(IReporter reporter) - { - Reporters.Add(reporter); - } - - private class ReporterCollection : Collection, IReporter - { - public void Report(IReportingContext context) - { - foreach (IReporter reporter in this.Items) - { - reporter.Report(context); - } - } - } - - private class InterceptingReporter : IReporter - { - private readonly Action contextInterceptor; - - public InterceptingReporter(Action contextInterceptor) - { - this.contextInterceptor = contextInterceptor; - } - - public void Report(IReportingContext context) - { - this.contextInterceptor(context); - } - } - } -} \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper.Specs/BootstrapperSpecification.cs b/source/Appccelerate.Bootstrapper.Specs/BootstrapperSpecification.cs deleted file mode 100644 index af8aa0d..0000000 --- a/source/Appccelerate.Bootstrapper.Specs/BootstrapperSpecification.cs +++ /dev/null @@ -1,46 +0,0 @@ -//------------------------------------------------------------------------------- -// -// Copyright (c) 2008-2015 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------- - -namespace Appccelerate.Bootstrapper -{ - using System.Collections.Generic; - using Appccelerate.Bootstrapper.Dummies; - using Machine.Specifications; - - public class BootstrapperSpecification - { - protected const string Concern = "Bootstrapping"; - - protected static CustomExtensionStrategy Strategy; - protected static CustomExtensionBase First; - protected static CustomExtensionBase Second; - protected static IBootstrapper Bootstrapper; - protected static Queue SequenceQueue; - - Establish context = () => - { - SequenceQueue = new Queue(); - - Bootstrapper = new DefaultBootstrapper(); - - Strategy = new CustomExtensionStrategy(SequenceQueue); - First = new FirstExtension(SequenceQueue); - Second = new SecondExtension(SequenceQueue); - }; - } -} \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper.Specs/BootstrapperWithBehaviorSpecification.cs b/source/Appccelerate.Bootstrapper.Specs/BootstrapperWithBehaviorSpecification.cs deleted file mode 100644 index dbe0c27..0000000 --- a/source/Appccelerate.Bootstrapper.Specs/BootstrapperWithBehaviorSpecification.cs +++ /dev/null @@ -1,49 +0,0 @@ -//------------------------------------------------------------------------------- -// -// Copyright (c) 2008-2015 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------- - -namespace Appccelerate.Bootstrapper -{ - using System.Collections.Generic; - using Appccelerate.Bootstrapper.Dummies; - using Machine.Specifications; - - public class BootstrapperWithBehaviorSpecification - { - protected const string Concern = "Bootstrapping with behavior"; - - protected static CustomExtensionWithBehaviorStrategy Strategy; - - protected static CustomExtensionBase First; - protected static CustomExtensionBase Second; - - protected static IBootstrapper Bootstrapper; - - protected static Queue SequenceQueue; - - Establish context = () => - { - SequenceQueue = new Queue(); - - Bootstrapper = new DefaultBootstrapper(); - - Strategy = new CustomExtensionWithBehaviorStrategy(SequenceQueue); - First = new FirstExtension(SequenceQueue); - Second = new SecondExtension(SequenceQueue); - }; - } -} \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper.Specs/BootstrapperWithExtensionConfigurationSectionBehaviorSpecification.cs b/source/Appccelerate.Bootstrapper.Specs/BootstrapperWithExtensionConfigurationSectionBehaviorSpecification.cs deleted file mode 100644 index c6abae7..0000000 --- a/source/Appccelerate.Bootstrapper.Specs/BootstrapperWithExtensionConfigurationSectionBehaviorSpecification.cs +++ /dev/null @@ -1,39 +0,0 @@ -//------------------------------------------------------------------------------- -// -// Copyright (c) 2008-2015 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------- - -namespace Appccelerate.Bootstrapper -{ - using Appccelerate.Bootstrapper.Dummies; - using Machine.Specifications; - - public class BootstrapperWithExtensionConfigurationSectionBehaviorSpecification - { - protected const string Concern = "Bootstrapping with extension configuration section"; - - protected static CustomExtensionWithExtensionConfigurationStrategy Strategy; - - protected static IBootstrapper Bootstrapper; - - Establish context = () => - { - Bootstrapper = new DefaultBootstrapper(); - - Strategy = new CustomExtensionWithExtensionConfigurationStrategy(); - }; - } -} \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper.Specs/Dummies/Behavior.cs b/source/Appccelerate.Bootstrapper.Specs/Dummies/Behavior.cs index 570e979..84336ab 100644 --- a/source/Appccelerate.Bootstrapper.Specs/Dummies/Behavior.cs +++ b/source/Appccelerate.Bootstrapper.Specs/Dummies/Behavior.cs @@ -36,13 +36,7 @@ public Behavior(string access) } /// - public string Name - { - get - { - return this.GetType().FullNameToString(); - } - } + public string Name => this.GetType().FullNameToString(); /// public void Behave(IEnumerable extensions) diff --git a/source/Appccelerate.Bootstrapper.Specs/Dummies/BehaviorWithConfigurationContext.cs b/source/Appccelerate.Bootstrapper.Specs/Dummies/BehaviorWithConfigurationContext.cs index b6b0775..8c674c1 100644 --- a/source/Appccelerate.Bootstrapper.Specs/Dummies/BehaviorWithConfigurationContext.cs +++ b/source/Appccelerate.Bootstrapper.Specs/Dummies/BehaviorWithConfigurationContext.cs @@ -39,13 +39,7 @@ public BehaviorWithConfigurationContext(IDictionary configuratio } /// - public string Name - { - get - { - return this.GetType().FullNameToString(); - } - } + public string Name => this.GetType().FullNameToString(); /// public void Behave(IEnumerable extensions) diff --git a/source/Appccelerate.Bootstrapper.Specs/NuGet.config b/source/Appccelerate.Bootstrapper.Specs/NuGet.config deleted file mode 100644 index 5d5bc35..0000000 --- a/source/Appccelerate.Bootstrapper.Specs/NuGet.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper.Specs/Properties/AssemblyInfo.cs b/source/Appccelerate.Bootstrapper.Specs/Properties/AssemblyInfo.cs deleted file mode 100644 index 52f2bcc..0000000 --- a/source/Appccelerate.Bootstrapper.Specs/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,25 +0,0 @@ -//------------------------------------------------------------------------------- -// -// Copyright (c) 2008-2015 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------- - -using System.Reflection; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Appccelerate.Bootstrapper.Specification")] -[assembly: AssemblyDescription("")] diff --git a/source/Appccelerate.Bootstrapper.Specs/Properties/GlobalAssemblyInfo.cs b/source/Appccelerate.Bootstrapper.Specs/Properties/GlobalAssemblyInfo.cs deleted file mode 100644 index 21da808..0000000 --- a/source/Appccelerate.Bootstrapper.Specs/Properties/GlobalAssemblyInfo.cs +++ /dev/null @@ -1,34 +0,0 @@ -//------------------------------------------------------------------------------- -// -// Copyright (c) 2008-2015 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------- - -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyCompany("Appccelerate")] -[assembly: AssemblyProduct("Appccelerate")] -[assembly: AssemblyCopyright("Copyright © 2008-2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] diff --git a/source/Appccelerate.Bootstrapper.Specs/Settings.stylecop b/source/Appccelerate.Bootstrapper.Specs/Settings.stylecop deleted file mode 100644 index 0377285..0000000 --- a/source/Appccelerate.Bootstrapper.Specs/Settings.stylecop +++ /dev/null @@ -1,100 +0,0 @@ - - - True - NoMerge - - - - - - \.g\.cs$ - \.Designer\.cs$ - \.generated\.cs$ - \.g\.i\.cs$ - TemporaryGeneratedFile_.*\.cs$ - AssemblyInfo_.*\.cs$ - - - - - - - - - - False - - - - - False - - - - - False - - - - - False - - - - - Appccelerate - Copyright (c) 2008-2015 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - - - - - - False - - - - - False - - - - - False - - - - - - - - - - False - - - - - False - - - - - False - - - - - - - - - - False - - - - - - - \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper.Specs/packages.config b/source/Appccelerate.Bootstrapper.Specs/packages.config deleted file mode 100644 index c19a3e0..0000000 --- a/source/Appccelerate.Bootstrapper.Specs/packages.config +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_run.cs b/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_run.cs index c83417d..4f730bb 100644 --- a/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_run.cs +++ b/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_run.cs @@ -18,64 +18,73 @@ namespace Appccelerate.Bootstrapper { + using Dummies; using System.Collections.Generic; - using System.Linq; - using Appccelerate.Bootstrapper.Dummies; using FluentAssertions; - using Machine.Specifications; + using Xunit; - [Subject(Concern)] - public class When_the_bootstrapper_is_run : BootstrapperSpecification + public class WhenTheBootstrapperIsRun { - Establish context = () => - { - Bootstrapper.Initialize(Strategy); - Bootstrapper.AddExtension(First); - Bootstrapper.AddExtension(Second); - }; + private readonly Queue sequenceQueue; + private readonly CustomExtensionStrategy strategy; + private readonly FirstExtension first; + private readonly SecondExtension second; - Because of = () => - { - Bootstrapper.Run(); - }; + public WhenTheBootstrapperIsRun() + { + sequenceQueue = new Queue(); + strategy = new CustomExtensionStrategy(sequenceQueue); + first = new FirstExtension(sequenceQueue); + second = new SecondExtension(sequenceQueue); - It should_only_initialize_contexts_once_for_all_extensions = () => - { - Strategy.RunConfigurationInitializerAccessCounter.Should().Be(1); - }; + var bootstrapper = new DefaultBootstrapper(); + bootstrapper.Initialize(strategy); + bootstrapper.AddExtension(first); + bootstrapper.AddExtension(second); + bootstrapper.Run(); + } - It should_pass_the_initialized_values_from_the_contexts_to_the_extensions = () => + [Fact] + public void should_only_initialize_contexts_once_for_all_extensions() + { + strategy.RunConfigurationInitializerAccessCounter.Should().Be(1); + } + + [Fact] + public void should_pass_the_initialized_values_from_the_contexts_to_the_extensions() + { + var expected = new Dictionary { - var expected = new Dictionary - { - { "RunTest", "RunTestValue" } - }; + { "RunTest", "RunTestValue" } + }; - First.RunConfiguration.Should().Equal(expected); - Second.RunConfiguration.Should().Equal(expected); + first.RunConfiguration.Should().Equal(expected); + second.RunConfiguration.Should().Equal(expected); - First.Registered.Should().Be("RunTest"); - Second.Registered.Should().Be("RunTest"); - }; + first.Registered.Should().Be("RunTest"); + second.Registered.Should().Be("RunTest"); + } - It should_execute_the_extensions_and_the_extension_points_according_to_the_strategy_defined_order = () => + [Fact] + public void should_execute_the_extensions_and_the_extension_points_according_to_the_strategy_defined_order() + { + sequenceQueue.Should().HaveCount(9, sequenceQueue.Flatten()); + sequenceQueue.Should().BeEquivalentTo(new[] { - var sequence = SequenceQueue; + "Action: CustomRun", - sequence.Should().HaveCount(9, sequence.Flatten()); - sequence.ElementAt(0).Should().BeEquivalentTo("Action: CustomRun"); + "FirstExtension: Start", + "SecondExtension: Start", - sequence.ElementAt(1).Should().BeEquivalentTo("FirstExtension: Start"); - sequence.ElementAt(2).Should().BeEquivalentTo("SecondExtension: Start"); + "FirstExtension: Configure", + "SecondExtension: Configure", - sequence.ElementAt(3).Should().BeEquivalentTo("FirstExtension: Configure"); - sequence.ElementAt(4).Should().BeEquivalentTo("SecondExtension: Configure"); + "FirstExtension: Initialize", + "SecondExtension: Initialize", - sequence.ElementAt(5).Should().BeEquivalentTo("FirstExtension: Initialize"); - sequence.ElementAt(6).Should().BeEquivalentTo("SecondExtension: Initialize"); - - sequence.ElementAt(7).Should().BeEquivalentTo("FirstExtension: Register"); - sequence.ElementAt(8).Should().BeEquivalentTo("SecondExtension: Register"); - }; + "FirstExtension: Register", + "SecondExtension: Register" + }); + } } } \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_run_with_behavior_attached.cs b/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_run_with_behavior_attached.cs index e0e7b5d..e3a2765 100644 --- a/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_run_with_behavior_attached.cs +++ b/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_run_with_behavior_attached.cs @@ -18,92 +18,101 @@ namespace Appccelerate.Bootstrapper { + using Dummies; using System.Collections.Generic; - using System.Linq; - using Appccelerate.Bootstrapper.Dummies; using FluentAssertions; - using Machine.Specifications; + using Xunit; - [Subject(Concern)] - public class When_the_bootstrapper_is_run_with_behavior_attached : BootstrapperWithBehaviorSpecification + public class WhenTheBootstrapperIsRunWithBehaviorAttached { - Establish context = () => - { - Bootstrapper.Initialize(Strategy); - Bootstrapper.AddExtension(First); - Bootstrapper.AddExtension(Second); - }; + private readonly Queue sequenceQueue; + private readonly CustomExtensionWithBehaviorStrategy strategy; + private readonly FirstExtension first; + private readonly SecondExtension second; - Because of = () => + public WhenTheBootstrapperIsRunWithBehaviorAttached() { - Bootstrapper.Run(); - }; + sequenceQueue = new Queue(); + strategy = new CustomExtensionWithBehaviorStrategy(sequenceQueue); + first = new FirstExtension(sequenceQueue); + second = new SecondExtension(sequenceQueue); + + var bootstrapper = new DefaultBootstrapper(); + bootstrapper.Initialize(strategy); + bootstrapper.AddExtension(first); + bootstrapper.AddExtension(second); + bootstrapper.Run(); + } - It should_only_initialize_contexts_once_for_all_extensions = () => + [Fact] + public void should_only_initialize_contexts_once_for_all_extensions() { - Strategy.RunConfigurationInitializerAccessCounter.Should().Be(1); - }; + strategy.RunConfigurationInitializerAccessCounter.Should().Be(1); + } - It should_pass_the_initialized_values_from_the_contexts_to_the_extensions = () => + [Fact] + public void should_pass_the_initialized_values_from_the_contexts_to_the_extensions() { var expected = new Dictionary - { - { "RunTest", "RunTestValue" }, - { "RunFirstValue", "RunTestValue" }, - { "RunSecondValue", "RunTestValue" }, - }; + { + { "RunTest", "RunTestValue" }, + { "RunFirstValue", "RunTestValue" }, + { "RunSecondValue", "RunTestValue" }, + }; - First.RunConfiguration.Should().Equal(expected); - Second.RunConfiguration.Should().Equal(expected); + first.RunConfiguration.Should().Equal(expected); + second.RunConfiguration.Should().Equal(expected); - First.Registered.Should().Be("RunTest"); - Second.Registered.Should().Be("RunTest"); - }; + first.Registered.Should().Be("RunTest"); + second.Registered.Should().Be("RunTest"); + } - It should_execute_the_extensions_with_its_extension_points_and_the_behaviors_according_to_the_strategy_defined_order = () => + [Fact] + public void should_execute_the_extensions_with_its_extension_points_and_the_behaviors_according_to_the_strategy_defined_order() { - var sequence = SequenceQueue; - - sequence.Should().HaveCount(33, sequence.Flatten()); - sequence.ElementAt(0).Should().BeEquivalentTo("FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at run first beginning."); - sequence.ElementAt(1).Should().BeEquivalentTo("SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at run first beginning."); - sequence.ElementAt(2).Should().BeEquivalentTo("FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at run second beginning."); - sequence.ElementAt(3).Should().BeEquivalentTo("SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at run second beginning."); + sequenceQueue.Should().HaveCount(33, sequenceQueue.Flatten()); + sequenceQueue.Should().BeEquivalentTo(new[] + { + "FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at run first beginning.", + "SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at run first beginning.", + "FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at run second beginning.", + "SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at run second beginning.", - sequence.ElementAt(4).Should().BeEquivalentTo("Action: CustomRun"); + "Action: CustomRun", - sequence.ElementAt(5).Should().BeEquivalentTo("FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at run first start."); - sequence.ElementAt(6).Should().BeEquivalentTo("SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at run first start."); - sequence.ElementAt(7).Should().BeEquivalentTo("FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at run second start."); - sequence.ElementAt(8).Should().BeEquivalentTo("SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at run second start."); - sequence.ElementAt(9).Should().BeEquivalentTo("FirstExtension: Start"); - sequence.ElementAt(10).Should().BeEquivalentTo("SecondExtension: Start"); + "FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at run first start.", + "SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at run first start.", + "FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at run second start.", + "SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at run second start.", + "FirstExtension: Start", + "SecondExtension: Start", - sequence.ElementAt(11).Should().BeEquivalentTo("FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at configuration modification with RunFirstValue = RunTestValue."); - sequence.ElementAt(12).Should().BeEquivalentTo("SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at configuration modification with RunFirstValue = RunTestValue."); - sequence.ElementAt(13).Should().BeEquivalentTo("FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at configuration modification with RunSecondValue = RunTestValue."); - sequence.ElementAt(14).Should().BeEquivalentTo("SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at configuration modification with RunSecondValue = RunTestValue."); - sequence.ElementAt(15).Should().BeEquivalentTo("FirstExtension: Configure"); - sequence.ElementAt(16).Should().BeEquivalentTo("SecondExtension: Configure"); + "FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at configuration modification with RunFirstValue = RunTestValue.", + "SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at configuration modification with RunFirstValue = RunTestValue.", + "FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at configuration modification with RunSecondValue = RunTestValue.", + "SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at configuration modification with RunSecondValue = RunTestValue.", + "FirstExtension: Configure", + "SecondExtension: Configure", - sequence.ElementAt(17).Should().BeEquivalentTo("FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at run first initialize."); - sequence.ElementAt(18).Should().BeEquivalentTo("SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at run first initialize."); - sequence.ElementAt(19).Should().BeEquivalentTo("FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at run second initialize."); - sequence.ElementAt(20).Should().BeEquivalentTo("SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at run second initialize."); - sequence.ElementAt(21).Should().BeEquivalentTo("FirstExtension: Initialize"); - sequence.ElementAt(22).Should().BeEquivalentTo("SecondExtension: Initialize"); + "FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at run first initialize.", + "SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at run first initialize.", + "FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at run second initialize.", + "SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at run second initialize.", + "FirstExtension: Initialize", + "SecondExtension: Initialize", - sequence.ElementAt(23).Should().BeEquivalentTo("FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at input modification with RunTestValueFirst."); - sequence.ElementAt(24).Should().BeEquivalentTo("SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at input modification with RunTestValueFirst."); - sequence.ElementAt(25).Should().BeEquivalentTo("FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at input modification with RunTestValueSecond."); - sequence.ElementAt(26).Should().BeEquivalentTo("SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at input modification with RunTestValueSecond."); - sequence.ElementAt(27).Should().BeEquivalentTo("FirstExtension: Register"); - sequence.ElementAt(28).Should().BeEquivalentTo("SecondExtension: Register"); + "FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at input modification with RunTestValueFirst.", + "SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at input modification with RunTestValueFirst.", + "FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at input modification with RunTestValueSecond.", + "SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at input modification with RunTestValueSecond.", + "FirstExtension: Register", + "SecondExtension: Register", - sequence.ElementAt(29).Should().BeEquivalentTo("FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at run first end."); - sequence.ElementAt(30).Should().BeEquivalentTo("SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at run first end."); - sequence.ElementAt(31).Should().BeEquivalentTo("FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at run second end."); - sequence.ElementAt(32).Should().BeEquivalentTo("SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at run second end."); - }; + "FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at run first end.", + "SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at run first end.", + "FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at run second end.", + "SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at run second end.", + }); + } } } \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_run_with_configuration_section_behavior_and_extension_with_customized_loading.cs b/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_run_with_configuration_section_behavior_and_extension_with_customized_loading.cs index c5bd899..9dc9dff 100644 --- a/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_run_with_configuration_section_behavior_and_extension_with_customized_loading.cs +++ b/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_run_with_configuration_section_behavior_and_extension_with_customized_loading.cs @@ -18,50 +18,49 @@ namespace Appccelerate.Bootstrapper { - using Appccelerate.Bootstrapper.Dummies; + using Dummies; using FluentAssertions; - using Machine.Specifications; + using Xunit; - [Subject(Concern)] - public class When_the_bootstrapper_is_run_with_configuration_section_behavior_and_extension_with_customized_loading : BootstrapperWithConfigurationSectionBehaviorSpecification + public class WhenTheBootstrapperIsRunWithConfigurationSectionBehaviorAndExtensionWithCustomizedLoading { - protected static CustomExtensionWithConfigurationWhichKnowsNameAndWhereToLoadFrom NameAndWhereToLoadFromExtension; - protected static CustomExtensionWithConfigurationWhichKnowsWhereToLoadFrom WhereToLoadFromExtension; + private readonly CustomExtensionWithConfigurationWhichKnowsNameAndWhereToLoadFrom nameAndWhereToLoadFromExtension; + private readonly CustomExtensionWithConfigurationWhichKnowsWhereToLoadFrom whereToLoadFromExtension; - Establish context = () => + public WhenTheBootstrapperIsRunWithConfigurationSectionBehaviorAndExtensionWithCustomizedLoading() { - NameAndWhereToLoadFromExtension = new CustomExtensionWithConfigurationWhichKnowsNameAndWhereToLoadFrom(); - WhereToLoadFromExtension = new CustomExtensionWithConfigurationWhichKnowsWhereToLoadFrom(); - - Bootstrapper.Initialize(Strategy); + nameAndWhereToLoadFromExtension = new CustomExtensionWithConfigurationWhichKnowsNameAndWhereToLoadFrom(); + whereToLoadFromExtension = new CustomExtensionWithConfigurationWhichKnowsWhereToLoadFrom(); - Bootstrapper.AddExtension(NameAndWhereToLoadFromExtension); - Bootstrapper.AddExtension(WhereToLoadFromExtension); - }; + var bootstrapper = new DefaultBootstrapper(); + var strategy = new CustomExtensionWithConfigurationStrategy(); + bootstrapper.Initialize(strategy); + bootstrapper.AddExtension(nameAndWhereToLoadFromExtension); + bootstrapper.AddExtension(whereToLoadFromExtension); + bootstrapper.Run(); + } - Because of = () => + [Fact] + public void should_apply_configuration_section() { - Bootstrapper.Run(); - }; + nameAndWhereToLoadFromExtension.AppliedSection.Should().NotBeNull(); + nameAndWhereToLoadFromExtension.AppliedSection.Context.Should().Be("KnowsName|KnowsLoading"); - It should_apply_configuration_section = () => - { - NameAndWhereToLoadFromExtension.AppliedSection.Should().NotBeNull(); - NameAndWhereToLoadFromExtension.AppliedSection.Context.Should().Be("KnowsName|KnowsLoading"); + whereToLoadFromExtension.AppliedSection.Should().NotBeNull(); + whereToLoadFromExtension.AppliedSection.Context.Should().Be("KnowsLoading"); + } - WhereToLoadFromExtension.AppliedSection.Should().NotBeNull(); - WhereToLoadFromExtension.AppliedSection.Context.Should().Be("KnowsLoading"); - }; - - It should_acquire_section_name = () => - { - NameAndWhereToLoadFromExtension.SectionNameAcquired.Should().BeTrue(); - }; + [Fact] + public void should_acquire_section_name() + { + nameAndWhereToLoadFromExtension.SectionNameAcquired.Should().BeTrue(); + } - It should_acquire_section = () => + [Fact] + public void should_acquire_section() { - NameAndWhereToLoadFromExtension.SectionAcquired.Should().Be("FakeConfigurationSection"); - WhereToLoadFromExtension.SectionAcquired.Should().Be("CustomExtensionWithConfigurationWhichKnowsWhereToLoadFrom"); - }; + nameAndWhereToLoadFromExtension.SectionAcquired.Should().Be("FakeConfigurationSection"); + whereToLoadFromExtension.SectionAcquired.Should().Be("CustomExtensionWithConfigurationWhichKnowsWhereToLoadFrom"); + } } } \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_run_with_extension_configuration_section_behavior_and_extension_with_customized_loading.cs b/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_run_with_extension_configuration_section_behavior_and_extension_with_customized_loading.cs index a533e51..5b4b00b 100644 --- a/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_run_with_extension_configuration_section_behavior_and_extension_with_customized_loading.cs +++ b/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_run_with_extension_configuration_section_behavior_and_extension_with_customized_loading.cs @@ -18,62 +18,65 @@ namespace Appccelerate.Bootstrapper { - using Appccelerate.Bootstrapper.Dummies; + using Dummies; using FluentAssertions; - using Machine.Specifications; + using Xunit; - [Subject(Concern)] - public class When_the_bootstrapper_is_run_with_extension_configuration_section_behavior_and_extension_with_customized_loading : BootstrapperWithExtensionConfigurationSectionBehaviorSpecification + public class WhenTheBootstrapperIsRunWithExtensionConfigurationSectionBehaviorAndExtensionWithCustomizedLoading { - protected static CustomExtensionWithExtensionConfigurationWhichHasCallbacks WithCallbacksExtension; + private readonly CustomExtensionWithExtensionConfigurationWhichHasCallbacks withCallbacksExtension; + private readonly CustomExtensionWithExtensionConfigurationWhichConsumesConfiguration whichConsumesConfigurationExtension; - protected static CustomExtensionWithExtensionConfigurationWhichConsumesConfiguration WhichConsumesConfigurationExtension; - - Establish context = () => - { - WithCallbacksExtension = new CustomExtensionWithExtensionConfigurationWhichHasCallbacks(); - WhichConsumesConfigurationExtension = new CustomExtensionWithExtensionConfigurationWhichConsumesConfiguration(); - - Bootstrapper.Initialize(Strategy); - - Bootstrapper.AddExtension(WithCallbacksExtension); - Bootstrapper.AddExtension(WhichConsumesConfigurationExtension); - }; + public WhenTheBootstrapperIsRunWithExtensionConfigurationSectionBehaviorAndExtensionWithCustomizedLoading() + { + var strategy = new CustomExtensionWithExtensionConfigurationStrategy(); + withCallbacksExtension = new CustomExtensionWithExtensionConfigurationWhichHasCallbacks(); + whichConsumesConfigurationExtension = new CustomExtensionWithExtensionConfigurationWhichConsumesConfiguration(); - Because of = () => - { - Bootstrapper.Run(); - }; + IBootstrapper bootstrapper = + new DefaultBootstrapper(); + bootstrapper.Initialize(strategy); + bootstrapper.AddExtension(withCallbacksExtension); + bootstrapper.AddExtension(whichConsumesConfigurationExtension); + bootstrapper.Run(); + } - It should_use_default_conversion_callback = () => + [Fact] + public void should_use_default_conversion_callback() { - WithCallbacksExtension.SomeStringWithDefault.Should().Be("SomeStringWithDefault. Modified by Default!"); - }; + withCallbacksExtension.SomeStringWithDefault.Should().Be("SomeStringWithDefault. Modified by Default!"); + } - It should_use_conversion_callbacks = () => + [Fact] + public void should_use_conversion_callbacks() { - WithCallbacksExtension.SomeString.Should().Be("SomeString. Modified by Callback!"); - WithCallbacksExtension.SomeInt.Should().Be(1); - }; + withCallbacksExtension.SomeString.Should().Be("SomeString. Modified by Callback!"); + withCallbacksExtension.SomeInt.Should().Be(1); + } - It should_ignore_not_configured_properties = () => + [Fact] + public void should_ignore_not_configured_properties() { - WithCallbacksExtension.SomeStringWhichIsIgnored.Should().BeNull(); - }; + withCallbacksExtension.SomeStringWhichIsIgnored.Should().BeNull(); + } - It should_propagate_configuration = () => - { - WhichConsumesConfigurationExtension.Configuration.Should() - .HaveCount(3) - .And.Contain("SomeInt", "1") - .And.Contain("SomeString", "SomeString") - .And.Contain("SomeStringWithDefault", "SomeStringWithDefault"); - }; + [Fact] + public void should_propagate_configuration() + { + whichConsumesConfigurationExtension.Configuration.Should() + .HaveCount(3) + .And.Contain("SomeInt", "1") + .And.Contain("SomeString", "SomeString") + .And.Contain("SomeStringWithDefault", "SomeStringWithDefault"); + } - It should_acquire_section = () => - { - WithCallbacksExtension.SectionAcquired.Should().Be("CustomExtensionWithExtensionConfigurationWhichHasCallbacks"); - WhichConsumesConfigurationExtension.SectionAcquired.Should().Be("CustomExtensionWithExtensionConfigurationWhichConsumesConfiguration"); - }; + [Fact] + public void should_acquire_section() + { + withCallbacksExtension.SectionAcquired.Should() + .Be("CustomExtensionWithExtensionConfigurationWhichHasCallbacks"); + whichConsumesConfigurationExtension.SectionAcquired.Should() + .Be("CustomExtensionWithExtensionConfigurationWhichConsumesConfiguration"); + } } } \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_shutdown.cs b/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_shutdown.cs index d95dfde..3aa9c22 100644 --- a/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_shutdown.cs +++ b/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_shutdown.cs @@ -18,61 +18,70 @@ namespace Appccelerate.Bootstrapper { + using Dummies; using System.Collections.Generic; - using System.Linq; - using Appccelerate.Bootstrapper.Dummies; using FluentAssertions; - using Machine.Specifications; + using Xunit; - [Subject(Concern)] - public class When_the_bootstrapper_is_shutdown : BootstrapperSpecification + public class WhenTheBootstrapperIsShutdown { - Establish context = () => - { - Bootstrapper.Initialize(Strategy); - Bootstrapper.AddExtension(First); - Bootstrapper.AddExtension(Second); - }; + private readonly Queue sequenceQueue; + private readonly CustomExtensionStrategy strategy; + private readonly FirstExtension first; + private readonly SecondExtension second; - Because of = () => + public WhenTheBootstrapperIsShutdown() { - Bootstrapper.Shutdown(); - }; + sequenceQueue = new Queue(); + strategy = new CustomExtensionStrategy(sequenceQueue); + first = new FirstExtension(sequenceQueue); + second = new SecondExtension(sequenceQueue); + + var bootstrapper = new DefaultBootstrapper(); + bootstrapper.Initialize(strategy); + bootstrapper.AddExtension(first); + bootstrapper.AddExtension(second); + bootstrapper.Shutdown(); + } - It should_only_initialize_contexts_once_for_all_extensions = () => + [Fact] + public void should_only_initialize_contexts_once_for_all_extensions() { - Strategy.ShutdownConfigurationInitializerAccessCounter.Should().Be(1); - }; + strategy.ShutdownConfigurationInitializerAccessCounter.Should().Be(1); + } - It should_pass_the_initialized_values_from_the_contexts_to_the_extensions = () => + [Fact] + public void should_pass_the_initialized_values_from_the_contexts_to_the_extensions() { var expected = new Dictionary - { - { "ShutdownTest", "ShutdownTestValue" } - }; + { + { "ShutdownTest", "ShutdownTestValue" } + }; - First.ShutdownConfiguration.Should().Equal(expected); - Second.ShutdownConfiguration.Should().Equal(expected); + first.ShutdownConfiguration.Should().Equal(expected); + second.ShutdownConfiguration.Should().Equal(expected); - First.Unregistered.Should().Be("ShutdownTest"); - Second.Unregistered.Should().Be("ShutdownTest"); - }; + first.Unregistered.Should().Be("ShutdownTest"); + second.Unregistered.Should().Be("ShutdownTest"); + } - It should_execute_the_extensions_and_the_extension_points_according_to_the_strategy_defined_order = () => + [Fact] + public void should_execute_the_extensions_and_the_extension_points_according_to_the_strategy_defined_order() { - var sequence = SequenceQueue; - - sequence.Should().HaveCount(7, sequence.Flatten()); - sequence.ElementAt(0).Should().StartWith("Action: CustomShutdown"); + sequenceQueue.Should().HaveCount(7, sequenceQueue.Flatten()); + sequenceQueue.Should().BeEquivalentTo(new[] + { + "Action: CustomShutdown", - sequence.ElementAt(1).Should().StartWith("SecondExtension: Unregister"); - sequence.ElementAt(2).Should().StartWith("FirstExtension: Unregister"); + "SecondExtension: Unregister", + "FirstExtension: Unregister", - sequence.ElementAt(3).Should().StartWith("SecondExtension: DeConfigure"); - sequence.ElementAt(4).Should().StartWith("FirstExtension: DeConfigure"); + "SecondExtension: DeConfigure", + "FirstExtension: DeConfigure", - sequence.ElementAt(5).Should().StartWith("SecondExtension: Stop"); - sequence.ElementAt(6).Should().StartWith("FirstExtension: Stop"); - }; + "SecondExtension: Stop", + "FirstExtension: Stop" + }); + } } } \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_shutdown_with_behavior_attached.cs b/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_shutdown_with_behavior_attached.cs index 8abd3af..9f13043 100644 --- a/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_shutdown_with_behavior_attached.cs +++ b/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapper_is_shutdown_with_behavior_attached.cs @@ -18,88 +18,96 @@ namespace Appccelerate.Bootstrapper { + using Dummies; using System.Collections.Generic; - using System.Linq; - using Appccelerate.Bootstrapper.Dummies; using FluentAssertions; - using Machine.Specifications; + using Xunit; - [Subject(Concern)] - public class When_the_bootstrapper_is_shutdown_with_behavior_attached : BootstrapperWithBehaviorSpecification + public class WhenTheBootstrapperIsShutdownWithBehaviorAttached { - Establish context = () => - { - Bootstrapper.Initialize(Strategy); - Bootstrapper.AddExtension(First); - Bootstrapper.AddExtension(Second); - }; + private readonly Queue sequenceQueue; + private readonly CustomExtensionWithBehaviorStrategy strategy; + private readonly FirstExtension first; + private readonly SecondExtension second; - Because of = () => + public WhenTheBootstrapperIsShutdownWithBehaviorAttached() { - Bootstrapper.Shutdown(); - }; + sequenceQueue = new Queue(); + strategy = new CustomExtensionWithBehaviorStrategy(sequenceQueue); + first = new FirstExtension(sequenceQueue); + second = new SecondExtension(sequenceQueue); + + var bootstrapper = new DefaultBootstrapper(); + bootstrapper.Initialize(strategy); + bootstrapper.AddExtension(first); + bootstrapper.AddExtension(second); + bootstrapper.Shutdown(); + } - It should_only_initialize_contexts_once_for_all_extensions = () => + [Fact] + public void should_only_initialize_contexts_once_for_all_extensions() { - Strategy.ShutdownConfigurationInitializerAccessCounter.Should().Be(1); - }; + strategy.ShutdownConfigurationInitializerAccessCounter.Should().Be(1); + } - It should_pass_the_initialized_values_from_the_contexts_to_the_extensions = () => + [Fact] + public void should_pass_the_initialized_values_from_the_contexts_to_the_extensions() { var expected = new Dictionary - { - { "ShutdownTest", "ShutdownTestValue" }, - { "ShutdownFirstValue", "ShutdownTestValue" }, - { "ShutdownSecondValue", "ShutdownTestValue" }, - }; + { + { "ShutdownTest", "ShutdownTestValue" }, + { "ShutdownFirstValue", "ShutdownTestValue" }, + { "ShutdownSecondValue", "ShutdownTestValue" }, + }; - First.ShutdownConfiguration.Should().Equal(expected); - Second.ShutdownConfiguration.Should().Equal(expected); + first.ShutdownConfiguration.Should().Equal(expected); + second.ShutdownConfiguration.Should().Equal(expected); - First.Unregistered.Should().Be("ShutdownTest"); - Second.Unregistered.Should().Be("ShutdownTest"); - }; + first.Unregistered.Should().Be("ShutdownTest"); + second.Unregistered.Should().Be("ShutdownTest"); + } - It should_execute_the_extensions_with_its_extension_points_and_the_behaviors_according_to_the_strategy_defined_order = () => + [Fact] + public void should_execute_the_extensions_with_its_extension_points_and_the_behaviors_according_to_the_strategy_defined_order() { - var sequence = SequenceQueue; - - sequence.Should().HaveCount(29, sequence.Flatten()); - sequence.ElementAt(0).Should().BeEquivalentTo("SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at shutdown first beginning."); - sequence.ElementAt(1).Should().BeEquivalentTo("FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at shutdown first beginning."); - sequence.ElementAt(2).Should().BeEquivalentTo("SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at shutdown second beginning."); - sequence.ElementAt(3).Should().BeEquivalentTo("FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at shutdown second beginning."); - - sequence.ElementAt(4).Should().BeEquivalentTo("Action: CustomShutdown"); + sequenceQueue.Should().HaveCount(29, sequenceQueue.Flatten()); + sequenceQueue.Should().BeEquivalentTo(new[] + { + "SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at shutdown first beginning.", + "FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at shutdown first beginning.", + "SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at shutdown second beginning.", + "FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at shutdown second beginning.", - sequence.ElementAt(5).Should().BeEquivalentTo("SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at input modification with ShutdownTestValueFirst."); - sequence.ElementAt(6).Should().BeEquivalentTo("FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at input modification with ShutdownTestValueFirst."); - sequence.ElementAt(7).Should().BeEquivalentTo("SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at input modification with ShutdownTestValueSecond."); - sequence.ElementAt(8).Should().BeEquivalentTo("FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at input modification with ShutdownTestValueSecond."); - sequence.ElementAt(9).Should().BeEquivalentTo("SecondExtension: Unregister"); - sequence.ElementAt(10).Should().BeEquivalentTo("FirstExtension: Unregister"); + "Action: CustomShutdown", - sequence.ElementAt(11).Should().BeEquivalentTo("SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at configuration modification with ShutdownFirstValue = ShutdownTestValue."); - sequence.ElementAt(12).Should().BeEquivalentTo("FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at configuration modification with ShutdownFirstValue = ShutdownTestValue."); - sequence.ElementAt(13).Should().BeEquivalentTo("SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at configuration modification with ShutdownSecondValue = ShutdownTestValue."); - sequence.ElementAt(14).Should().BeEquivalentTo("FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at configuration modification with ShutdownSecondValue = ShutdownTestValue."); - sequence.ElementAt(15).Should().BeEquivalentTo("SecondExtension: DeConfigure"); - sequence.ElementAt(16).Should().BeEquivalentTo("FirstExtension: DeConfigure"); + "SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at input modification with ShutdownTestValueFirst.", + "FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at input modification with ShutdownTestValueFirst.", + "SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at input modification with ShutdownTestValueSecond.", + "FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at input modification with ShutdownTestValueSecond.", + "SecondExtension: Unregister", + "FirstExtension: Unregister", - sequence.ElementAt(17).Should().BeEquivalentTo("SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at shutdown first stop."); - sequence.ElementAt(18).Should().BeEquivalentTo("FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at shutdown first stop."); - sequence.ElementAt(19).Should().BeEquivalentTo("SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at shutdown second stop."); - sequence.ElementAt(20).Should().BeEquivalentTo("FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at shutdown second stop."); - sequence.ElementAt(21).Should().BeEquivalentTo("SecondExtension: Stop"); - sequence.ElementAt(22).Should().BeEquivalentTo("FirstExtension: Stop"); + "SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at configuration modification with ShutdownFirstValue = ShutdownTestValue.", + "FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at configuration modification with ShutdownFirstValue = ShutdownTestValue.", + "SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at configuration modification with ShutdownSecondValue = ShutdownTestValue.", + "FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at configuration modification with ShutdownSecondValue = ShutdownTestValue.", + "SecondExtension: DeConfigure", + "FirstExtension: DeConfigure", - sequence.ElementAt(23).Should().BeEquivalentTo("SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at shutdown first end."); - sequence.ElementAt(24).Should().BeEquivalentTo("FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at shutdown first end."); - sequence.ElementAt(25).Should().BeEquivalentTo("SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at shutdown second end."); - sequence.ElementAt(26).Should().BeEquivalentTo("FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at shutdown second end."); + "SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at shutdown first stop.", + "FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at shutdown first stop.", + "SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at shutdown second stop.", + "FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at shutdown second stop.", + "SecondExtension: Stop", + "FirstExtension: Stop", - sequence.ElementAt(27).Should().BeEquivalentTo("SecondExtension: Dispose"); - sequence.ElementAt(28).Should().BeEquivalentTo("FirstExtension: Dispose"); - }; + "SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at shutdown first end.", + "FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at shutdown first end.", + "SecondExtension: Behaving on Appccelerate.Bootstrapper.Dummies.SecondExtension at shutdown second end.", + "FirstExtension: Behaving on Appccelerate.Bootstrapper.Dummies.FirstExtension at shutdown second end.", + "SecondExtension: Dispose", + "FirstExtension: Dispose" + }); + } } } \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapping_process_is_reported.cs b/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapping_process_is_reported.cs index e77747d..fc67c61 100644 --- a/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapping_process_is_reported.cs +++ b/source/Appccelerate.Bootstrapper.Specs/when_the_bootstrapping_process_is_reported.cs @@ -18,103 +18,157 @@ namespace Appccelerate.Bootstrapper { + using Dummies; + using Reporting; + using Helpers; + using System; using System.Collections.Generic; + using System.Collections.ObjectModel; using System.Globalization; using System.Linq; using System.Text; - using Appccelerate.Bootstrapper.Helpers; - using Appccelerate.Bootstrapper.Reporting; using FluentAssertions; - using Machine.Specifications; + using Xunit; - [Subject(Concern)] - public class When_the_bootstrapping_process_is_reported : BootstrapperReportingSpecification + public class WhenTheBootstrappingProcessIsReported { - private static StringReporter ExpectedContextReporter; - private static StringReporter InterceptingContextReporter; + private readonly StringReporter expectedContextReporter; + private readonly StringReporter interceptingContextReporter; - Establish context = () => + public WhenTheBootstrappingProcessIsReported() { - ExpectedContextReporter = new StringReporter(); - InterceptingContextReporter = new StringReporter(); + var reporters = new ReporterCollection + { + new InterceptingReporter(ctx => { }) + }; + var sequenceQueue = new Queue(); + var strategy = new CustomExtensionWithBehaviorStrategy(sequenceQueue); + var first = new FirstExtension(sequenceQueue); + var second = new SecondExtension(sequenceQueue); - Bootstrapper.Initialize(Strategy); - Bootstrapper.AddExtension(First); - Bootstrapper.AddExtension(Second); + IBootstrapper bootstrapper = new DefaultBootstrapper(reporters); + bootstrapper.Initialize(strategy); + bootstrapper.AddExtension(first); + bootstrapper.AddExtension(second); - RegisterReporter(InterceptingContextReporter); - }; + expectedContextReporter = new StringReporter(); + interceptingContextReporter = new StringReporter(); + reporters.Add(interceptingContextReporter); + + bootstrapper.Run(); + bootstrapper.Shutdown(); + bootstrapper.Dispose(); + } - Because of = () => + [Fact] + public void + should_report_names_and_descriptions_of_all_extensions_including_executables_with_behaviors_attached_to_it_and_run_and_shutdown_executors() { - Bootstrapper.Run(); - Bootstrapper.Shutdown(); - Bootstrapper.Dispose(); - }; + const string ActionExecutableCustomExtension = + "Appccelerate.Bootstrapper.Syntax.Executables.ActionExecutable"; + const string ActionOnExtensionExecutableCustomExtension = + "Appccelerate.Bootstrapper.Syntax.Executables.ActionOnExtensionExecutable"; + const string ActionExecutableWithDictionaryContextCustomExtension = + "Appccelerate.Bootstrapper.Syntax.Executables.ActionOnExtensionWithInitializerExecutable,Appccelerate.Bootstrapper.Dummies.ICustomExtension>"; + const string ActionExecutableWithStringContextCustomExtension = + "Appccelerate.Bootstrapper.Syntax.Executables.ActionOnExtensionWithInitializerExecutable"; - It should_report_names_and_descriptions_of_all_extensions_including_executables_with_behaviors_attached_to_it_and_run_and_shutdown_executors = () => - { - const string ActionExecutableCustomExtension = "Appccelerate.Bootstrapper.Syntax.Executables.ActionExecutable"; - const string ActionOnExtensionExecutableCustomExtension = "Appccelerate.Bootstrapper.Syntax.Executables.ActionOnExtensionExecutable"; - const string ActionExecutableWithDictionaryContextCustomExtension = "Appccelerate.Bootstrapper.Syntax.Executables.ActionOnExtensionWithInitializerExecutable,Appccelerate.Bootstrapper.Dummies.ICustomExtension>"; - const string ActionExecutableWithStringContextCustomExtension = "Appccelerate.Bootstrapper.Syntax.Executables.ActionOnExtensionWithInitializerExecutable"; - - const string BehaviorCustomExtension = "Appccelerate.Bootstrapper.Dummies.Behavior"; - const string LazyBehaviorCustomExtension = "Appccelerate.Bootstrapper.Behavior.LazyBehavior"; - const string BehaviorWithConfigurationContextCustomExtension = "Appccelerate.Bootstrapper.Dummies.BehaviorWithConfigurationContext"; - const string BehaviorWithStringContextCustomExtension = "Appccelerate.Bootstrapper.Dummies.BehaviorWithStringContext"; - - var expectedContext = ReportingContextBuilder.Create() - .Extension("Appccelerate.Bootstrapper.Dummies.FirstExtension", "First Extension") - .Extension("Appccelerate.Bootstrapper.Dummies.SecondExtension", "Second Extension") - .Run("Appccelerate.Bootstrapper.Execution.SynchronousExecutor", "Runs all executables synchronously on the extensions in the order which they were added.") - .Executable(ActionExecutableCustomExtension, "Executes \"() => Invoke(SyntaxBuilder`1.BeginWith)\" during bootstrapping.") - .Behavior(BehaviorCustomExtension, BehaviorCustomExtensionDescriptionWith("run first beginning")) - .Behavior(LazyBehaviorCustomExtension, LazyBehaviorCustomExtensionDescriptionWith("() => new Behavior(\"run second beginning\")")) - .Executable(ActionExecutableCustomExtension, "Executes \"() => value(Appccelerate.Bootstrapper.Dummies.CustomExtensionWithBehaviorStrategy).DumpAction(\"CustomRun\")\" during bootstrapping.") - .Executable(ActionOnExtensionExecutableCustomExtension, "Executes \"extension => extension.Start()\" on each extension during bootstrapping.") - .Behavior(BehaviorCustomExtension, BehaviorCustomExtensionDescriptionWith("run first start")) - .Behavior(LazyBehaviorCustomExtension, LazyBehaviorCustomExtensionDescriptionWith("() => new Behavior(\"run second start\")")) - .Executable(ActionExecutableWithDictionaryContextCustomExtension, "Initializes the context once with \"() => value(Appccelerate.Bootstrapper.Dummies.CustomExtensionWithBehaviorStrategy).RunInitializeConfiguration()\" and executes \"(extension, dictionary) => extension.Configure(dictionary)\" on each extension during bootstrapping.") - .Behavior(BehaviorWithConfigurationContextCustomExtension, BehaviorWithConfigurationContextCustomExtensionDescriptionWith("RunFirstValue", "RunTestValue")) - .Behavior(BehaviorWithConfigurationContextCustomExtension, BehaviorWithConfigurationContextCustomExtensionDescriptionWith("RunSecondValue", "RunTestValue")) - .Executable(ActionOnExtensionExecutableCustomExtension, "Executes \"extension => extension.Initialize()\" on each extension during bootstrapping.") - .Behavior(BehaviorCustomExtension, BehaviorCustomExtensionDescriptionWith("run first initialize")) - .Behavior(LazyBehaviorCustomExtension, LazyBehaviorCustomExtensionDescriptionWith("() => new Behavior(\"run second initialize\")")) - .Executable(ActionExecutableWithStringContextCustomExtension, "Initializes the context once with \"() => \"RunTest\"\" and executes \"(extension, context) => extension.Register(context)\" on each extension during bootstrapping.") - .Behavior(BehaviorWithStringContextCustomExtension, BehaviorWithStringContextCustomExtensionDescriptionWith("RunTestValueFirst")) - .Behavior(BehaviorWithStringContextCustomExtension, BehaviorWithStringContextCustomExtensionDescriptionWith("RunTestValueSecond")) - .Executable(ActionExecutableCustomExtension, "Executes \"() => Invoke(SyntaxBuilder`1.EndWith)\" during bootstrapping.") - .Behavior(BehaviorCustomExtension, BehaviorCustomExtensionDescriptionWith("run first end")) - .Behavior(LazyBehaviorCustomExtension, LazyBehaviorCustomExtensionDescriptionWith("() => new Behavior(\"run second end\")")) - .Shutdown("Appccelerate.Bootstrapper.Execution.SynchronousReverseExecutor", "Runs all executables synchronously on the extensions in the reverse order which they were added.") - .Executable(ActionExecutableCustomExtension, "Executes \"() => Invoke(SyntaxBuilder`1.BeginWith)\" during bootstrapping.") - .Behavior(BehaviorCustomExtension, BehaviorCustomExtensionDescriptionWith("shutdown first beginning")) - .Behavior(LazyBehaviorCustomExtension, LazyBehaviorCustomExtensionDescriptionWith("() => new Behavior(\"shutdown second beginning\")")) - .Executable(ActionExecutableCustomExtension, "Executes \"() => value(Appccelerate.Bootstrapper.Dummies.CustomExtensionWithBehaviorStrategy).DumpAction(\"CustomShutdown\")\" during bootstrapping.") - .Executable(ActionExecutableWithStringContextCustomExtension, "Initializes the context once with \"() => \"ShutdownTest\"\" and executes \"(extension, ctx) => extension.Unregister(ctx)\" on each extension during bootstrapping.") - .Behavior(BehaviorWithStringContextCustomExtension, BehaviorWithStringContextCustomExtensionDescriptionWith("ShutdownTestValueFirst")) - .Behavior(BehaviorWithStringContextCustomExtension, BehaviorWithStringContextCustomExtensionDescriptionWith("ShutdownTestValueSecond")) - .Executable(ActionExecutableWithDictionaryContextCustomExtension, "Initializes the context once with \"() => value(Appccelerate.Bootstrapper.Dummies.CustomExtensionWithBehaviorStrategy).ShutdownInitializeConfiguration()\" and executes \"(extension, dictionary) => extension.DeConfigure(dictionary)\" on each extension during bootstrapping.") - .Behavior(BehaviorWithConfigurationContextCustomExtension, BehaviorWithConfigurationContextCustomExtensionDescriptionWith("ShutdownFirstValue", "ShutdownTestValue")) - .Behavior(BehaviorWithConfigurationContextCustomExtension, BehaviorWithConfigurationContextCustomExtensionDescriptionWith("ShutdownSecondValue", "ShutdownTestValue")) - .Executable(ActionOnExtensionExecutableCustomExtension, "Executes \"extension => extension.Stop()\" on each extension during bootstrapping.") - .Behavior(BehaviorCustomExtension, BehaviorCustomExtensionDescriptionWith("shutdown first stop")) - .Behavior(LazyBehaviorCustomExtension, LazyBehaviorCustomExtensionDescriptionWith("() => new Behavior(\"shutdown second stop\")")) - .Executable(ActionExecutableCustomExtension, "Executes \"() => Invoke(SyntaxBuilder`1.EndWith)\" during bootstrapping.") - .Behavior(BehaviorCustomExtension, BehaviorCustomExtensionDescriptionWith("shutdown first end")) - .Behavior(LazyBehaviorCustomExtension, LazyBehaviorCustomExtensionDescriptionWith("() => new Behavior(\"shutdown second end\")")) - .Behavior("Appccelerate.Bootstrapper.Behavior.DisposeExtensionBehavior", "Disposes all extensions which implement IDisposable.") - .Build(); - - ExpectedContextReporter.Report(expectedContext); - - InterceptingContextReporter.ToString().Should().Be(ExpectedContextReporter.ToString()); - }; + const string BehaviorCustomExtension = "Appccelerate.Bootstrapper.Dummies.Behavior"; + const string LazyBehaviorCustomExtension = + "Appccelerate.Bootstrapper.Behavior.LazyBehavior"; + const string BehaviorWithConfigurationContextCustomExtension = + "Appccelerate.Bootstrapper.Dummies.BehaviorWithConfigurationContext"; + const string BehaviorWithStringContextCustomExtension = + "Appccelerate.Bootstrapper.Dummies.BehaviorWithStringContext"; + + expectedContextReporter.Report(ReportingContextBuilder + .Create() + .Extension("Appccelerate.Bootstrapper.Dummies.FirstExtension", "First Extension") + .Extension("Appccelerate.Bootstrapper.Dummies.SecondExtension", "Second Extension") + .Run( + "Appccelerate.Bootstrapper.Execution.SynchronousExecutor", + "Runs all executables synchronously on the extensions in the order which they were added.") + .Executable(ActionExecutableCustomExtension, + "Executes \"() => Invoke(SyntaxBuilder`1.BeginWith)\" during bootstrapping.") + .Behavior(BehaviorCustomExtension, BehaviorCustomExtensionDescriptionWith("run first beginning")) + .Behavior(LazyBehaviorCustomExtension, + LazyBehaviorCustomExtensionDescriptionWith("() => new Behavior(\"run second beginning\")")) + .Executable(ActionExecutableCustomExtension, + "Executes \"() => value(Appccelerate.Bootstrapper.Dummies.CustomExtensionWithBehaviorStrategy).DumpAction(\"CustomRun\")\" during bootstrapping.") + .Executable(ActionOnExtensionExecutableCustomExtension, + "Executes \"extension => extension.Start()\" on each extension during bootstrapping.") + .Behavior(BehaviorCustomExtension, BehaviorCustomExtensionDescriptionWith("run first start")) + .Behavior(LazyBehaviorCustomExtension, + LazyBehaviorCustomExtensionDescriptionWith("() => new Behavior(\"run second start\")")) + .Executable(ActionExecutableWithDictionaryContextCustomExtension, + "Initializes the context once with \"() => value(Appccelerate.Bootstrapper.Dummies.CustomExtensionWithBehaviorStrategy).RunInitializeConfiguration()\" and executes \"(extension, dictionary) => extension.Configure(dictionary)\" on each extension during bootstrapping.") + .Behavior(BehaviorWithConfigurationContextCustomExtension, + BehaviorWithConfigurationContextCustomExtensionDescriptionWith("RunFirstValue", "RunTestValue")) + .Behavior(BehaviorWithConfigurationContextCustomExtension, + BehaviorWithConfigurationContextCustomExtensionDescriptionWith("RunSecondValue", + "RunTestValue")) + .Executable(ActionOnExtensionExecutableCustomExtension, + "Executes \"extension => extension.Initialize()\" on each extension during bootstrapping.") + .Behavior(BehaviorCustomExtension, BehaviorCustomExtensionDescriptionWith("run first initialize")) + .Behavior(LazyBehaviorCustomExtension, + LazyBehaviorCustomExtensionDescriptionWith("() => new Behavior(\"run second initialize\")")) + .Executable(ActionExecutableWithStringContextCustomExtension, + "Initializes the context once with \"() => \"RunTest\"\" and executes \"(extension, context) => extension.Register(context)\" on each extension during bootstrapping.") + .Behavior(BehaviorWithStringContextCustomExtension, + BehaviorWithStringContextCustomExtensionDescriptionWith("RunTestValueFirst")) + .Behavior(BehaviorWithStringContextCustomExtension, + BehaviorWithStringContextCustomExtensionDescriptionWith("RunTestValueSecond")) + .Executable(ActionExecutableCustomExtension, + "Executes \"() => Invoke(SyntaxBuilder`1.EndWith)\" during bootstrapping.") + .Behavior(BehaviorCustomExtension, BehaviorCustomExtensionDescriptionWith("run first end")) + .Behavior(LazyBehaviorCustomExtension, + LazyBehaviorCustomExtensionDescriptionWith("() => new Behavior(\"run second end\")")) + .Shutdown( + "Appccelerate.Bootstrapper.Execution.SynchronousReverseExecutor", + "Runs all executables synchronously on the extensions in the reverse order which they were added.") + .Executable(ActionExecutableCustomExtension, + "Executes \"() => Invoke(SyntaxBuilder`1.BeginWith)\" during bootstrapping.") + .Behavior(BehaviorCustomExtension, + BehaviorCustomExtensionDescriptionWith("shutdown first beginning")) + .Behavior(LazyBehaviorCustomExtension, + LazyBehaviorCustomExtensionDescriptionWith("() => new Behavior(\"shutdown second beginning\")")) + .Executable(ActionExecutableCustomExtension, + "Executes \"() => value(Appccelerate.Bootstrapper.Dummies.CustomExtensionWithBehaviorStrategy).DumpAction(\"CustomShutdown\")\" during bootstrapping.") + .Executable(ActionExecutableWithStringContextCustomExtension, + "Initializes the context once with \"() => \"ShutdownTest\"\" and executes \"(extension, ctx) => extension.Unregister(ctx)\" on each extension during bootstrapping.") + .Behavior(BehaviorWithStringContextCustomExtension, + BehaviorWithStringContextCustomExtensionDescriptionWith("ShutdownTestValueFirst")) + .Behavior(BehaviorWithStringContextCustomExtension, + BehaviorWithStringContextCustomExtensionDescriptionWith("ShutdownTestValueSecond")) + .Executable(ActionExecutableWithDictionaryContextCustomExtension, + "Initializes the context once with \"() => value(Appccelerate.Bootstrapper.Dummies.CustomExtensionWithBehaviorStrategy).ShutdownInitializeConfiguration()\" and executes \"(extension, dictionary) => extension.DeConfigure(dictionary)\" on each extension during bootstrapping.") + .Behavior(BehaviorWithConfigurationContextCustomExtension, + BehaviorWithConfigurationContextCustomExtensionDescriptionWith("ShutdownFirstValue", + "ShutdownTestValue")) + .Behavior(BehaviorWithConfigurationContextCustomExtension, + BehaviorWithConfigurationContextCustomExtensionDescriptionWith("ShutdownSecondValue", + "ShutdownTestValue")) + .Executable(ActionOnExtensionExecutableCustomExtension, + "Executes \"extension => extension.Stop()\" on each extension during bootstrapping.") + .Behavior(BehaviorCustomExtension, BehaviorCustomExtensionDescriptionWith("shutdown first stop")) + .Behavior(LazyBehaviorCustomExtension, + LazyBehaviorCustomExtensionDescriptionWith("() => new Behavior(\"shutdown second stop\")")) + .Executable(ActionExecutableCustomExtension, + "Executes \"() => Invoke(SyntaxBuilder`1.EndWith)\" during bootstrapping.") + .Behavior(BehaviorCustomExtension, BehaviorCustomExtensionDescriptionWith("shutdown first end")) + .Behavior(LazyBehaviorCustomExtension, + LazyBehaviorCustomExtensionDescriptionWith("() => new Behavior(\"shutdown second end\")")) + .Behavior("Appccelerate.Bootstrapper.Behavior.DisposeExtensionBehavior", + "Disposes all extensions which implement IDisposable.") + .Build()); + + interceptingContextReporter.ToString().Should().Be(expectedContextReporter.ToString()); + } private static string LazyBehaviorCustomExtensionDescriptionWith(string action) { - const string LazyBehaviorDescriptionFormat = "Creates the behavior with {0} and executes behave on the lazy initialized behavior."; + const string LazyBehaviorDescriptionFormat = + "Creates the behavior with {0} and executes behave on the lazy initialized behavior."; return string.Format(CultureInfo.InvariantCulture, LazyBehaviorDescriptionFormat, action); } @@ -128,16 +182,45 @@ private static string BehaviorCustomExtensionDescriptionWith(string action) private static string BehaviorWithConfigurationContextCustomExtensionDescriptionWith(string key, string value) { - const string BehaviorWithConfigurationContextCustomExtensionDescription = "Dumps the key \"{0}\" and value \"{1}\" and modifies the configuration with it."; + const string BehaviorWithConfigurationContextCustomExtensionDescription = + "Dumps the key \"{0}\" and value \"{1}\" and modifies the configuration with it."; - return string.Format(CultureInfo.InvariantCulture, BehaviorWithConfigurationContextCustomExtensionDescription, key, value); + return string.Format(CultureInfo.InvariantCulture, + BehaviorWithConfigurationContextCustomExtensionDescription, key, value); } private static string BehaviorWithStringContextCustomExtensionDescriptionWith(string value) { const string BehaviorWithStringContextCustomExtensionDescription = "Dumps \"{0}\" on all extensions."; - return string.Format(CultureInfo.InvariantCulture, BehaviorWithStringContextCustomExtensionDescription, value); + return string.Format(CultureInfo.InvariantCulture, BehaviorWithStringContextCustomExtensionDescription, + value); + } + + private class ReporterCollection : Collection, IReporter + { + public void Report(IReportingContext context) + { + foreach (IReporter reporter in this.Items) + { + reporter.Report(context); + } + } + } + + private class InterceptingReporter : IReporter + { + private readonly Action contextInterceptor; + + public InterceptingReporter(Action contextInterceptor) + { + this.contextInterceptor = contextInterceptor; + } + + public void Report(IReportingContext context) + { + this.contextInterceptor(context); + } } private class StringReporter : IReporter @@ -185,7 +268,8 @@ private static void Dump(IEnumerable executableContexts, Str private static void Dump(string name, string description, StringBuilder sb, int indent) { - sb.AppendLine(string.Format(CultureInfo.InvariantCulture, "{0}[Name = {1}, Description = {2}]", string.Empty.PadLeft(indent), name, description)); + sb.AppendLine(string.Format(CultureInfo.InvariantCulture, "{0}[Name = {1}, Description = {2}]", + string.Empty.PadLeft(indent), name, description)); } } } diff --git a/source/Appccelerate.Bootstrapper/Appccelerate.Bootstrapper.csproj b/source/Appccelerate.Bootstrapper/Appccelerate.Bootstrapper.csproj index f3ba070..dee664a 100644 --- a/source/Appccelerate.Bootstrapper/Appccelerate.Bootstrapper.csproj +++ b/source/Appccelerate.Bootstrapper/Appccelerate.Bootstrapper.csproj @@ -1,152 +1,91 @@ - - - + - Debug - AnyCPU - {8F1AEC30-49CF-482C-BC4E-281984487847} - Library - Properties - Appccelerate.Bootstrapper - Appccelerate.Bootstrapper - v4.5 - 512 - 03d9db7c + netstandard2.0 - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 + + + Appccelerate.Bootstrapper + Copyright © 2008-2021 + Appccelerate team + Appccelerate + Appccelerate.Bootstrapper - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\Appccelerate.Bootstrapper.XML + + + + false + LICENSE + https://github.com/appccelerate/bootstrapper + true + true + true + icon.png + + Bootstrapper provides a simple and flexible way to make your application's startup and shutdown behavior pluggable and extensible: + The bootstrapper provides a single entry point to startup and shutdown the application, + Fluent definition syntax allowing to expressively define the startup and shutdown behavior of the application, + Pluggable behaviors which allow to extend the bootstrapping mechanism in AOP like style, + ConfigurationSection support with behavior, + Unobtrusive Key/Value pair configuration section support with behavior, + Thorough reporting of application startup and shutdown behavior. + + + 3.0.0: + - Supports now .NET Standard 2.0 + + 2.0.0: + - Targets now .NET 4.5 + + Appccelerate bootstrapper startup shutdown + + - + true + snupkg - - - ..\packages\Appccelerate.Fundamentals.2.8.0\lib\portable-windows8+net45\Appccelerate.Fundamentals.dll - - - - + + + + true + Appccelerate.snk + false + + + + + ../Analyzers.Productive.ruleset + + + + + + all + runtime; build; native; contentfiles; analyzers + + + + Minor + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml + + - - Designer - - - - + + + + + - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - - - - - - - - - - \ No newline at end of file + diff --git a/source/Appccelerate.Bootstrapper/Behavior/LazyBehavior.cs b/source/Appccelerate.Bootstrapper/Behavior/LazyBehavior.cs index f7d1bee..bdae949 100644 --- a/source/Appccelerate.Bootstrapper/Behavior/LazyBehavior.cs +++ b/source/Appccelerate.Bootstrapper/Behavior/LazyBehavior.cs @@ -41,7 +41,7 @@ public class LazyBehavior : IBehavior /// The behavior provider. public LazyBehavior(Expression>> behaviorProvider) { - Ensure.ArgumentNotNull(behaviorProvider, "behaviorProvider"); + Guard.AgainstNullArgument(nameof(behaviorProvider), behaviorProvider); this.behaviorProviderExpression = behaviorProvider; this.behaviorProvider = this.behaviorProviderExpression.Compile(); diff --git a/source/Appccelerate.Bootstrapper/Configuration/ConfigurationSectionBehavior.cs b/source/Appccelerate.Bootstrapper/Configuration/ConfigurationSectionBehavior.cs index 745c868..0d7dcea 100644 --- a/source/Appccelerate.Bootstrapper/Configuration/ConfigurationSectionBehavior.cs +++ b/source/Appccelerate.Bootstrapper/Configuration/ConfigurationSectionBehavior.cs @@ -48,18 +48,12 @@ public ConfigurationSectionBehavior(IConfigurationSectionBehaviorFactory factory } /// - public string Name - { - get - { - return this.GetType().FullNameToString(); - } - } + public string Name => this.GetType().FullNameToString(); /// public void Behave(IEnumerable extensions) { - Ensure.ArgumentNotNull(extensions, "extensions"); + Guard.AgainstNullArgument(nameof(extensions), extensions); foreach (IExtension extension in extensions) { diff --git a/source/Appccelerate.Bootstrapper/Configuration/ExtensionConfigurationSectionBehavior.cs b/source/Appccelerate.Bootstrapper/Configuration/ExtensionConfigurationSectionBehavior.cs index c39474b..46a7ecb 100644 --- a/source/Appccelerate.Bootstrapper/Configuration/ExtensionConfigurationSectionBehavior.cs +++ b/source/Appccelerate.Bootstrapper/Configuration/ExtensionConfigurationSectionBehavior.cs @@ -50,7 +50,7 @@ public ExtensionConfigurationSectionBehavior() /// The factory which creates the necessary dependencies. public ExtensionConfigurationSectionBehavior(IExtensionConfigurationSectionBehaviorFactory factory) { - Ensure.ArgumentNotNull(factory, "factory"); + Guard.AgainstNullArgument(nameof(factory), factory); this.factory = factory; @@ -73,7 +73,7 @@ public string Name /// The extensions. public void Behave(IEnumerable extensions) { - Ensure.ArgumentNotNull(extensions, "extensions"); + Guard.AgainstNullArgument(nameof(extensions), extensions); foreach (IExtension extension in extensions) { diff --git a/source/Appccelerate.Bootstrapper/Configuration/Internals/AssignExtensionProperties.cs b/source/Appccelerate.Bootstrapper/Configuration/Internals/AssignExtensionProperties.cs index 41eabcf..da87932 100644 --- a/source/Appccelerate.Bootstrapper/Configuration/Internals/AssignExtensionProperties.cs +++ b/source/Appccelerate.Bootstrapper/Configuration/Internals/AssignExtensionProperties.cs @@ -30,10 +30,10 @@ public class AssignExtensionProperties : IAssignExtensionProperties /// public void Assign(IReflectExtensionProperties reflector, IExtension extension, IConsumeConfiguration consumer, IHaveConversionCallbacks conversionCallbacksProvider, IHaveDefaultConversionCallback defaultConversionCallbackProvider) { - Ensure.ArgumentNotNull(reflector, "reflector"); - Ensure.ArgumentNotNull(consumer, "consumer"); - Ensure.ArgumentNotNull(conversionCallbacksProvider, "conversionCallbacksProvider"); - Ensure.ArgumentNotNull(defaultConversionCallbackProvider, "defaultConversionCallbackProvider"); + Guard.AgainstNullArgument(nameof(reflector), reflector); + Guard.AgainstNullArgument(nameof(consumer), consumer); + Guard.AgainstNullArgument(nameof(conversionCallbacksProvider), conversionCallbacksProvider); + Guard.AgainstNullArgument(nameof(defaultConversionCallbackProvider), defaultConversionCallbackProvider); var properties = reflector.Reflect(extension).ToList(); IDictionary conversionCallbacks = conversionCallbacksProvider.ConversionCallbacks; diff --git a/source/Appccelerate.Bootstrapper/Configuration/Internals/DefaultConversionCallback.cs b/source/Appccelerate.Bootstrapper/Configuration/Internals/DefaultConversionCallback.cs index f472ccc..5ee25b3 100644 --- a/source/Appccelerate.Bootstrapper/Configuration/Internals/DefaultConversionCallback.cs +++ b/source/Appccelerate.Bootstrapper/Configuration/Internals/DefaultConversionCallback.cs @@ -29,7 +29,7 @@ public class DefaultConversionCallback : IConversionCallback /// public object Convert(string value, PropertyInfo targetProperty) { - Ensure.ArgumentNotNull(targetProperty, "targetProperty"); + Guard.AgainstNullArgument(nameof(targetProperty), targetProperty); return System.Convert.ChangeType(value, targetProperty.PropertyType, CultureInfo.InvariantCulture); } diff --git a/source/Appccelerate.Bootstrapper/Configuration/Internals/HaveConfigurationSectionName.cs b/source/Appccelerate.Bootstrapper/Configuration/Internals/HaveConfigurationSectionName.cs index c0a01d9..834beb7 100644 --- a/source/Appccelerate.Bootstrapper/Configuration/Internals/HaveConfigurationSectionName.cs +++ b/source/Appccelerate.Bootstrapper/Configuration/Internals/HaveConfigurationSectionName.cs @@ -29,7 +29,7 @@ public class HaveConfigurationSectionName : IHaveConfigurationSectionName /// The extension. public HaveConfigurationSectionName(IExtension extension) { - Ensure.ArgumentNotNull(extension, "extension"); + Guard.AgainstNullArgument(nameof(extension), extension); var namer = extension as IHaveConfigurationSectionName; diff --git a/source/Appccelerate.Bootstrapper/Configuration/Internals/ReflectExtensionPublicProperties.cs b/source/Appccelerate.Bootstrapper/Configuration/Internals/ReflectExtensionPublicProperties.cs index 3390c24..e6cfaa9 100644 --- a/source/Appccelerate.Bootstrapper/Configuration/Internals/ReflectExtensionPublicProperties.cs +++ b/source/Appccelerate.Bootstrapper/Configuration/Internals/ReflectExtensionPublicProperties.cs @@ -31,7 +31,7 @@ public class ReflectExtensionPublicProperties : IReflectExtensionProperties /// public IEnumerable Reflect(IExtension extension) { - Ensure.ArgumentNotNull(extension, "extension"); + Guard.AgainstNullArgument(nameof(extension), extension); return extension.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public).Where(x => x.CanWrite); } diff --git a/source/Appccelerate.Bootstrapper/DefaultBootstrapper.cs b/source/Appccelerate.Bootstrapper/DefaultBootstrapper.cs index 0593822..5a97434 100644 --- a/source/Appccelerate.Bootstrapper/DefaultBootstrapper.cs +++ b/source/Appccelerate.Bootstrapper/DefaultBootstrapper.cs @@ -104,7 +104,7 @@ public void AddExtension(TExtension extension) /// public void Initialize(IStrategy strategy) { - Ensure.ArgumentNotNull(strategy, "strategy"); + Guard.AgainstNullArgument(nameof(strategy), strategy); this.CheckAlreadyInitialized(); diff --git a/source/Appccelerate.Bootstrapper/Execution/SynchronousExecutor.cs b/source/Appccelerate.Bootstrapper/Execution/SynchronousExecutor.cs index b3591d3..1c9d8e9 100644 --- a/source/Appccelerate.Bootstrapper/Execution/SynchronousExecutor.cs +++ b/source/Appccelerate.Bootstrapper/Execution/SynchronousExecutor.cs @@ -43,8 +43,8 @@ public string Name /// public void Execute(ISyntax syntax, IEnumerable extensions, IExecutionContext executionContext) { - Ensure.ArgumentNotNull(syntax, "syntax"); - Ensure.ArgumentNotNull(executionContext, "executionContext"); + Guard.AgainstNullArgument(nameof(syntax), syntax); + Guard.AgainstNullArgument(nameof(executionContext), executionContext); foreach (IExecutable executable in syntax) { diff --git a/source/Appccelerate.Bootstrapper/Execution/SynchronousReverseExecutor.cs b/source/Appccelerate.Bootstrapper/Execution/SynchronousReverseExecutor.cs index 0df7580..cb05150 100644 --- a/source/Appccelerate.Bootstrapper/Execution/SynchronousReverseExecutor.cs +++ b/source/Appccelerate.Bootstrapper/Execution/SynchronousReverseExecutor.cs @@ -43,8 +43,8 @@ public string Name /// public void Execute(ISyntax syntax, IEnumerable extensions, IExecutionContext executionContext) { - Ensure.ArgumentNotNull(syntax, "syntax"); - Ensure.ArgumentNotNull(executionContext, "executionContext"); + Guard.AgainstNullArgument(nameof(executionContext), syntax); + Guard.AgainstNullArgument(nameof(executionContext), executionContext); var reversedExtensions = new Stack(extensions); diff --git a/source/Appccelerate.Bootstrapper/Formatters/TypeExtensions.cs b/source/Appccelerate.Bootstrapper/Formatters/TypeExtensions.cs new file mode 100644 index 0000000..7870b32 --- /dev/null +++ b/source/Appccelerate.Bootstrapper/Formatters/TypeExtensions.cs @@ -0,0 +1,50 @@ +//------------------------------------------------------------------------------- +// +// Copyright (c) 2008-2015 +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +//------------------------------------------------------------------------------- + +namespace Appccelerate.Formatters +{ + using System; + using System.Linq; + using System.Reflection; + using Appccelerate.Bootstrapper; + + /// + /// Contains extension methods for Type. + /// + public static class TypeExtensions + { + /// + /// Correctly formats the FullName of the specified type by taking generics into consideration. + /// + /// The type whose full name is formatted. + /// A correctly formatted full name. + public static string FullNameToString(this Type type) + { + Guard.AgainstNullArgument("type", type); + + if (!type.GetTypeInfo().IsGenericType) + { + return type.FullName; + } + + var partName = type.FullName.Substring(0, type.FullName.IndexOf('`')); + var genericArgumentNames = type.GetTypeInfo().GenericTypeArguments.Select(arg => arg.FullNameToString()); + return string.Concat(partName, "<", string.Join(",", genericArgumentNames), ">"); + } + } +} \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper/Guard.cs b/source/Appccelerate.Bootstrapper/Guard.cs new file mode 100644 index 0000000..18627b4 --- /dev/null +++ b/source/Appccelerate.Bootstrapper/Guard.cs @@ -0,0 +1,114 @@ +namespace Appccelerate +{ + using System; + using System.Diagnostics; + using System.Diagnostics.CodeAnalysis; + using System.Globalization; + using System.Reflection; + + /// + /// Provides guard clauses. + /// + internal static class Guard + { + /// + /// Guards against a null argument. + /// + /// The type of the argument. + /// Name of the parameter. + /// The argument. + /// is null. + /// is restricted to reference types to avoid boxing of value type objects. + [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Distributed as a source code package.")] + [DebuggerStepThrough] + public static void AgainstNullArgument(string parameterName, [ValidatedNotNull]TArgument argument) where TArgument : class + { + if (argument == null) + { + throw new ArgumentNullException(parameterName, string.Format(CultureInfo.InvariantCulture, "{0} is null.", parameterName)); + } + } + + /// + /// Guards against a null argument if can be null. + /// + /// The type of the argument. + /// Name of the parameter. + /// The argument. + /// is null. + /// + /// Performs a type check to avoid boxing of value type objects. + /// + [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Distributed as a source code package.")] + [DebuggerStepThrough] + public static void AgainstNullArgumentIfNullable(string parameterName, [ValidatedNotNull]TArgument argument) + { + if (typeof(TArgument).IsNullableType() && argument == null) + { + throw new ArgumentNullException(parameterName, string.Format(CultureInfo.InvariantCulture, "{0} is null.", parameterName)); + } + } + + /// + /// Guards against a null argument property value. + /// + /// The type of the property. + /// Name of the parameter. + /// Name of the property. + /// The argument property. + /// is null. + /// is restricted to reference types to avoid boxing of value type objects. + [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Distributed as a source code package.")] + [DebuggerStepThrough] + public static void AgainstNullArgumentProperty(string parameterName, string propertyName, [ValidatedNotNull]TProperty argumentProperty) + where TProperty : class + { + if (argumentProperty == null) + { + throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "{0}.{1} is null.", parameterName, propertyName), parameterName); + } + } + + /// + /// Guards against a null argument property value if can be null. + /// + /// The type of the property. + /// Name of the parameter. + /// Name of the property. + /// The argument property. + /// is null. + /// + /// Performs a type check to avoid boxing of value type objects. + /// + [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Distributed as a source code package.")] + [DebuggerStepThrough] + public static void AgainstNullArgumentPropertyIfNullable( + string parameterName, string propertyName, [ValidatedNotNull]TProperty argumentProperty) + { + if (typeof(TProperty).IsNullableType() && argumentProperty == null) + { + throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "{0}.{1} is null.", parameterName, propertyName), parameterName); + } + } + + /// + /// Determines whether the specified type is a nullable type. + /// + /// The type. + /// + /// true if the specified type is a nullable type; otherwise, false. + /// + [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Distributed as a source code package.")] + private static bool IsNullableType(this Type type) + { + return !type.GetTypeInfo().IsValueType || (type.GetTypeInfo().IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>)); + } + + /// + /// When applied to a parameter, this attribute provides an indication to code analysis that the argument has been null checked. + /// + private sealed class ValidatedNotNullAttribute : Attribute + { + } + } +} \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper/NuGet.config b/source/Appccelerate.Bootstrapper/NuGet.config deleted file mode 100644 index 5d5bc35..0000000 --- a/source/Appccelerate.Bootstrapper/NuGet.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper/Properties/AssemblyInfo.cs b/source/Appccelerate.Bootstrapper/Properties/AssemblyInfo.cs deleted file mode 100644 index 2085b1c..0000000 --- a/source/Appccelerate.Bootstrapper/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,25 +0,0 @@ -//------------------------------------------------------------------------------- -// -// Copyright (c) 2008-2015 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------- - -using System.Reflection; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Appccelerate.Bootstrapper")] -[assembly: AssemblyDescription("")] diff --git a/source/Appccelerate.Bootstrapper/Properties/GlobalAssemblyInfo.cs b/source/Appccelerate.Bootstrapper/Properties/GlobalAssemblyInfo.cs deleted file mode 100644 index 21da808..0000000 --- a/source/Appccelerate.Bootstrapper/Properties/GlobalAssemblyInfo.cs +++ /dev/null @@ -1,34 +0,0 @@ -//------------------------------------------------------------------------------- -// -// Copyright (c) 2008-2015 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------- - -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyCompany("Appccelerate")] -[assembly: AssemblyProduct("Appccelerate")] -[assembly: AssemblyCopyright("Copyright © 2008-2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] diff --git a/source/Appccelerate.Bootstrapper/Reporting/BehaviorContext.cs b/source/Appccelerate.Bootstrapper/Reporting/BehaviorContext.cs index de50655..eaf5fbf 100644 --- a/source/Appccelerate.Bootstrapper/Reporting/BehaviorContext.cs +++ b/source/Appccelerate.Bootstrapper/Reporting/BehaviorContext.cs @@ -29,7 +29,7 @@ public class BehaviorContext : IBehaviorContext /// The describable. public BehaviorContext(IDescribable describable) { - Ensure.ArgumentNotNull(describable, "describable"); + Guard.AgainstNullArgument(nameof(describable), describable); this.Name = describable.Name; this.Description = describable.Describe(); diff --git a/source/Appccelerate.Bootstrapper/Reporting/ExecutableContext.cs b/source/Appccelerate.Bootstrapper/Reporting/ExecutableContext.cs index 0b55168..6bb2368 100644 --- a/source/Appccelerate.Bootstrapper/Reporting/ExecutableContext.cs +++ b/source/Appccelerate.Bootstrapper/Reporting/ExecutableContext.cs @@ -35,7 +35,7 @@ public class ExecutableContext : IExecutableContext /// The describable. public ExecutableContext(IDescribable describable) { - Ensure.ArgumentNotNull(describable, "describable"); + Guard.AgainstNullArgument(nameof(describable), describable); this.behaviors = new Collection(); diff --git a/source/Appccelerate.Bootstrapper/Reporting/ExecutionContext.cs b/source/Appccelerate.Bootstrapper/Reporting/ExecutionContext.cs index 9a64baa..b3cb241 100644 --- a/source/Appccelerate.Bootstrapper/Reporting/ExecutionContext.cs +++ b/source/Appccelerate.Bootstrapper/Reporting/ExecutionContext.cs @@ -35,7 +35,7 @@ public class ExecutionContext : IExecutionContext /// The describable. public ExecutionContext(IDescribable describable) { - Ensure.ArgumentNotNull(describable, "describable"); + Guard.AgainstNullArgument(nameof(describable), describable); this.executables = new Collection(); diff --git a/source/Appccelerate.Bootstrapper/Reporting/ExtensionContext.cs b/source/Appccelerate.Bootstrapper/Reporting/ExtensionContext.cs index ede6807..48987a8 100644 --- a/source/Appccelerate.Bootstrapper/Reporting/ExtensionContext.cs +++ b/source/Appccelerate.Bootstrapper/Reporting/ExtensionContext.cs @@ -29,7 +29,7 @@ public class ExtensionContext : IExtensionContext /// The describable. public ExtensionContext(IDescribable describable) { - Ensure.ArgumentNotNull(describable, "describable"); + Guard.AgainstNullArgument(nameof(describable), describable); this.Name = describable.Name; this.Description = describable.Describe(); diff --git a/source/Appccelerate.Bootstrapper/Settings.stylecop b/source/Appccelerate.Bootstrapper/Settings.stylecop deleted file mode 100644 index d4ef0af..0000000 --- a/source/Appccelerate.Bootstrapper/Settings.stylecop +++ /dev/null @@ -1,116 +0,0 @@ - - - - async - args - serializer - serialized - deserialized - deserialize - csv - remoting - args - async - Bootstrapper - csv - deserialize - deserialized - executables - remoting - serialized - serializer - - NoMerge - - - - - - \.g\.cs$ - \.Designer\.cs$ - \.generated\.cs$ - \.g\.i\.cs$ - TemporaryGeneratedFile_.*\.cs$ - AssemblyInfo_.*\.cs$ - - - - - - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - Appccelerate - Copyright (c) 2008-2015 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - False - True - - - - - - - False - - - - - - - - - - False - - - - - - - - - - False - - - - - - - \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper/Syntax/Executables/ActionExecutable.cs b/source/Appccelerate.Bootstrapper/Syntax/Executables/ActionExecutable.cs index 0b97546..cdd4add 100644 --- a/source/Appccelerate.Bootstrapper/Syntax/Executables/ActionExecutable.cs +++ b/source/Appccelerate.Bootstrapper/Syntax/Executables/ActionExecutable.cs @@ -45,7 +45,7 @@ public class ActionExecutable : IExecutable /// The action. public ActionExecutable(Expression action) { - Ensure.ArgumentNotNull(action, "action"); + Guard.AgainstNullArgument(nameof(action), action); this.behaviors = new Queue>(); @@ -65,7 +65,7 @@ public string Name /// public void Execute(IEnumerable extensions, IExecutableContext executableContext) { - Ensure.ArgumentNotNull(executableContext, "executableContext"); + Guard.AgainstNullArgument(nameof(executableContext), executableContext); foreach (IBehavior behavior in this.behaviors) { diff --git a/source/Appccelerate.Bootstrapper/Syntax/Executables/ActionOnExtensionExecutable.cs b/source/Appccelerate.Bootstrapper/Syntax/Executables/ActionOnExtensionExecutable.cs index 372d845..d224e80 100644 --- a/source/Appccelerate.Bootstrapper/Syntax/Executables/ActionOnExtensionExecutable.cs +++ b/source/Appccelerate.Bootstrapper/Syntax/Executables/ActionOnExtensionExecutable.cs @@ -44,7 +44,7 @@ public class ActionOnExtensionExecutable : IExecutable /// The action. public ActionOnExtensionExecutable(Expression> action) { - Ensure.ArgumentNotNull(action, "action"); + Guard.AgainstNullArgument(nameof(action), action); this.behaviors = new Queue>(); @@ -64,8 +64,8 @@ public string Name /// public void Execute(IEnumerable extensions, IExecutableContext executableContext) { - Ensure.ArgumentNotNull(extensions, "extensions"); - Ensure.ArgumentNotNull(executableContext, "executableContext"); + Guard.AgainstNullArgument(nameof(extensions), extensions); + Guard.AgainstNullArgument(nameof(executableContext), executableContext); foreach (IBehavior behavior in this.behaviors) { diff --git a/source/Appccelerate.Bootstrapper/Syntax/Executables/ActionOnExtensionWithInitializerExecutable.cs b/source/Appccelerate.Bootstrapper/Syntax/Executables/ActionOnExtensionWithInitializerExecutable.cs index d7dfe60..073f367 100644 --- a/source/Appccelerate.Bootstrapper/Syntax/Executables/ActionOnExtensionWithInitializerExecutable.cs +++ b/source/Appccelerate.Bootstrapper/Syntax/Executables/ActionOnExtensionWithInitializerExecutable.cs @@ -53,7 +53,7 @@ public class ActionOnExtensionWithInitializerExecutable : /// The behavior aware. public ActionOnExtensionWithInitializerExecutable(Expression> initializer, Expression> action, Action, TContext> contextInterceptor) { - Ensure.ArgumentNotNull(action, "action"); + Guard.AgainstNullArgument(nameof(action), action); this.contextInterceptor = contextInterceptor; this.behaviors = new Queue>(); @@ -77,8 +77,8 @@ public string Name /// public void Execute(IEnumerable extensions, IExecutableContext executableContext) { - Ensure.ArgumentNotNull(extensions, "extensions"); - Ensure.ArgumentNotNull(executableContext, "executableContext"); + Guard.AgainstNullArgument(nameof(extensions), extensions); + Guard.AgainstNullArgument(nameof(executableContext), executableContext); TContext context = this.initializer(); diff --git a/source/Appccelerate.Bootstrapper/Syntax/SyntaxBuilderWithContext.cs b/source/Appccelerate.Bootstrapper/Syntax/SyntaxBuilderWithContext.cs index 388fcbe..4e63e10 100644 --- a/source/Appccelerate.Bootstrapper/Syntax/SyntaxBuilderWithContext.cs +++ b/source/Appccelerate.Bootstrapper/Syntax/SyntaxBuilderWithContext.cs @@ -88,7 +88,7 @@ public IEndWithBehavior With(Expression>> /// public IWithBehaviorOnContext With(Expression>> provider) { - Ensure.ArgumentNotNull(provider, "provider"); + Guard.AgainstNullArgument(nameof(provider), provider); this.behaviorProviders.Enqueue(provider.Compile()); diff --git a/source/Appccelerate.Bootstrapper/appccelerate.bootstrapper.nuspec b/source/Appccelerate.Bootstrapper/appccelerate.bootstrapper.nuspec deleted file mode 100644 index 5322199..0000000 --- a/source/Appccelerate.Bootstrapper/appccelerate.bootstrapper.nuspec +++ /dev/null @@ -1,44 +0,0 @@ - - - - Appccelerate.Bootstrapper - 0.0.0 - Appccelerate.Bootstrapper - Appccelerate team - Appccelerate team - http://www.apache.org/licenses/LICENSE-2.0.html - https://github.com/appccelerate/bootstrapper - https://github.com/appccelerate/appccelerate/raw/master/docs/nuget.png - true - Bootstrapper provides a simple and flexible way to make your application's startup and shutdown behavior pluggable and extensible. - - Bootstrapper provides a simple and flexible way to make your application's startup and shutdown behavior pluggable and extensible: - The bootstrapper provides a single entry point to startup and shutdown the application, - Fluent definition syntax allowing to expressively define the startup and shutdown behavior of the application, - Pluggable behaviors which allow to extend the bootstrapping mechanism in AOP like style, - ConfigurationSection support with behavior, - Unobtrusive Key/Value pair configuration section support with behavior, - Thorough reporting of application startup and shutdown behavior. - - - 2: targets now .Net 4.5 - - Copyright 2012-2014 - Appccelerate bootstrapper startup shutdown - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/source/Appccelerate.Bootstrapper/icon.png b/source/Appccelerate.Bootstrapper/icon.png new file mode 100644 index 0000000..6ec33d4 Binary files /dev/null and b/source/Appccelerate.Bootstrapper/icon.png differ diff --git a/source/Appccelerate.Bootstrapper/packages.config b/source/Appccelerate.Bootstrapper/packages.config deleted file mode 100644 index bbed3dd..0000000 --- a/source/Appccelerate.Bootstrapper/packages.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file