ComponentUtilities.CreateComponentContainer Method
Definition
- Namespace
- Sandcastle.Core
- Assembly
- Sandcastle.Core.dll
This is used to return a composition container filled with the available build components (SHFB plug-ins, presentation styles, BuildAssembler components, and syntax generators).
public static CompositionContainer CreateComponentContainer(IEnumerable<string> folders, ComponentAssemblyResolver resolver, CancellationToken cancellationToken)
Parameters
foldersIEnumerable<string>An enumerable list of additional folders to search recursively for components.
resolverComponentAssemblyResolverA component assembly resolver to use or null to use a temporary one
cancellationTokenCancellationTokenAn optional cancellation token or null if not supported by the caller.
Returns
- CompositionContainer
The a composition container that contains all of the available components
Remarks
The following folders are searched in the following order. If the given folder has not been specified or does not exist, it is ignored.
- The enumerable list of additional folders - This is typically the current project's
NuGet packages (package tool paths from the
SHFBComponentPathitem in their properties file), the project'sComponentPathfolder, and the current project's folder. This allows for project-specific build components. Paths are searched in the order given above if specified. - Common application data folder - The help file builder's common application data folder where third-party build components are typically installed.
SHFBROOTcore components folder - The core Sandcastle Help File Builder components folder and its subfolders. This allows for XCOPY deployments that keep everything together.
All folders and their subfolders are search recursively for assemblies (*.dll). There may be duplicate component IDs across the assemblies found. Only the first component for a unique ID will be used. As such, assemblies in a folder with a higher search precedence can override copies in folders lower in the search order.