Skip to content

Commit 2d29146

Browse files
fix build
1 parent 1b1df35 commit 2d29146

2 files changed

Lines changed: 18 additions & 17 deletions

File tree

src/TemplatedConfiguration.Example/Program.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ public class Global
4141
{
4242
{"settinga", "abc" },
4343
// Default global settings.
44-
{"Global.ConnectionString.Security", "Integrated Security=true;" },
45-
{"Global.ConnectionString.Settings", "" },
44+
{"Global:ConnectionString:Security", "Integrated Security=true;" },
45+
{"Global:ConnectionString:Settings", "" },
4646
};
4747
}
4848

@@ -52,15 +52,15 @@ public class ComponentA
5252
{
5353
// The connection string is composed from parts
5454
// But can also be overwritten as a whole
55-
{"ComponentA.ConnectionString", "{ComponentA.ConnectionString.Security}Server={ComponentA.ConnectionString.ServerName};Database={ComponentA.ConnectionString.DatabaseName}{ComponentA.ConnectionString.Settings}"},
55+
{"ComponentA.ConnectionString", "{ComponentA:ConnectionString:Security}Server={ComponentA:ConnectionString:ServerName};Database={ComponentA:ConnectionString:DatabaseName}{ComponentA:ConnectionString:Settings}"},
5656

5757
// Each part can be overwritten per 'component' or globally
58-
{"ComponentA.ConnectionString.Security", "{Global.ConnectionString.Security}" },
59-
{"ComponentA.ConnectionString.ServerName", "{Global.ConnectionString.ServerName}" },
60-
{"ComponentA.ConnectionString.Settings", "{Global.ConnectionString.Settings}" },
58+
{"ComponentA:ConnectionString:Security", "{Global:ConnectionString:Security}" },
59+
{"ComponentA:ConnectionString:ServerName", "{Global:ConnectionString:ServerName}" },
60+
{"ComponentA:ConnectionString:Settings", "{Global:ConnectionString:Settings}" },
6161

6262
// Some default settings are simply hard coded, such as the default database name
63-
{"ComponentA.ConnectionString.DatabaseName", "ComponentA" },
63+
{"ComponentA:ConnectionString:DatabaseName", "ComponentA" },
6464
};
6565
}
6666
public class ComponentB
@@ -69,15 +69,15 @@ public class ComponentB
6969
{
7070
// The connection string is composed from parts
7171
// But can also be overwritten as a whole
72-
{"ComponentB.ConnectionString", "{ComponentB.ConnectionString.Security}Server={ComponentB.ServerName};Database={ComponentB.DatabaseName}{ComponentB.ConnectionString.Settings}"},
72+
{"ComponentB.ConnectionString", "{ComponentB:ConnectionString:Security}Server={ComponentB.ServerName};Database={ComponentB.DatabaseName}{ComponentB:ConnectionString:Settings}"},
7373

7474
// Each part can be overwritten per 'component' or globally
75-
{"ComponentB.ConnectionString.Security", "{Global.ConnectionString.Security}" },
76-
{"ComponentB.ConnectionString.ServerName", "{Global.ConnectionString.ServerName}" },
77-
{"ComponentB.ConnectionString.Settings", "{Global.ConnectionString.Settings}" },
75+
{"ComponentB:ConnectionString:Security", "{Global:ConnectionString:Security}" },
76+
{"ComponentB:ConnectionString:ServerName", "{Global:ConnectionString:ServerName}" },
77+
{"ComponentB:ConnectionString:Settings", "{Global:ConnectionString:Settings}" },
7878

7979
// Some default settings are simply hard coded, such as the default database name
80-
{"ComponentB.ConnectionString.DatabaseName", "ComponentA" },
80+
{"ComponentB:ConnectionString:DatabaseName", "ComponentA" },
8181
};
8282
}
8383
}

src/TemplatedConfiguration/TemplatedConfiguration.csproj

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@
33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
55
<Version>0.2.0</Version>
6-
<PackageProjectUrl>https://github.com/erwinvandervalk/templatedconfiguration</PackageProjectUrl>
7-
<PackageTags>Configuration, Microsoft.Extensions.Configuration, Templating</PackageTags>
8-
<RepositoryUrl>https://github.com/erwinvandervalk/templatedconfiguration</RepositoryUrl>
9-
<RepositoryType>Github</RepositoryType>
10-
<PackageLicenseUrl>https://opensource.org/licenses/MIT</PackageLicenseUrl>
6+
<PackageProjectUrl>https://github.com/erwinvandervalk/templatedconfiguration/</PackageProjectUrl>
7+
<PackageTags></PackageTags>
8+
<RepositoryUrl>https://github.com/erwinvandervalk/templatedconfiguration/</RepositoryUrl>
9+
<RepositoryType></RepositoryType>
10+
<PackageLicenseUrl>https://opensource.org/licenses/MIT/</PackageLicenseUrl>
1111
<Description>This library is an extension for Microsoft.Extensions.Configuration, which helps you to do recursive templating in configuration settings.
1212

1313
When retrieving a configuration setting value, it will look for {placeholders}. If it finds any placeholder, it will try to see if the placeholder is actually configured as a setting. It will then (recursively) replace any placeholders within the setting's value.
1414

1515
This means you can compose configuration settings out of other configuration settings, which will allow you to override only parts of a config setting or the entire setting.</Description>
1616
<Authors>Erwin van der Valk</Authors>
1717
<Company>Erwin van der Valk BV</Company>
18+
<PackageReleaseNotes>Adds support for configuration sections (separated by :) character</PackageReleaseNotes>
1819
</PropertyGroup>
1920

2021
<ItemGroup>

0 commit comments

Comments
 (0)