public interface IConfigurable<T>
Public Interface IConfigurable(Of T)
generic<typename T> public interface class IConfigurable
type IConfigurable<'T> = interface end
Thetype exposes the following members.
Gets the instance of T representing the Configuration for the implementation instance.
Fetches the configuration for the current instance of the implementation from the Configuration Manager and configures the instance with the returned Configuration T.
Configures the current instance of the implementation with the supplied Configuration T.
Stores the Configuration for the current instance of the implementation to the Configuration Manager.
When implemented, the implementing class gains the ability to store named instances of type T in the application configuration file. The type T is defined by the implementing class.
Any class wishing to store configuration information must to implement this interface and must also provide the static method GetConfigurationDefinition(), which returns the ConfigurationDefinition for the class.
These static methods are implemented to allow the ConfigurationManager to configure new instances of a class (for instance, a Plugin) without requiring an instance to be created first. Without this functionality the ConfigurationManager (or API, or whatever is trying to configure a new instance) would need to create a temporary "dummy" instance of the object, fetch the ConfigurationDefinition and default Configuration from that instance, then discard it. The static methods provide a cleaner method for doing this.