Class PropertyDefaults
Expose the AppSettingsSection associated with this DLL.
The configuration settings come from the base class. The configuration settings come from the base class, AssemblyLocatorBase; hence, this class also serves as the concrete example that is recommended to accompany distribution of any abstract base class.
The settings exposed by this class inhabit a configuration file that is associated with the DLL, itself, as opposed to the application configuration. Though its format is similar to that of the application configuration file, the DLL configuration lives in its own configuration file that has the same name as the DLL, with an additional suffix of .config.
Inherited Members
Namespace: WizardWrx.Core
Assembly: WizardWrx.Core.dll
Syntax
public class PropertyDefaults : AssemblyLocatorBase
Remarks
The rationale behind segregating these settings is that the affected application properties are ones that you want to keep consistent, or nearly so, across large groups of applications. Keeping them in a dedicated configuration file that travels with the DLL that implements them eliminates the thankless task of adding them to every application configuration file.
Constructors
| Improve this Doc View SourcePropertyDefaults()
Use this constructor when the class instance is a sibling (defined in the same assembly).
Declaration
public PropertyDefaults()
PropertyDefaults(System.Reflection.Assembly)
Use this constructor when the class instance and base class are defined in different assemblies.
Declaration
public PropertyDefaults(System.Reflection.Assembly pasmLinkedAssembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | pasmLinkedAssembly |
Properties
| Improve this Doc View SourceValuesCollection
Return the KeyValueConfigurationCollection from the AppSettingsSection section of the DLL configuration file.
Declaration
public KeyValueConfigurationCollection ValuesCollection { get; }
Property Value
Type | Description |
---|---|
KeyValueConfigurationCollection |
Methods
| Improve this Doc View SourceEnumerateMissingConfigurationValues()
Enumeate missing configuration values, if any.
Declaration
public string EnumerateMissingConfigurationValues()
Returns
Type | Description |
---|---|
System.String | This method returns a message suitable for display on a console or a Windows message box. The returned message summarises the state of affairs, even when all defined values are represented in the configuration file. |
GetAssemblyBuildDate(DateTimeKind)
Get the date on which the assembly was built.
Declaration
public DateTime GetAssemblyBuildDate(DateTimeKind pdtmKind)
Parameters
Type | Name | Description |
---|---|---|
DateTimeKind | pdtmKind | Specify whether to return local or UTC time. Altough all three types are nominally supported, Unspecified is treated as Local. |
Returns
Type | Description |
---|---|
DateTime | The return value is the System.DateTime when the assembly was built. |
GetAssemblyVersionString()
Get a version string, suitable for display in reports.
Declaration
public string GetAssemblyVersionString()
Returns
Type | Description |
---|---|
System.String | The fully qualified version (i. e., all four parts) is returned. |