Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
064172e
Added JSON Arrays Support
alfkonee Jul 16, 2020
9e19b9f
Consul Updated
alfkonee Sep 18, 2020
a76447b
Refractor and Library Updates to .NET 5
alfkonee Jul 17, 2021
9917e9d
Merge remote-tracking branch 'origin/master' into move-to-new
alfkonee Jul 17, 2021
3aa834e
Added Azure Pipelines Build for Internal Builds
alfkonee Jul 17, 2021
759407e
Updated to Copy nugets
aneequaye Jul 17, 2021
5f3adb4
Removed Branch Tags
alfkonee Jul 17, 2021
c50a1eb
GitVersion develop branch name fix
alfkonee Jul 17, 2021
43f85b4
Tag less Versions
alfkonee Jul 17, 2021
0b7f86f
use Mainline for GitVersions
alfkonee Jul 17, 2021
0546179
(versioning) Added main back
alfkonee Jul 17, 2021
eb5c648
Updates to Nuget Packages
aneequaye Jul 18, 2021
23238e1
Fixed Service Description Typos
aneequaye Jul 22, 2021
a3d0ddb
Remove unneeded SDK Switch
aneequaye Jul 22, 2021
e6bcc67
Processing Refactorings
aneequaye Aug 27, 2021
698f044
Added Support for Root Level KV Pairs Using the _ as the Key
aneequaye Aug 27, 2021
a36f61c
Updated Nugets for Consul
aneequaye Aug 28, 2021
a555f98
Nugets Updates to Latest Packages
aneequaye Aug 28, 2021
67e5139
Merge branch 'dev'
aneequaye Aug 31, 2021
81016d8
fixed double injection of dispatcher
aneequaye Sep 12, 2021
725db44
Merge branch 'main' into dev
aneequaye Sep 27, 2021
ca73741
Upgrade to .NET 6
aneequaye Nov 16, 2021
095e1df
Updates for .env based Migrations
aneequaye Dec 23, 2021
0371ca1
db(Products): Improvements to App Categorization
aneequaye Dec 25, 2021
9a1c1ed
Fix Builds
Feb 17, 2022
f7fdf60
Update azure-pipelines.yml for Azure Pipelines
Feb 17, 2022
b8f63e0
Updated GitTag Task
Feb 17, 2022
09cda4b
Change Agent to LCC
Feb 17, 2022
e24863b
Reordered dotnet sdk installation
Feb 17, 2022
808ff7b
run on succesed and chage feed for int
Feb 17, 2022
1cf4fdf
Build Only SRC Files
Feb 17, 2022
2b225d5
RM WS
Feb 22, 2022
f31a38d
Use Correct Task DisplayName for Description
Mar 3, 2022
936910b
chore(pipelines) Improvement to Build Pipelines
Mar 3, 2022
63d7fe2
chore(pipelines) Added PR Build Name Formatting
Mar 3, 2022
f19537f
Merged PR 3: Improvement to Build Pipelines
Mar 3, 2022
8c67751
chore(versioning) Master updates Minor
Mar 3, 2022
3aee275
Merge branch 'master' into dev
Apr 19, 2022
13f3a7e
Consul Updates
Apr 19, 2022
8d277e3
Nuget Updates to 6.0.1
Apr 19, 2022
c0aea02
Updated Consul
Jun 16, 2022
806a103
📌 Update Consul to 1.6.10.7
Oct 5, 2022
919cbb2
🎨 Use Dictionaries for KV Parsers instead of KeyValuePairs
Jan 5, 2023
20f5cd9
📌 revert back to .net 461
Jan 16, 2023
4a54d78
Use net462 instead
alfkonee Feb 29, 2024
825216d
🎨 Improved code readability by reformatting indentation
alfkonee Mar 3, 2024
cd99ddc
👌 Adjust minor formatting and add exception in OrganizationRepository
alfkonee Mar 3, 2024
e663db4
📦🔼 Update package versions and add MinVer
alfkonee Apr 17, 2024
cc2f2d9
🔼 Upgrade SDK version in configuration
alfkonee Jun 6, 2024
1e1dccf
WIP SMS Portal Revamp
alfkonee Jun 27, 2024
dcfda11
✨⬆️ Update Consul package to version 1.7.14.4
alfkonee Sep 27, 2024
e1cf32b
🛠️ Update package version for Configuration.Json
alfkonee Oct 25, 2024
620c124
Update Consul Config Deps
alfkonee Nov 20, 2024
ffdcf06
🔧 Update Consul package version to 1.7.14.6
alfkonee Dec 5, 2024
28418f6
Merge branch 'master' into feature/dictionary-improvements
alfkonee Jan 20, 2025
42014b4
Updated Deps for Winton
alfkonee Jan 23, 2025
33e9e4f
🔧 Upgrade dependency versions
alfkonee Feb 16, 2025
2afdfd5
🔧 Update Microsoft.Extensions.Configuration packages to version 9.0.4
alfkonee Apr 14, 2025
80b7b36
Update dWait-for-it
alfkonee Jun 8, 2025
4549aaa
🛠️ Add GitHub Actions CI/CD and update service variables
alfkonee Jun 9, 2025
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
4 changes: 4 additions & 0 deletions .azpipelines/variables.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"ServiceName": "tech231ConsulConfigProvider",
"ServiceDescription": "Tech231 Consul Configuration Provider"
}
76 changes: 76 additions & 0 deletions .github/workflows/dotnet-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: .NET CI/CD

