Skip to content

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)
{
// ...
}
}
GetConventionalFileNames(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)
{
// ...
}
}
contextIDovetailContextThe context to read the ApplicationName and EnvironmentName from.
extensionsReadOnlySpan<string>The file extensions to produce names for (without the leading dot), in order at each position.
IReadOnlyList<string>The file names, lowest precedence first.
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)
{
// ...
}
}
assemblyAssemblyThe assembly to search.
fileNamesReadOnlySpan<string>The candidate file names, most preferred first.
Stream?The resource stream, or null if no resource matches.
ArgumentNullExceptionassembly is null.