Class ProgramMetadataUtility
- Namespace
- Songhay
- Assembly
- SonghayCore.dll
Shared routines for ProgramMetadata
public static class ProgramMetadataUtility
- Inheritance
-
ProgramMetadataUtility
- Inherited Members
Remarks
This is the minimalist alternative to AddConventionalJsonFile(IConfigurationBuilder?).
Methods
GetJsonDeserializerOptions()
Returns JsonSerializerOptions for ProgramMetadata with explicit serializer context(s) for AOT compiled apps.
public static JsonSerializerOptions GetJsonDeserializerOptions()
Returns
GetJsonForProgramMetadataFromEnvironment()
Returns a JSON string or null
based on the presence of one of two conventional environment variables.
public static string? GetJsonForProgramMetadataFromEnvironment()
Returns
Remarks
Of the two expected environment variables,
The one with the _PATH suffix should lead to JSON of the form:
{
"ProgramMetadata": { … }
}
…which conforms to IConfiguration conventions.
GetProgramMetadataFromEnvironment()
Returns an instance of ProgramMetadata based on the presence of one of two conventional environment variables.
public static ProgramMetadata? GetProgramMetadataFromEnvironment()