public static ApplicationPartsBuilder ConfigureFeature(this ApplicationPartsBuilder builder, string name, Func <ApplicationPart, IEnumerable <Type> > provider)
 {
     builder.Services.AddSingleton <IApplicationFeatureProvider>(p => new NamedApplicationFeatureProvider(name, provider));
     return(builder);
 }
 public static ApplicationPartsBuilder AddProvider <TProvider>(this ApplicationPartsBuilder builder)
     where TProvider : class, IApplicationFeatureProvider
 {
     builder.Services.AddSingleton <IApplicationFeatureProvider, TProvider>();
     return(builder);
 }