DovetailEmbeddedConfiguration Methods
ClassMethods3 members
Loads configuration files that the Dovetail SDK embedded into an assembly as manifest resources, for hosts that have no file system to read them from (mobile and other app-package hosts).
get_EmbeddedConfigurationAssembly(IDovetailContext) Section titled get_EmbeddedConfigurationAssembly(IDovetailContext)staticnullableAssembly?public static class DovetailEmbeddedConfiguration{ public static Assembly? get_EmbeddedConfigurationAssembly( IDovetailContext context) { // ... }}Parameters
contextIGetConventionalFileNames(IDovetailContext, ReadOnlySpan<string>) Section titled GetConventionalFileNames(IDovetailContext, ReadOnlySpan<string>)staticIReadOnlyList<string> Gets the conventional configuration file names, lowest precedence first:
appsettings, the application name, each of those qualified by the environment name, and each of those qualified by local. public static class DovetailEmbeddedConfiguration{ public static IReadOnlyList<string> GetConventionalFileNames( IDovetailContext context, params ReadOnlySpan<string> extensions) { // ... }}Parameters
contextIApplicationName and EnvironmentName from.extensionsReadOnlySpan<string> The file extensions to produce names for (without the leading dot), in order at each position.Returns
IReadOnlyList<string> The file names, lowest precedence first.Exceptions
ArgumentNullExceptioncontext is null.OpenResource(Assembly, ReadOnlySpan<string>) Section titled OpenResource(Assembly, ReadOnlySpan<string>)staticnullableStream? Opens the first embedded resource that matches one of
fileNames , in order. A resource matches when its name is the file name itself (the Dovetail SDK's naming) or ends with .{fileName} (the default manifest naming of other tools). public static class DovetailEmbeddedConfiguration{ public static Stream? OpenResource( Assembly assembly, params ReadOnlySpan<string> fileNames) { // ... }}Parameters
assemblyAssemblyThe assembly to search.fileNames ReadOnlySpan<string> The candidate file names, most preferred first.Returns
Stream?The resource stream, or null if no resource matches.Exceptions
ArgumentNullExceptionassembly is null.