on:
push:
branches:
- master
- dev
workflow_dispatch: # Allows manual triggering

env:
BUILD_CONFIGURATION: Release
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_NOLOGO: true

jobs:
build-and-validate:
name: Build, Validate, and Publish
runs-on: ubuntu-latest # Change if 'LCC' was a self-hosted runner pool
permissions:
contents: write # For git tag and push
packages: write # For publishing to GitHub Packages

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for GitVersion to determine the version accurately
persist-credentials: true # Needed for git push operations

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json # Remove if no global.json or specify path

- name: Setup GitVersion
uses: gittools/actions/gitversion/setup@v1.1.1
with:
versionSpec: '5.x'

- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v1.1.1

- name: Restore NuGet packages
run: dotnet restore src/**/*.csproj --configuration ${{ env.BUILD_CONFIGURATION }}

- name: Build project
run: dotnet build src/**/*.csproj --configuration ${{ env.BUILD_CONFIGURATION }} --no-restore /p:Version=${{ steps.gitversion.outputs.nuGetVersion }}

- name: Create NuGet Package
run: dotnet pack src/**/*.csproj --configuration ${{ env.BUILD_CONFIGURATION }} --no-build /p:Version=${{ steps.gitversion.outputs.nuGetVersion }} -o ./packages

- name: Upload NuGet Package Artifact
if: success() && github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
name: nuget-packages
path: ./packages/**/*.nupkg

