Skip to content

ApplicationPartsServiceCollectionExtensions.AddApplicationPartsTypeSource method

Adds an application part type source to the service collection. Note that this also calls AddMvcCore() to get the part manager if it is not provided and not found in the collection.

public static ApplicationPartsTypeSource AddApplicationPartsTypeSource(
    this IServiceCollection collection, ApplicationPartManager? partManager = null, 
    IFeatureToggles? featureToggles = null, bool topologicalSort = true, 
    bool tryPartRecovery = true)
parameter description
collection The service collection.
partManager The ApplicationPartManager instance.
featureToggles The feature toggles.
topologicalSort Whether to sort assemblies topologically by references.
tryPartRecovery Whether to try recovering application parts when they were not discovered at build time. Defaults to true.

Return Value

The created ApplicationPartsTypeSource.

See Also