-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the C# DynamicSection wiki!
The project was created to allow change C# custom ConfigurationSection properties based on defined storage.
The project is avaliable at Nuget Package, the command to install is:
PM> Install-Package DynamicConfigurationSection
In order to extend your custom ConfigurationSection you need to inherits DynamicConfigurationSection class:
public class MyCustomConfigurationSection : DynamicConfigurationSection
And at config file, you need to set the property refreshPluginType providing the type of plugin that will be used to store/retreive configuration.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section type="SampleConsoleApplication.CustomConfigurationSection, SampleConsoleApplication" name="Custom" />
</configSections>
<Custom test="ABC" refreshPluginType="SampleConsoleApplication.TestConfigurationReloadPlugin, SampleConsoleApplication" />
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
That way every minute on '00' seconds, the plugin will be invoked and it can then retreive properties from final storage place. Any new value set on any property will be handled by DynamicConfigurationSection class.
For while we have just one plugin implemented by VTEX, that is Aerospike Plugin. Soon we hope to finish AWS S3 plugin too.
If you are facing problems or have questions fell free to use our issues page