Contains the functionality for an object to support configuration. A Configurable object has a Name property, implementing the INamed interface. Its configuration is automatically persisted as a string in WL8's settings file, and is contained in the Configuration parameter. The ConfigurationType property determines whether the configuration string is an object-specific, plain vanilla format, or represents a persisted ParameterList. In the latter case, the object's Parameters property contains its parameters.
The key that is used when WL8 saves this item's Configuration to the settings file. By default, ConfigKey is composed of ConfigPrefix + "_" + Name. You can override this property to specify a different ConfigKey, which is useful in cases where multiple components must share the same configuration.
Returns the prefix that will be used when creating a key to store the item's Configuration in the WL8 settings file. Each class of item has been given a short two- or three-character prefix. For example, Historical Providers are "HP" and Streaming Providers are "SP".
Determines whether the Configuration string is a plain vanilla string, or a persisted instance of a ParameterList. For the latter case, the object's Parameters property will contain the parsed parameters. Possible values are ConfigurableType.VanillaString and ConfigurableType.ParameterList.
Contains the configuration of the item expressed as a single string. If ConfigurableType is equal to ConfigurableType.ParameterList, then this string is the persisted Parameters instance.
Causes WL8 to bring up a configuration dialog allowing the user to edit the object's configuration. If the object uses a ParameterList as its configuration, WL8 will bring up a parameter editor dialog. If you're developing your own WIndows/WPF WL8 extension, you can provide a custom editor by creating a class descending from ObjectEditorBase, defined in the WealthLab.WPF library.
Override this method to populate a Configurable object's Parameters property with instances of the Parameter class. This method is relevant only if the object's ConfigurableType is equal to ConfigurableType.ParameterList.
Indicates whether the object supports configuration. For example, the Historical Data Provider Yahoo! Finance does not require configuration, so returns false here. However, AlphaVantage requires an API Key, which it defines as a Parameter in its Parameters property, so returns true. By default, if an object is ConfigurableType.ParameterList, and contains one or more Parameters, this property returns true.
The default method returns false if IsConfigurable is true, but the Configuration string is null or empty. Override to provide more fine grained control over whether an item should be configured or not. Data Providers that are not configured cannot be used to create DataSets, for example.
Called when WL8 loads the item's configuration upon initialization. By default, the information is loaded from the WL8 settings file.
Contains the Parameter instances that comprise the configuration for this instance. This property is relevant only if the object's ConfigurableType is equal to ConfigurableType.ParameterList.
You can override this method to perform special processing after the instance's configuration has changed.
Called when the object's configuration changes, and must be persisted. The default implementation stores the Configuration string in the WL8 settings file.
Return an optional, short description of the item. WL8 uses this throughout the user interface as items are displayed and edited.
WL8 will reverse an item's GlyphResource image when it is operating in a Dark Theme. If you do not wish the image to be reversed in this manner, return true here.
Return a string that describes an Embedded Resource in the .NET library that should be used to represent the item when it's displayed in a list. If you have an Embedded Resource named MyBitmap.png in the folder Images in your project named SomeCompany.WealthLabUtils, then the corresponding string would be: "SomeCompany.WealthLabUtils.Images.MyBitmap.png".
Returns the name of the instance. Since Configurable objects are named, and implement the INamed interface, they can be used as the target type for FactoryBase<T> classes.
Return an optional URL that points to a web site containing additional information about the item. WL8 uses this throughout the user interface as items are displayed and edited.
Adds a Parameter instance to the object's Parameters property.