Skip to content
Fábio Caldas edited this page Aug 4, 2015 · 7 revisions

Welcome to the C# DynamicSection wiki!

About the project

The project was created to allow change C# custom ConfigurationSection properties based on defined storage.

Nuget

The project is avaliable at Nuget Package, the command to install is:

PM> Install-Package DynamicConfigurationSection

How it's works

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.

Plugins

For while we have just one plugin implemented by VTEX, that is Aerospike Plugin. Soon we hope to finish AWS S3 plugin too.

Clone this wiki locally