示例#1
0
        private static IConfigurationBuilder UseHyperion(this IConfigurationBuilder builder, Func <HyperionOptions, HyperionOptions> func)
        {
            IConfigurationRoot configRoot = builder.Build();

            SolariBuilderExtensions.GetHyperionOptions(configRoot, out HyperionOptions options);

            if (options.ConfigurationProvider is null || !options.ConfigurationProvider.Enabled)
            {
                return(builder);
            }

            ApplicationOptions app = configRoot.GetApplicationOptions();

            var src = new HyperionConfigurationSource
            {
                Options            = options,
                ApplicationOptions = app
            };

            builder.Add(src);
            return(builder);
        }
示例#2
0
 public HyperionProvider(HyperionConfigurationSource source)
 {
     _source = source;
 }