diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 11e31f1..8ef9992 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,7 +20,5 @@ jobs: run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_OUTPUT - name: Pack NuGet Package - run: dotnet pack src/HealthCheckPlus.csproj -c Release -o ./dist -p:Version=${{ steps.setup_version.outputs.VERSION }} - - - name: Publish - run: dotnet nuget push dist/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json + run: dotnet pack src/HealthCheckPlus/HealthCheckPlus.csproj -c Release -o ./dist -p:Version=${{ steps.setup_version.outputs.VERSION }} + run: dotnet pack src/HealthCheckPlus.Abstractions/HealthCheckPlus.Abstractions.csproj -c Release -o ./dist -p:Version=${{ steps.setup_version.outputs.VERSION }} diff --git a/HealthCheckPlus.sln b/HealthCheckPlus.sln index 1e3ad10..d545ec8 100644 --- a/HealthCheckPlus.sln +++ b/HealthCheckPlus.sln @@ -3,12 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.8.34511.84 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HealthCheckPlus", "src\HealthCheckPlus.csproj", "{59A3979A-4DA9-48EB-B037-B69A1A8B53BF}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HealthCheckPlusDemoBackgroudService", "Samples\HealthCheckPlusDemoBackgroudService\HealthCheckPlusDemoBackgroudService.csproj", "{6730E215-ECA5-401C-B28A-F8AC11FE64DC}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{46A1CA76-6EE4-4CDF-98DF-8FB4A89F4677}" ProjectSection(SolutionItems) = preProject + docs\apis\apis.md = docs\apis\apis.md CODE_OF_CONDUCT.md = CODE_OF_CONDUCT.md CONTRIBUTING.md = CONTRIBUTING.md docapitemplate.md = docapitemplate.md @@ -23,6 +22,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{46A1CA76-6 EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HealthCheckPlusDemo", "Samples\HealthCheckPlusDemo\HealthCheckPlusDemo.csproj", "{072C0E0E-5888-492C-B154-8934476D6330}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HealthCheckPlus", "src\HealthCheckPlus\HealthCheckPlus.csproj", "{CB19A01B-9DAC-4D87-97BD-2BAEEA10480B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HealthCheckPlus.Abstractions", "src\HealthCheckPlus.Abstractions\HealthCheckPlus.Abstractions.csproj", "{5A6FAFA9-DB5E-48F6-96EB-71716FEBD806}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -30,16 +33,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {59A3979A-4DA9-48EB-B037-B69A1A8B53BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {59A3979A-4DA9-48EB-B037-B69A1A8B53BF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {59A3979A-4DA9-48EB-B037-B69A1A8B53BF}.local|Any CPU.ActiveCfg = local|Any CPU - {59A3979A-4DA9-48EB-B037-B69A1A8B53BF}.local|Any CPU.Build.0 = local|Any CPU - {59A3979A-4DA9-48EB-B037-B69A1A8B53BF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {59A3979A-4DA9-48EB-B037-B69A1A8B53BF}.Release|Any CPU.Build.0 = Release|Any CPU {6730E215-ECA5-401C-B28A-F8AC11FE64DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6730E215-ECA5-401C-B28A-F8AC11FE64DC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6730E215-ECA5-401C-B28A-F8AC11FE64DC}.local|Any CPU.ActiveCfg = Debug|Any CPU - {6730E215-ECA5-401C-B28A-F8AC11FE64DC}.local|Any CPU.Build.0 = Debug|Any CPU + {6730E215-ECA5-401C-B28A-F8AC11FE64DC}.local|Any CPU.ActiveCfg = local|Any CPU + {6730E215-ECA5-401C-B28A-F8AC11FE64DC}.local|Any CPU.Build.0 = local|Any CPU {6730E215-ECA5-401C-B28A-F8AC11FE64DC}.Release|Any CPU.ActiveCfg = Release|Any CPU {6730E215-ECA5-401C-B28A-F8AC11FE64DC}.Release|Any CPU.Build.0 = Release|Any CPU {072C0E0E-5888-492C-B154-8934476D6330}.Debug|Any CPU.ActiveCfg = Debug|Any CPU @@ -48,6 +45,18 @@ Global {072C0E0E-5888-492C-B154-8934476D6330}.local|Any CPU.Build.0 = local|Any CPU {072C0E0E-5888-492C-B154-8934476D6330}.Release|Any CPU.ActiveCfg = Release|Any CPU {072C0E0E-5888-492C-B154-8934476D6330}.Release|Any CPU.Build.0 = Release|Any CPU + {CB19A01B-9DAC-4D87-97BD-2BAEEA10480B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CB19A01B-9DAC-4D87-97BD-2BAEEA10480B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CB19A01B-9DAC-4D87-97BD-2BAEEA10480B}.local|Any CPU.ActiveCfg = local|Any CPU + {CB19A01B-9DAC-4D87-97BD-2BAEEA10480B}.local|Any CPU.Build.0 = local|Any CPU + {CB19A01B-9DAC-4D87-97BD-2BAEEA10480B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CB19A01B-9DAC-4D87-97BD-2BAEEA10480B}.Release|Any CPU.Build.0 = Release|Any CPU + {5A6FAFA9-DB5E-48F6-96EB-71716FEBD806}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5A6FAFA9-DB5E-48F6-96EB-71716FEBD806}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5A6FAFA9-DB5E-48F6-96EB-71716FEBD806}.local|Any CPU.ActiveCfg = local|Any CPU + {5A6FAFA9-DB5E-48F6-96EB-71716FEBD806}.local|Any CPU.Build.0 = local|Any CPU + {5A6FAFA9-DB5E-48F6-96EB-71716FEBD806}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5A6FAFA9-DB5E-48F6-96EB-71716FEBD806}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/README.md b/README.md index 58cbc6c..e40b8c2 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,11 @@ ## What's new in the latest version +### V2.0.1 + +- Created dependency isolation package: HealthCheckPlus.Abstractions + - Now all public interfaces and classes are isolated in another assembly + ### V2.0.0 [**Top**](#table-of-contents) diff --git a/Samples/HealthCheckPlusDemo/Controllers/WeatherForecastController.cs b/Samples/HealthCheckPlusDemo/Controllers/WeatherForecastController.cs index c05f895..e930c09 100644 --- a/Samples/HealthCheckPlusDemo/Controllers/WeatherForecastController.cs +++ b/Samples/HealthCheckPlusDemo/Controllers/WeatherForecastController.cs @@ -1,4 +1,4 @@ -using HealthCheckPlus; +using HealthCheckPlus.Abstractions; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Diagnostics.HealthChecks; diff --git a/Samples/HealthCheckPlusDemo/HealthCheckPlusDemo.csproj b/Samples/HealthCheckPlusDemo/HealthCheckPlusDemo.csproj index 263c594..e541d35 100644 --- a/Samples/HealthCheckPlusDemo/HealthCheckPlusDemo.csproj +++ b/Samples/HealthCheckPlusDemo/HealthCheckPlusDemo.csproj @@ -14,7 +14,8 @@ - + + diff --git a/Samples/HealthCheckPlusDemo/Program.cs b/Samples/HealthCheckPlusDemo/Program.cs index 527a5d6..8451a0e 100644 --- a/Samples/HealthCheckPlusDemo/Program.cs +++ b/Samples/HealthCheckPlusDemo/Program.cs @@ -1,4 +1,4 @@ -using HealthCheckPlus; +using HealthCheckPlus.Abstractions; using HealthCheckPlus.options; using Microsoft.Extensions.Diagnostics.HealthChecks; using System.Text.Json; diff --git a/Samples/HealthCheckPlusDemoBackgroudService/Controllers/WeatherForecastController.cs b/Samples/HealthCheckPlusDemoBackgroudService/Controllers/WeatherForecastController.cs index 6a606bc..437ae97 100644 --- a/Samples/HealthCheckPlusDemoBackgroudService/Controllers/WeatherForecastController.cs +++ b/Samples/HealthCheckPlusDemoBackgroudService/Controllers/WeatherForecastController.cs @@ -1,4 +1,4 @@ -using HealthCheckPlus; +using HealthCheckPlus.Abstractions; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Diagnostics.HealthChecks; diff --git a/Samples/HealthCheckPlusDemoBackgroudService/HealthCheckPlusDemoBackgroudService.csproj b/Samples/HealthCheckPlusDemoBackgroudService/HealthCheckPlusDemoBackgroudService.csproj index 37a369f..3bfa6b5 100644 --- a/Samples/HealthCheckPlusDemoBackgroudService/HealthCheckPlusDemoBackgroudService.csproj +++ b/Samples/HealthCheckPlusDemoBackgroudService/HealthCheckPlusDemoBackgroudService.csproj @@ -14,7 +14,8 @@ - + + diff --git a/Samples/HealthCheckPlusDemoBackgroudService/Program.cs b/Samples/HealthCheckPlusDemoBackgroudService/Program.cs index ecc4bc7..6830569 100644 --- a/Samples/HealthCheckPlusDemoBackgroudService/Program.cs +++ b/Samples/HealthCheckPlusDemoBackgroudService/Program.cs @@ -1,4 +1,4 @@ -using HealthCheckPlus; +using HealthCheckPlus.Abstractions; using HealthCheckPlus.options; using Microsoft.AspNetCore.Diagnostics.HealthChecks; using Microsoft.Extensions.Diagnostics.HealthChecks; diff --git a/Samples/HealthCheckPlusDemoBackgroudService/SamplePublishHealth.cs b/Samples/HealthCheckPlusDemoBackgroudService/SamplePublishHealth.cs index 98340e5..b183fae 100644 --- a/Samples/HealthCheckPlusDemoBackgroudService/SamplePublishHealth.cs +++ b/Samples/HealthCheckPlusDemoBackgroudService/SamplePublishHealth.cs @@ -1,4 +1,4 @@ -using HealthCheckPlus; +using HealthCheckPlus.Abstractions; using Microsoft.Extensions.Diagnostics.HealthChecks; namespace HealthCheckPlusDemoBackgroudService diff --git a/docs/apis/apis.md b/docs/apis/apis.md index 9a76f30..7997592 100644 --- a/docs/apis/apis.md +++ b/docs/apis/apis.md @@ -7,19 +7,21 @@ [**Main**](../index.md#table-of-contents) -# Assembly HealthCheckPlus +# Assembly HealthCheckPlus.Abstractions + +## Namespace HealthCheckPlus.Abstractions -## Namespace HealthCheckPlus +- [HealthCheckTrigger](./healthcheckplus.abstractions.healthchecktrigger.md) -- [HealthCheckTrigger](./healthcheckplus.healthchecktrigger.md) +- [HealthReportExtensions](./healthcheckplus.abstractions.healthreportextensions.md) -- [HealthReportExtensions](./healthcheckplus.healthreportextensions.md) +- [IDataHealthPlus](./healthcheckplus.abstractions.idatahealthplus.md) -- [IDataHealthPlus](./healthcheckplus.idatahealthplus.md) +- [IHealthCheckPlusPublisher](./healthcheckplus.abstractions.ihealthcheckpluspublisher.md) -- [IHealthCheckPlusPublisher](./healthcheckplus.ihealthcheckpluspublisher.md) +- [IStateHealthChecksPlus](./healthcheckplus.abstractions.istatehealthchecksplus.md) -- [IStateHealthChecksPlus](./healthcheckplus.istatehealthchecksplus.md) +# Assembly HealthCheckPlus ## Namespace HealthCheckPlus.options diff --git a/docs/apis/healthcheckplus.healthchecktrigger.md b/docs/apis/healthcheckplus.abstractions.healthchecktrigger.md similarity index 94% rename from docs/apis/healthcheckplus.healthchecktrigger.md rename to docs/apis/healthcheckplus.abstractions.healthchecktrigger.md index 2e63468..fd3f4b2 100644 --- a/docs/apis/healthcheckplus.healthchecktrigger.md +++ b/docs/apis/healthcheckplus.abstractions.healthchecktrigger.md @@ -9,7 +9,7 @@ # HealthCheckTrigger -Namespace: HealthCheckPlus +Namespace: HealthCheckPlus.Abstractions Enumerator values for origin of last status result. @@ -17,7 +17,7 @@ Enumerator values for origin of last status result. public enum HealthCheckTrigger ``` -Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ValueType](https://docs.microsoft.com/en-us/dotnet/api/system.valuetype) → [Enum](https://docs.microsoft.com/en-us/dotnet/api/system.enum) → [HealthCheckTrigger](./healthcheckplus.healthchecktrigger.md)
+Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ValueType](https://docs.microsoft.com/en-us/dotnet/api/system.valuetype) → [Enum](https://docs.microsoft.com/en-us/dotnet/api/system.enum) → [HealthCheckTrigger](./healthcheckplus.abstractions.healthchecktrigger.md)
Implements [IComparable](https://docs.microsoft.com/en-us/dotnet/api/system.icomparable), [IFormattable](https://docs.microsoft.com/en-us/dotnet/api/system.iformattable), [IConvertible](https://docs.microsoft.com/en-us/dotnet/api/system.iconvertible) ## Fields diff --git a/docs/apis/healthcheckplus.healthreportextensions.md b/docs/apis/healthcheckplus.abstractions.healthreportextensions.md similarity index 96% rename from docs/apis/healthcheckplus.healthreportextensions.md rename to docs/apis/healthcheckplus.abstractions.healthreportextensions.md index ebd388a..87e7602 100644 --- a/docs/apis/healthcheckplus.healthreportextensions.md +++ b/docs/apis/healthcheckplus.abstractions.healthreportextensions.md @@ -9,7 +9,7 @@ # HealthReportExtensions -Namespace: HealthCheckPlus +Namespace: HealthCheckPlus.Abstractions The Extensions for HealthReport @@ -17,7 +17,7 @@ The Extensions for HealthReport public static class HealthReportExtensions ``` -Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [HealthReportExtensions](./healthcheckplus.healthreportextensions.md) +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [HealthReportExtensions](./healthcheckplus.abstractions.healthreportextensions.md) ## Methods diff --git a/docs/apis/healthcheckplus.idatahealthplus.md b/docs/apis/healthcheckplus.abstractions.idatahealthplus.md similarity index 94% rename from docs/apis/healthcheckplus.idatahealthplus.md rename to docs/apis/healthcheckplus.abstractions.idatahealthplus.md index 9bf5d20..645b83a 100644 --- a/docs/apis/healthcheckplus.idatahealthplus.md +++ b/docs/apis/healthcheckplus.abstractions.idatahealthplus.md @@ -9,7 +9,7 @@ # IDataHealthPlus -Namespace: HealthCheckPlus +Namespace: HealthCheckPlus.Abstractions Represents data from the last Health Check performed @@ -77,7 +77,7 @@ public abstract HealthCheckTrigger Origin { get; } #### Property Value -[HealthCheckTrigger](./healthcheckplus.healthchecktrigger.md)
+[HealthCheckTrigger](./healthcheckplus.abstractions.healthchecktrigger.md)
- - - diff --git a/docs/apis/healthcheckplus.ihealthcheckpluspublisher.md b/docs/apis/healthcheckplus.abstractions.ihealthcheckpluspublisher.md similarity index 96% rename from docs/apis/healthcheckplus.ihealthcheckpluspublisher.md rename to docs/apis/healthcheckplus.abstractions.ihealthcheckpluspublisher.md index 8115a1c..da4884c 100644 --- a/docs/apis/healthcheckplus.ihealthcheckpluspublisher.md +++ b/docs/apis/healthcheckplus.abstractions.ihealthcheckpluspublisher.md @@ -9,7 +9,7 @@ # IHealthCheckPlusPublisher -Namespace: HealthCheckPlus +Namespace: HealthCheckPlus.Abstractions Represents a publisher of information. diff --git a/docs/apis/healthcheckplus.istatehealthchecksplus.md b/docs/apis/healthcheckplus.abstractions.istatehealthchecksplus.md similarity index 95% rename from docs/apis/healthcheckplus.istatehealthchecksplus.md rename to docs/apis/healthcheckplus.abstractions.istatehealthchecksplus.md index 4053639..6b1ea1a 100644 --- a/docs/apis/healthcheckplus.istatehealthchecksplus.md +++ b/docs/apis/healthcheckplus.abstractions.istatehealthchecksplus.md @@ -9,7 +9,7 @@ # IStateHealthChecksPlus -Namespace: HealthCheckPlus +Namespace: HealthCheckPlus.Abstractions Represents the commands of the HealthChecksPlus for access data @@ -21,7 +21,7 @@ public interface IStateHealthChecksPlus ### **ConvertToPlus(HealthReport)** -Convert to [IDataHealthPlus](./healthcheckplus.idatahealthplus.md) +Convert to [IDataHealthPlus](./healthcheckplus.abstractions.idatahealthplus.md) ```csharp IEnumerable ConvertToPlus(HealthReport report) @@ -47,7 +47,7 @@ HealthStatus Status(string name) #### Parameters `name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
-name of url request([HealthCheckPlusOptions.HealthCheckName](./healthcheckplus.options.healthcheckplusoptions.md#healthcheckname)). +name for url request. #### Returns diff --git a/docs/apis/healthcheckplus.options.healthcheckplusoptions.md b/docs/apis/healthcheckplus.options.healthcheckplusoptions.md index 3895c14..b9a1d29 100644 --- a/docs/apis/healthcheckplus.options.healthcheckplusoptions.md +++ b/docs/apis/healthcheckplus.options.healthcheckplusoptions.md @@ -131,8 +131,9 @@ The . `report` HealthReport
The . -`statecache` [IStateHealthChecksPlus](./healthcheckplus.istatehealthchecksplus.md)
-The cache instance : [IStateHealthChecksPlus](./healthcheckplus.istatehealthchecksplus.md). +`statecache` IStateHealthChecksPlus
+The cache instance : [IStateHealthChecksPlus](./healthcheckplus.abstractions.istatehealthchecksplus.md). + #### Returns @@ -174,7 +175,7 @@ The . `report` HealthReport
The . -`statecache` [IStateHealthChecksPlus](./healthcheckplus.istatehealthchecksplus.md)
+`statecache` IStateHealthChecksPlus
The cache instance : [IStateHealthChecksPlus](./healthcheckplus.istatehealthchecksplus.md). #### Returns @@ -217,7 +218,7 @@ The . `report` HealthReport
The . -`statecache` [IStateHealthChecksPlus](./healthcheckplus.istatehealthchecksplus.md)
+`statecache` IStateHealthChecksPlus
The cache instance : [IStateHealthChecksPlus](./healthcheckplus.istatehealthchecksplus.md). #### Returns diff --git a/src/HealthCheckPlus.Abstractions/HealthCheckPlus.Abstractions.csproj b/src/HealthCheckPlus.Abstractions/HealthCheckPlus.Abstractions.csproj new file mode 100644 index 0000000..a82e286 --- /dev/null +++ b/src/HealthCheckPlus.Abstractions/HealthCheckPlus.Abstractions.csproj @@ -0,0 +1,66 @@ + + + + net8.0;net7.0;net6.0 + latest + en + HealthCheckPlus.Abstractions + HealthCheckPlus.Abstractions + Debug;Release;local + enable + enable + + + + Fernando Cerqueira + Abstractions HealthCheck with individual check interval and Unhealth/Degraded/Healthy interval policy + https://github.com/FRACerqueira/HealthCheckPlus/releases + HealthCheck;c#; + https://github.com/FRACerqueira/HealthCheckPlus + git + HealthCheckPlus.Abstractions + NugetREADME.md + https://fracerqueira.github.io/HealthCheckPlus + 2.0.1 + icon.png + © 2023 - Fernando Cerqueira + false + True + MIT + True + True + snupkg + + + + true + + + + + <_Parameter1>$(AssemblyName).Tests + + + + + + true + README.txt + + + + + + + + + + + + + + + + + + diff --git a/src/HealthCheckTrigger.cs b/src/HealthCheckPlus.Abstractions/HealthCheckTrigger.cs similarity index 96% rename from src/HealthCheckTrigger.cs rename to src/HealthCheckPlus.Abstractions/HealthCheckTrigger.cs index a4df70c..c88a7eb 100644 --- a/src/HealthCheckTrigger.cs +++ b/src/HealthCheckPlus.Abstractions/HealthCheckTrigger.cs @@ -3,7 +3,7 @@ // The maintenance and evolution is maintained by the HealthCheckPlus project under MIT license // ******************************************************************************************** -namespace HealthCheckPlus +namespace HealthCheckPlus.Abstractions { /// /// Enumerator values for origin of last status result. diff --git a/src/HealthReportExtensions.cs b/src/HealthCheckPlus.Abstractions/HealthReportExtensions.cs similarity index 99% rename from src/HealthReportExtensions.cs rename to src/HealthCheckPlus.Abstractions/HealthReportExtensions.cs index dc5e459..090436a 100644 --- a/src/HealthReportExtensions.cs +++ b/src/HealthCheckPlus.Abstractions/HealthReportExtensions.cs @@ -6,7 +6,7 @@ using System.Runtime.CompilerServices; using Microsoft.Extensions.Diagnostics.HealthChecks; -namespace HealthCheckPlus +namespace HealthCheckPlus.Abstractions { /// /// The Extensions for HealthReport diff --git a/src/IDataHealthPlus.cs b/src/HealthCheckPlus.Abstractions/IDataHealthPlus.cs similarity index 96% rename from src/IDataHealthPlus.cs rename to src/HealthCheckPlus.Abstractions/IDataHealthPlus.cs index b68c3af..55c4cb1 100644 --- a/src/IDataHealthPlus.cs +++ b/src/HealthCheckPlus.Abstractions/IDataHealthPlus.cs @@ -5,7 +5,7 @@ using Microsoft.Extensions.Diagnostics.HealthChecks; -namespace HealthCheckPlus +namespace HealthCheckPlus.Abstractions { /// /// Represents data from the last Health Check performed diff --git a/src/IHealthCheckPlusPublisher.cs b/src/HealthCheckPlus.Abstractions/IHealthCheckPlusPublisher.cs similarity index 59% rename from src/IHealthCheckPlusPublisher.cs rename to src/HealthCheckPlus.Abstractions/IHealthCheckPlusPublisher.cs index c09c65d..dfd883f 100644 --- a/src/IHealthCheckPlusPublisher.cs +++ b/src/HealthCheckPlus.Abstractions/IHealthCheckPlusPublisher.cs @@ -1,11 +1,16 @@ -using System; +// ******************************************************************************************** +// MIT LICENCE +// The maintenance and evolution is maintained by the HealthCheckPlus project under MIT license +// ******************************************************************************************** + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Extensions.Diagnostics.HealthChecks; -namespace HealthCheckPlus +namespace HealthCheckPlus.Abstractions { /// /// Represents a publisher of information. diff --git a/src/IStateHealthChecksPlus.cs b/src/HealthCheckPlus.Abstractions/IStateHealthChecksPlus.cs similarity index 95% rename from src/IStateHealthChecksPlus.cs rename to src/HealthCheckPlus.Abstractions/IStateHealthChecksPlus.cs index 7489459..b386bbe 100644 --- a/src/IStateHealthChecksPlus.cs +++ b/src/HealthCheckPlus.Abstractions/IStateHealthChecksPlus.cs @@ -3,10 +3,9 @@ // The maintenance and evolution is maintained by the HealthCheckPlus project under MIT license // ******************************************************************************************** -using HealthCheckPlus.options; using Microsoft.Extensions.Diagnostics.HealthChecks; -namespace HealthCheckPlus +namespace HealthCheckPlus.Abstractions { /// /// Represents the commands of the HealthChecksPlus for access data @@ -32,7 +31,7 @@ public interface IStateHealthChecksPlus /// /// Gets a representing the aggregate status of all the health checks. /// - /// name of url request(). + /// name for url request. /// HealthStatus Status(string? name = null); diff --git a/src/HealthCheckPlus.csproj b/src/HealthCheckPlus/HealthCheckPlus.csproj similarity index 70% rename from src/HealthCheckPlus.csproj rename to src/HealthCheckPlus/HealthCheckPlus.csproj index 1be9d0e..d71bae1 100644 --- a/src/HealthCheckPlus.csproj +++ b/src/HealthCheckPlus/HealthCheckPlus.csproj @@ -11,6 +11,12 @@ enable + + + + + + Fernando Cerqueira HealthCheck with individual check interval and Unhealth/Degraded/Healthy interval policy @@ -21,7 +27,7 @@ HealthCheckPlus NugetREADME.md https://fracerqueira.github.io/HealthCheckPlus - 2.0.0 + 2.0.1 icon.png © 2023 - Fernando Cerqueira false @@ -30,12 +36,13 @@ True True snupkg + $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage true - + <_Parameter1>$(AssemblyName).Tests @@ -51,12 +58,12 @@ - - + + - + @@ -71,4 +78,10 @@ + + + true + HealthCheckPlus.Abstractions.dll + + diff --git a/src/Internal/CacheHealthCheckPlus.cs b/src/HealthCheckPlus/Internal/CacheHealthCheckPlus.cs similarity index 97% rename from src/Internal/CacheHealthCheckPlus.cs rename to src/HealthCheckPlus/Internal/CacheHealthCheckPlus.cs index c900b94..071fe9e 100644 --- a/src/Internal/CacheHealthCheckPlus.cs +++ b/src/HealthCheckPlus/Internal/CacheHealthCheckPlus.cs @@ -3,6 +3,7 @@ // The maintenance and evolution is maintained by the HealthCheckPlus project under MIT license // ******************************************************************************************** +using HealthCheckPlus.Abstractions; using System.Collections.Concurrent; using HealthCheckPlus.options; using Microsoft.Extensions.Diagnostics.HealthChecks; @@ -204,7 +205,7 @@ public bool TryGetNotHealthy(out Dictionary result) { result.Add(item.Key, item.Value.Lastresult); } - return result.Any(); + return result.Count > 0; } public bool TryGetHealthy(out Dictionary result) @@ -214,7 +215,7 @@ public bool TryGetHealthy(out Dictionary result) { result.Add(item.Key, item.Value.Lastresult); } - return result.Any(); + return result.Count > 0; } public bool TryGetDegraded(out Dictionary result) @@ -224,7 +225,7 @@ public bool TryGetDegraded(out Dictionary result) { result.Add(item.Key, item.Value.Lastresult); } - return result.Any(); + return result.Count > 0; } public bool TryGetUnhealthy(out Dictionary result) @@ -234,7 +235,7 @@ public bool TryGetUnhealthy(out Dictionary result) { result.Add(item.Key, item.Value.Lastresult); } - return result.Any(); + return result.Count > 0; } public IEnumerable ConvertToPlus(HealthReport report) diff --git a/src/Internal/HealthCheckPlusBackGroundService.cs b/src/HealthCheckPlus/Internal/HealthCheckPlusBackGroundService.cs similarity index 99% rename from src/Internal/HealthCheckPlusBackGroundService.cs rename to src/HealthCheckPlus/Internal/HealthCheckPlusBackGroundService.cs index 53e7cfc..333c202 100644 --- a/src/Internal/HealthCheckPlusBackGroundService.cs +++ b/src/HealthCheckPlus/Internal/HealthCheckPlusBackGroundService.cs @@ -4,7 +4,7 @@ // ******************************************************************************************** using System.Diagnostics; -using System.Threading; +using HealthCheckPlus.Abstractions; using HealthCheckPlus.Internal.WrapperMicrosoft; using HealthCheckPlus.options; using Microsoft.Extensions.Diagnostics.HealthChecks; diff --git a/src/Internal/ItemCacheHealth.cs b/src/HealthCheckPlus/Internal/ItemCacheHealth.cs similarity index 95% rename from src/Internal/ItemCacheHealth.cs rename to src/HealthCheckPlus/Internal/ItemCacheHealth.cs index d02f950..a0923a8 100644 --- a/src/Internal/ItemCacheHealth.cs +++ b/src/HealthCheckPlus/Internal/ItemCacheHealth.cs @@ -3,6 +3,7 @@ // The maintenance and evolution is maintained by the HealthCheckPlus project under MIT license // ******************************************************************************************** +using HealthCheckPlus.Abstractions; using Microsoft.Extensions.Diagnostics.HealthChecks; namespace HealthCheckPlus.Internal diff --git a/src/Internal/Policies/HealthCheckPlusPolicyStatus.cs b/src/HealthCheckPlus/Internal/Policies/HealthCheckPlusPolicyStatus.cs similarity index 100% rename from src/Internal/Policies/HealthCheckPlusPolicyStatus.cs rename to src/HealthCheckPlus/Internal/Policies/HealthCheckPlusPolicyStatus.cs diff --git a/src/Internal/Policies/IHealthCheckPlusPolicyStatus.cs b/src/HealthCheckPlus/Internal/Policies/IHealthCheckPlusPolicyStatus.cs similarity index 100% rename from src/Internal/Policies/IHealthCheckPlusPolicyStatus.cs rename to src/HealthCheckPlus/Internal/Policies/IHealthCheckPlusPolicyStatus.cs diff --git a/src/Internal/WrapperBaseHealthCheckPlus.cs b/src/HealthCheckPlus/Internal/WrapperBaseHealthCheckPlus.cs similarity index 100% rename from src/Internal/WrapperBaseHealthCheckPlus.cs rename to src/HealthCheckPlus/Internal/WrapperBaseHealthCheckPlus.cs diff --git a/src/Internal/WrapperMicrosoft/DefaultHealthCheckServicePlus.cs b/src/HealthCheckPlus/Internal/WrapperMicrosoft/DefaultHealthCheckServicePlus.cs similarity index 99% rename from src/Internal/WrapperMicrosoft/DefaultHealthCheckServicePlus.cs rename to src/HealthCheckPlus/Internal/WrapperMicrosoft/DefaultHealthCheckServicePlus.cs index c057c10..5300f5a 100644 --- a/src/Internal/WrapperMicrosoft/DefaultHealthCheckServicePlus.cs +++ b/src/HealthCheckPlus/Internal/WrapperMicrosoft/DefaultHealthCheckServicePlus.cs @@ -5,6 +5,7 @@ // The maintenance and evolution is maintained by the HealthCheckPlus project under MIT license // ******************************************************************************************** +using HealthCheckPlus.Abstractions; using HealthCheckPlus.Internal.Policies; using HealthCheckPlus.options; using Microsoft.Extensions.DependencyInjection; diff --git a/src/Internal/WrapperMicrosoft/HealthCheckMiddlewarePlus.cs b/src/HealthCheckPlus/Internal/WrapperMicrosoft/HealthCheckMiddlewarePlus.cs similarity index 98% rename from src/Internal/WrapperMicrosoft/HealthCheckMiddlewarePlus.cs rename to src/HealthCheckPlus/Internal/WrapperMicrosoft/HealthCheckMiddlewarePlus.cs index 3dc0a5a..a93bb30 100644 --- a/src/Internal/WrapperMicrosoft/HealthCheckMiddlewarePlus.cs +++ b/src/HealthCheckPlus/Internal/WrapperMicrosoft/HealthCheckMiddlewarePlus.cs @@ -6,6 +6,7 @@ // ******************************************************************************************** using HealthCheckPlus.options; +using HealthCheckPlus.Abstractions; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Diagnostics.HealthChecks; using Microsoft.Extensions.Options; diff --git a/src/Microsoft.AspNetCore.Builder/HealthChecksPlusAppExtension.cs b/src/HealthCheckPlus/Microsoft.AspNetCore.Builder/HealthChecksPlusAppExtension.cs similarity index 99% rename from src/Microsoft.AspNetCore.Builder/HealthChecksPlusAppExtension.cs rename to src/HealthCheckPlus/Microsoft.AspNetCore.Builder/HealthChecksPlusAppExtension.cs index 1d19286..ffed0ee 100644 --- a/src/Microsoft.AspNetCore.Builder/HealthChecksPlusAppExtension.cs +++ b/src/HealthCheckPlus/Microsoft.AspNetCore.Builder/HealthChecksPlusAppExtension.cs @@ -3,7 +3,7 @@ // The maintenance and evolution is maintained by the HealthCheckPlus project under MIT license // ******************************************************************************************** -using HealthCheckPlus; +using HealthCheckPlus.Abstractions; using HealthCheckPlus.Internal; using HealthCheckPlus.Internal.WrapperMicrosoft; using HealthCheckPlus.options; diff --git a/src/Microsoft.Extensions.DependencyInjection/HealthChecksPlusExtension.cs b/src/HealthCheckPlus/Microsoft.Extensions.DependencyInjection/HealthChecksPlusExtension.cs similarity index 99% rename from src/Microsoft.Extensions.DependencyInjection/HealthChecksPlusExtension.cs rename to src/HealthCheckPlus/Microsoft.Extensions.DependencyInjection/HealthChecksPlusExtension.cs index ce7f663..a90527d 100644 --- a/src/Microsoft.Extensions.DependencyInjection/HealthChecksPlusExtension.cs +++ b/src/HealthCheckPlus/Microsoft.Extensions.DependencyInjection/HealthChecksPlusExtension.cs @@ -4,7 +4,7 @@ // ******************************************************************************************** using System.Collections.Concurrent; -using HealthCheckPlus; +using HealthCheckPlus.Abstractions; using HealthCheckPlus.Internal; using HealthCheckPlus.Internal.Policies; using HealthCheckPlus.Internal.WrapperMicrosoft; diff --git a/src/options/HealthCheckPlusBackGroundOptions.cs b/src/HealthCheckPlus/options/HealthCheckPlusBackGroundOptions.cs similarity index 100% rename from src/options/HealthCheckPlusBackGroundOptions.cs rename to src/HealthCheckPlus/options/HealthCheckPlusBackGroundOptions.cs diff --git a/src/options/HealthCheckPlusOptions.cs b/src/HealthCheckPlus/options/HealthCheckPlusOptions.cs similarity index 99% rename from src/options/HealthCheckPlusOptions.cs rename to src/HealthCheckPlus/options/HealthCheckPlusOptions.cs index b3e6c3e..baf11dc 100644 --- a/src/options/HealthCheckPlusOptions.cs +++ b/src/HealthCheckPlus/options/HealthCheckPlusOptions.cs @@ -5,6 +5,7 @@ using System.Text.Json; using System.Text.Json.Serialization; +using HealthCheckPlus.Abstractions; using Microsoft.AspNetCore.Diagnostics.HealthChecks; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Diagnostics.HealthChecks; diff --git a/src/options/PublishingOptions.cs b/src/HealthCheckPlus/options/PublishingOptions.cs similarity index 100% rename from src/options/PublishingOptions.cs rename to src/HealthCheckPlus/options/PublishingOptions.cs diff --git a/NugetREADME.md b/src/NugetREADME.md similarity index 93% rename from NugetREADME.md rename to src/NugetREADME.md index 8b9d7b9..cb5f5a7 100644 --- a/NugetREADME.md +++ b/src/NugetREADME.md @@ -6,6 +6,11 @@ ## What's new in the latest version +### V2.0.1 + +- Created dependency isolation package: HealthCheckPlus.Abstractions + - Now all public interfaces and classes are isolated in another assembly + ### V2.0.0 [**Top**](#table-of-contents) diff --git a/README.txt b/src/README.txt similarity index 98% rename from README.txt rename to src/README.txt index d9d072d..19b12c8 100644 --- a/README.txt +++ b/src/README.txt @@ -24,6 +24,13 @@ HealthCheckPlus was developed in c# with the **.Net6** , **.Net7** and **.Net8** Visit the official page for more documentation : https://fracerqueira.github.io/HealthCheckPlus +What's new V2.0.1 +***************** + +- Created dependency isolation package: HealthCheckPlus.Abstractions + - Now all public interfaces and classes are isolated in another assembly + + What's new V2.0.0 *****************