- name: Publish to GitHub Packages
if: success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev')
run: |
dotnet nuget push "./packages/**/*.nupkg" \
--api-key "${{ secrets.GITHUB_TOKEN }}" \
--source "https://nuget.pkg.github.com/${{ github.repository_owner }}" \
--skip-duplicate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Git Tag
if: success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev')
run: |
git config user.name "GitHub Actions Bot"
git config user.email "actions@github.com"
git tag v${{ steps.gitversion.outputs.nuGetVersion }}
git push origin v${{ steps.gitversion.outputs.nuGetVersion }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,6 @@ paket-files/
.vscode
.build
.DS_Store

#SonarQube Analysis Files
.sonarqube
30 changes: 15 additions & 15 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<Project>
<PropertyGroup>
<Authors>Winton</Authors>
<Company>Winton</Company>
<Copyright>Copyright 2019 Winton</Copyright>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Rules.ruleset</CodeAnalysisRuleSet>
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
<Authors>Winton</Authors>
<Company>Winton</Company>
<Copyright>Copyright 2019 Winton</Copyright>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Rules.ruleset</CodeAnalysisRuleSet>
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" />
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json"/>
</ItemGroup>

<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All"/>
</ItemGroup>
</Project>
36 changes: 27 additions & 9 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
assembly-versioning-scheme: MajorMinorPatch
mode: ContinuousDeployment
continuous-delivery-fallback-tag: ''
mode: Mainline

branches:

branches:
master:
regex: master
tag: master
regex: ^(master|main)$
mode: ContinuousDelivery
tag: ''
increment: Minor
prevent-increment-of-merged-branch-version: true
feature:
regex: feature[/-]
tag: a{BranchName}
increment: Minor
track-merge-target: false
tracks-release-branches: false
is-release-branch: false
develop:
regex: ^dev(elop)?(ment)?$
mode: ContinuousDeployment
tag: ''
increment: Patch
prevent-increment-of-merged-branch-version: false
track-merge-target: true
tracks-release-branches: true
is-release-branch: false
patch:
regex: patch[/-]
tag: useBranchName
Expand All @@ -24,3 +32,13 @@ branches:
tag: rc
increment: None
prevent-increment-of-merged-branch-version: false
pull-request:
regex: ^(pull|pull\-requests|pr)[/-]
mode: ContinuousDelivery
tag: pr
increment: Inherit
prevent-increment-of-merged-branch-version: false
tag-number-pattern: '[/-](?<number>\d+)[-/]'
track-merge-target: false
tracks-release-branches: false
is-release-branch: false
4 changes: 4 additions & 0 deletions Winton.Extensions.Configuration.Consul.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,8 @@
<s:String x:Key="/Default/CodeStyle/CSharpVarKeywordUsage/ForSimpleTypes/@EntryValue">UseVar</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateConstants/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="_" Suffix="" Style="AaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=236f7aa5_002D7b06_002D43ca_002Dbf2a_002D9b31bfcff09a/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Any" AccessRightKinds="Private" Description="Constant fields (private)"&gt;&lt;ElementKinds&gt;&lt;Kind Name="CONSTANT_FIELD" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="_" Suffix="" Style="AaBb" /&gt;&lt;/Policy&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=4a98fdf6_002D7d98_002D4f5a_002Dafeb_002Dea44ad98c70c/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Instance" AccessRightKinds="Private" Description="Instance fields (private)"&gt;&lt;ElementKinds&gt;&lt;Kind Name="FIELD" /&gt;&lt;Kind Name="READONLY_FIELD" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="_" Suffix="" Style="aaBb" /&gt;&lt;/Policy&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FBLOCK_005FSCOPE_005FCONSTANT/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FBLOCK_005FSCOPE_005FFUNCTION/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>

Expand Down Expand Up @@ -465,11 +467,13 @@
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpRenamePlacementToArrangementMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002EMemberReordering_002EMigrations_002ECSharpFileLayoutPatternRemoveIsAttributeUpgrade/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAlwaysTreatStructAsNotReorderableMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EPredefinedNamingRulesToUserRulesUpgrade/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EJavaScript_002ECodeStyle_002ESettingsUpgrade_002EJsParsFormattingSettingsUpgrader/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EJavaScript_002ECodeStyle_002ESettingsUpgrade_002EJsWrapperSettingsUpgrader/@EntryIndexedValue">True</s:Boolean>

Expand Down
101 changes: 101 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: $(BuildDefinitionName)_$(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
trigger:
batch: true
branches:
include:
- master
- dev

pool: 'LCC'

variables:
buildConfiguration: 'Release'

stages:
- stage: DataBuild
displayName: Build and Validation
jobs:
- job: BuildValidate
displayName: Build and Analyze
steps:
- checkout: self
clean: true
persistCredentials: true
- task: oneLuckiDevJson2Variable@1
displayName: Parse JsonConfig
inputs:
jsonFile: .azpipelines/variables.json
shouldPrefixVariables: true
variablePrefix: 'deploy'
- task: UseDotNet@2
displayName: Use .NET From Global for Project Build
inputs:
packageType: 'sdk'
useGlobalJson: true
performMultiLevelLookup: true
- task: gitversion/setup@0
displayName: 'GitVersion Setup'
inputs:
versionSpec: '5.x'
- task: gitversion/execute@0
displayName: 'GitVersion Update'
- task: SonarQubePrepare@4
displayName: Prep Work For SonarQube
inputs:
SonarQube: 'ACS SonarQube'
scannerMode: 'MSBuild'
projectKey: $(deploy.ServiceName)
projectName: $(deploy.ServiceDescription)
projectVersion: $(GitVersion.SemVer)
extraProperties: |
sonar.dependencyCheck.reportPath=$(Build.SourcesDirectory)/dependency-check-report.xml
sonar.dependencyCheck.htmlReportPath=$(Build.SourcesDirectory)/dependency-check-report.html
sonar.cpd.exclusions=**/AssemblyInfo.cs,**/*.g.cs
sonar.cs.vscoveragexml.reportsPaths=$(System.DefaultWorkingDirectory)/**/*.coveragexml
sonar.cs.vstest.reportsPaths=$(System.DefaultWorkingDirectory)/**/*.trx
- task: DotNetCoreCLI@2
displayName: 'Nuget Restore App'
inputs:
command: 'restore'
projects: 'src/**/*.csproj'
restoreArguments: '/p:Configuration=$(buildConfiguration)'
feedsToUse: 'select'
vstsFeed: 'acsint'
noCache: true
verbosityRestore: 'Normal'
- task: DotNetCoreCLI@2
displayName: 'Build App'
inputs:
command: 'build'
projects: 'src/**/*.csproj'
arguments: '-c $(buildConfiguration) --no-restore /p:Version=$(GitVersion.NuGetVersion)'
- task: SonarQubeAnalyze@4
displayName: 'Run Code Analysis'
- task: SonarQubePublish@4
displayName: 'Publish Quality Gate Result'
inputs:
pollingTimeoutSec: '1500'
- task: CopyFiles@2
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
inputs:
SourceFolder: ''
Contents: '**/*.nupkg'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
OverWrite: true
flattenFolders: true
- task: PublishBuildArtifacts@1
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
- task: GitTag@6
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
inputs:
workingdir: '$(System.DefaultWorkingDirectory)'
tagUser: 'Alfred Neequaye'
tagEmail: 'aneequaye@acsghana.com'
tag: 'v$(GitVersion.NuGetVersion)'
forceTagCreation: true
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "8.0.300",
"rollForward": "latestPatch"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,42 @@

namespace Winton.Extensions.Configuration.Consul
{
/// <summary>
/// Extensions for the <see cref="IConfigurationBuilder" /> that provide syntactic sugar for
/// using the <see cref="IConsulConfigurationSource" />.
/// </summary>
public static class ConfigurationBuilderExtensions
{
/// <summary>
/// Extensions for the <see cref="IConfigurationBuilder" /> that provide syntactic sugar for
/// using the <see cref="IConsulConfigurationSource" />.
/// Adds Consul as a configuration source to the <see cref="IConfigurationBuilder" />
/// using the default settings in <see cref="IConsulConfigurationSource" />.
/// </summary>
public static class ConfigurationBuilderExtensions
/// <param name="builder">The builder to add consul to.</param>
/// <param name="key">The key in consul where the configuration is located.</param>
/// <returns>The builder.</returns>
public static IConfigurationBuilder AddConsul(
this IConfigurationBuilder builder,
string key)
{
/// <summary>
/// Adds Consul as a configuration source to the <see cref="IConfigurationBuilder" />
/// using the default settings in <see cref="IConsulConfigurationSource" />.
/// </summary>
/// <param name="builder">The builder to add consul to.</param>
/// <param name="key">The key in consul where the configuration is located.</param>
/// <returns>The builder.</returns>
public static IConfigurationBuilder AddConsul(
this IConfigurationBuilder builder,
string key)
{
return builder.AddConsul(key, options => { });
}
return builder.AddConsul(key, options => { });
}

/// <summary>
/// Adds Consul as a configuration source to the <see cref="IConfigurationBuilder" />
/// and applies the given overrides to the <see cref="IConsulConfigurationSource" />.
/// </summary>
/// <param name="builder">The builder to add consul to.</param>
/// <param name="key">The key in consul where the configuration is located.</param>
/// <param name="options">An action used to configure the options of the <see cref="IConsulConfigurationSource" />.</param>
/// <returns>The builder.</returns>
public static IConfigurationBuilder AddConsul(
this IConfigurationBuilder builder,
string key,
Action<IConsulConfigurationSource> options)
{
var consulConfigSource = new ConsulConfigurationSource(key);
options(consulConfigSource);
return builder.Add(consulConfigSource);
}
/// <summary>
/// Adds Consul as a configuration source to the <see cref="IConfigurationBuilder" />
/// and applies the given overrides to the <see cref="IConsulConfigurationSource" />.
/// </summary>
/// <param name="builder">The builder to add consul to.</param>
/// <param name="key">The key in consul where the configuration is located.</param>
/// <param name="options">An action used to configure the options of the <see cref="IConsulConfigurationSource" />.</param>
/// <returns>The builder.</returns>
public static IConfigurationBuilder AddConsul(
this IConfigurationBuilder builder,
string key,
Action<IConsulConfigurationSource> options)
{
var consulConfigSource = new ConsulConfigurationSource(key);
options(consulConfigSource);
return builder.Add(consulConfigSource);
}
}
}
Loading
Loading