Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Migrate from .NET Framwork 4.5 to .NET Standard 2.0 #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -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
34 changes: 34 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,5 @@ _UpgradeReport_Files/
Backup*/
UpgradeLog*.XML

Specs
Specs
source/.idea/.idea.Appccelerate.Bootstrapper/.idea/
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.
44 changes: 44 additions & 0 deletions source/Analyzers.Facts.ruleset
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Analyzers" ToolsVersion="15.0">
<IncludeAll Action="Warning" />
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
<Rule Id="CA1000" Action="Warning" />
<Rule Id="CA1006" Action="None" />
<Rule Id="CA1014" Action="None" />
<Rule Id="CA1017" Action="None" />
<Rule Id="CA1034" Action="None" />
<Rule Id="CA1040" Action="None" />
<Rule Id="CA1303" Action="None" />
<Rule Id="CA1305" Action="None" />
<Rule Id="CA1502" Action="None" />
<Rule Id="CA1506" Action="None" />
<Rule Id="CA1704" Action="None" />
<Rule Id="CA1815" Action="None" />
<Rule Id="CA1822" Action="None" />
<Rule Id="CA2000" Action="None" />
<Rule Id="CA2204" Action="None" />
<Rule Id="CA2210" Action="None" />
</Rules>
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp" RuleNamespace="Microsoft.CodeAnalysis.CSharp">
<Rule Id="CS1591" Action="None" />
</Rules>
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp.Features" RuleNamespace="Microsoft.CodeAnalysis.CSharp.Features">
<Rule Id="IDE0001" Action="None" />
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="SA0001" Action="None" />
<Rule Id="SA1008" Action="None" />
<Rule Id="SA1009" Action="None" />
<Rule Id="SA1101" Action="None" />
<Rule Id="SA1118" Action="None" />
<Rule Id="SA1135" Action="None" />
<Rule Id="SA1201" Action="None" />
<Rule Id="SA1202" Action="None" />
<Rule Id="SA1204" Action="None" />
<Rule Id="SA1407" Action="None" />
<Rule Id="SA1413" Action="None" />
<Rule Id="SA1600" Action="None" />
<Rule Id="SA1633" Action="Warning" />
<Rule Id="SA1652" Action="None" />
</Rules>
</RuleSet>
48 changes: 48 additions & 0 deletions source/Analyzers.Productive.ruleset
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Analyzers" ToolsVersion="15.0">
<IncludeAll Action="Warning" />
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
<Rule Id="CA1000" Action="Warning" />
<Rule Id="CA1006" Action="None" />
<Rule Id="CA1014" Action="None" />
<Rule Id="CA1017" Action="None" />
<Rule Id="CA1034" Action="None" />
<Rule Id="CA1040" Action="None" />
<Rule Id="CA1303" Action="None" />
<Rule Id="CA1305" Action="None" />
<Rule Id="CA1502" Action="None" />
<Rule Id="CA1506" Action="None" />
<Rule Id="CA1704" Action="None" />
<Rule Id="CA1815" Action="None" />
<Rule Id="CA1822" Action="None" />
<Rule Id="CA2000" Action="None" />
<Rule Id="CA2204" Action="None" />
<Rule Id="CA2210" Action="None" />
</Rules>
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp" RuleNamespace="Microsoft.CodeAnalysis.CSharp">
<Rule Id="CS1591" Action="None" />
</Rules>
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp.Features" RuleNamespace="Microsoft.CodeAnalysis.CSharp.Features">
<Rule Id="IDE0001" Action="None" />
</Rules>
<Rules AnalyzerId="Particular.CodeRules" RuleNamespace="Particular.CodeRules">
<Rule Id="PCR0001" Action="None" />
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="SA1008" Action="None" />
<Rule Id="SA1009" Action="None" />
<Rule Id="SA1115" Action="None" />
<Rule Id="SA1118" Action="None" />
<Rule Id="SA1135" Action="None" />
<Rule Id="SA1201" Action="None" />
<Rule Id="SA1202" Action="None" />
<Rule Id="SA1204" Action="None" />
<Rule Id="SA1407" Action="None" />
<Rule Id="SA1413" Action="None" />
<Rule Id="SA1600" Action="None" />
<Rule Id="SA1601" Action="None" />
<Rule Id="SA1602" Action="None" />
<Rule Id="SA1633" Action="Warning" />
<Rule Id="SA1652" Action="None" />
</Rules>
</RuleSet>
49 changes: 49 additions & 0 deletions source/Analyzers.Specs.ruleset
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Analyzers" ToolsVersion="15.0">
<IncludeAll Action="Warning" />
<Rules AnalyzerId="ConfigureAwaitChecker" RuleNamespace="ConfigureAwaitChecker">
<Rule Id="ConfigureAwaitChecker" Action="None" />
</Rules>
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
<Rule Id="CA1000" Action="Warning" />
<Rule Id="CA1006" Action="None" />
<Rule Id="CA1014" Action="None" />
<Rule Id="CA1017" Action="None" />
<Rule Id="CA1034" Action="None" />
<Rule Id="CA1040" Action="None" />
<Rule Id="CA1303" Action="None" />
<Rule Id="CA1305" Action="None" />
<Rule Id="CA1502" Action="None" />
<Rule Id="CA1506" Action="None" />
<Rule Id="CA1704" Action="None" />
<Rule Id="CA1815" Action="None" />
<Rule Id="CA1822" Action="None" />
<Rule Id="CA2000" Action="None" />
<Rule Id="CA2204" Action="None" />
<Rule Id="CA2210" Action="None" />
</Rules>
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp" RuleNamespace="Microsoft.CodeAnalysis.CSharp">
<Rule Id="CS1591" Action="None" />
</Rules>
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp.Features" RuleNamespace="Microsoft.CodeAnalysis.CSharp.Features">
<Rule Id="IDE0001" Action="None" />
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="SA0001" Action="None" />
<Rule Id="SA1008" Action="None" />
<Rule Id="SA1009" Action="None" />
<Rule Id="SA1118" Action="None" />
<Rule Id="SA1135" Action="None" />
<Rule Id="SA1136" Action="None" />
<Rule Id="SA1201" Action="None" />
<Rule Id="SA1202" Action="None" />
<Rule Id="SA1204" Action="None" />
<Rule Id="SA1407" Action="None" />
<Rule Id="SA1413" Action="None" />
<Rule Id="SA1600" Action="None" />
<Rule Id="SA1611" Action="None" />
<Rule Id="SA1615" Action="None" />
<Rule Id="SA1633" Action="Warning" />
<Rule Id="SA1652" Action="None" />
</Rules>
</RuleSet>
10 changes: 5 additions & 5 deletions source/Appccelerate.Bootstrapper.Facts/AbstractStrategyTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
namespace Appccelerate.Bootstrapper
{
using System;

using Appccelerate.Bootstrapper.Execution;
using Appccelerate.Bootstrapper.Extension;
using Appccelerate.Bootstrapper.Reporting;
Expand Down Expand Up @@ -48,7 +47,7 @@ public void BuildRunSyntax_WhenCalledMultipleTimes_ShouldThrowException()
{
this.testee.BuildRunSyntax();

this.testee.Invoking(x => x.BuildRunSyntax()).ShouldThrow<InvalidOperationException>();
this.testee.Invoking(x => x.BuildRunSyntax()).Should().Throw<InvalidOperationException>();
}

[Fact]
Expand All @@ -65,7 +64,7 @@ public void BuildShutdownSyntax_WhenCalledMultipleTimes_ShouldThrowException()
{
this.testee.BuildShutdownSyntax();

this.testee.Invoking(x => x.BuildShutdownSyntax()).ShouldThrow<InvalidOperationException>();
this.testee.Invoking(x => x.BuildShutdownSyntax()).Should().Throw<InvalidOperationException>();
}

[Fact]
Expand Down Expand Up @@ -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<IExtension>
{
public TestableAbstractStrategy(ISyntaxBuilder<IExtension> runSyntaxBuilder, ISyntaxBuilder<IExtension> shutdownSyntaxBuilder)
public TestableAbstractStrategy(ISyntaxBuilder<IExtension> runSyntaxBuilder,
ISyntaxBuilder<IExtension> shutdownSyntaxBuilder)
: base(runSyntaxBuilder, shutdownSyntaxBuilder)
{
}
Expand Down
Loading