Namespace WizardWrx.Core
Classes
AgedFileInfo
This class extends a FileInfo object with a custom IComparable interface implementation.
AgedFileInfoCollection
This class hides its data in a List of AgedFileInfo objects, which its constructors assemble from permutations of the array of FileInfo objects returned by the GetFiles method on the DirectoryInfo instance that is fed into it.
AssemblyLocatorBase
Use a class derived from this class to get the fully qualified name of the file from which the assembly in which the derived class is defined was loaded. See Remarks.
BasicSystemInfoDisplayMessages
The static methods exposed by this class simplify displaying information about the processor on which the calling process is executing that is otherwise hard to determine accurately.
ByteArrayBase64Converters
This static class exposes methods that efficiently encode binary data as Base64 byte arrays and converts such byte arrays into binary data in the form of a new byte array or binary data written into a disk file.
ByteArrayFormatters
The static methods in this class format byte arrays into strings of hexadecimal numerals for display on reports and in windows.
CmdLneArgsBasic
An instance of this class efficiently processes command line switches, named arguments, and positional arguments, in such a way that they are easily accessible. The command line is completely parsed in a single pass.
Switches, named arguments, and positional arguments may be freely mixed in any way; your users aren't confined to specifying all switches and/or named arguments first, last, or in any other order.
Since command line parsing happens in the constructor, your code must define all the rules in its parameters. To that end, there are 26 constructors, which provide access to all of the rich capabilities of this object. In spite of the multitude of constructors, their organization, coupled with consistent naming and documentation of their arguments, is intended to make their features readily accessible.
While it is fairly trivial to reverse engineer the underlying Dictionary object, and read the arguments directly, the supported method of reading them is through its methods: GetArgByName, GetArgByPosition, and GetSwitchByName.
EnvTokenExpander
This class is implemented as a very lean Singleton.
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.
RegistryValues
This sealed class exposes static methods for efficiently testing for the presence of named values in a Registry key that behave more like the Item property of a collection, and retrieving Registry value types that require a transformation of one sort or another to get them into the appropriate native type.
Since static classes are implicitly sealed, this class cannot be inherited.
StringFixups
Instances of this class represent pairs of fixup strings to apply as replacement pairs to amend a string, such as the JSON response from a REST endpoint that motivated its creation.
TimeDisplayFormatter
Use instances of this class to return dates and times, uniformly formatted by rules set by way of its properties.
This class is sealed, and cannot be inherited.
TraceLogger
This static class exposes methods that support every conceivable combination of local and UTC time stamps for trace logging.
UnconfiguredDLLSettings
Organize the DLL configuration values that were omitted from the associated configuration file. Since multiple classes can and do share a DLL configuration file, this class must be a Singleton.
UnconfiguredDLLSettings.UnconfiguredSetting
Settings are organized into a private collection that belongs to the singleton.
UnmanagedLibrary
Utility class to wrap an unmanaged DLL and be responsible for freeing it
Structs
AssemblyLocatorBase.PropertySourceCounts
SetPropertiesFromDLLConfiguration fills and returns this structure, to account for all defined properties, whether or not their values are configured.
StringFixups.StringFixup
A fixup pair is a pair of strings.
Enums
CmdLneArgsBasic.ArgMatching
Argument matching may be either case sensitive (default) or case insensitive (by constructor override). Constructor argument penmArgMatching is of this type.
CmdLneArgsBasic.ArgType
Arguments may be of three types:
- Named
- Positional
- Switch
Further, the first and third types may be invalid arguments of their respective types. That is, a switch may be invalid, or the name of a Named Argument may be invalid. ///
TimeDisplayFormatter.DateFieldOrder
Indicate the format to use for displaying the calendar date.
TimeDisplayFormatter.HoursFormatType
Indicate time format to use (CultureInfoShortTime, Civilian, or Military).
TimeDisplayFormatter.TimePrecisionType
Indicate the precision to use for the time display. The class default is HMST.