SystemLibrary.Common.Net
Classes
Assemblies
Class to find types and embedded resources in loaded Assemblies
Built on System.Reflection.Assembly
Async
Contains methods for running functions in a non-blocking way
NOTE: Might be removed at a later point in time or rewritten/restructured completely
Config<T>
Class for creating configurations (xml or json) files next to your code files
Configurations can be placed in either: ~/.json, ~/.xml, ~/Configs/.[json|xml], or ~/Configurations/.[json|xml]
Or appended to your existing 'appSettings.json' file
Transformations are ran based on the 'ASPNETCORE_ENVIRONMENT' variable passed to your application
Some recommended pointers:
- launchSettings.json when using IIS Express
- web.config if you use IIS
- mstest.runsettings if you run transformations in unit tests
- commandline with --configuration if running as 'exe'
NOTE: Read the example of 'EnvironmentConfig.Name' property, it gives details on where/how to set environment per application type
NOTE: Transformations are only ran on the first time '.Current' is invoked
NOTE: Environment variables like 'UserName', is added only to 'appSettings' and not your custom configurations like: ~/Configs/testConfig.json, which mean 'UserName' always exists in 'AppSettings' if you create the string variable and returns the user name on your computer
WARNING: The generic T cannot be a nested class
DateTimeJsonConverter
DateTime json converter that takes a string format
DateTimeOffsetJsonConverter
DateTime json converter that takes a string format
EnvironmentConfig
Class containing environment variables read from your 'environmentConfig.json', if you have added one
If you add additional environment configurations to 'environmentConfig.json', then ignore this class, and create your own new class that inherits the generic one: 'EnvironmentConfig<YourClass>'
See documentation for 'EnvironmentConfig<>', specifically the 'Name' property as that is used for all transformations
EnvironmentConfig<T, TEnvironmentNameEnum>
SystemType
System type contains a list of static type variables so the call to 'typeof' is done once