AddInStore.FindAddIns Method (Type, String, String[])


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Finds all add-ins for a specified host view of the add-in from a specified root directory.

Namespace:   System.AddIn.Hosting
Assembly:  System.AddIn (in System.AddIn.dll)

public static Collection<AddInToken> FindAddIns(
	Type hostViewOfAddIn,
	string pipelineRootFolderPath,
	params string[] addInFolderPaths


Type: System.Type

The type that defines the host's view of the add-in.

Type: System.String

The path of the root of the pipeline directory structure.

Type: System.String[]

(Optional). The path of the directory that contains one or more subdirectories of add-ins. Because this parameter takes an array of strings, you can specify more than one path.

This parameter is not required if your add-ins are located in the pipeline directory structure under the AddIns folder.

Return Value

Type: System.Collections.ObjectModel.Collection<AddInToken>

A collection of tokens that represent the add-ins that were found.

Exception Condition

There is an access violation to the pipeline directory structure.

This method examines the store files of cached add-in and pipeline segment information to find all add-ins that match a specified hostAddInView type. You can then use one of the tokens in the returned AddInToken collection to activate a specific add-in by calling the Activate<T> method of the AddInToken class.

.NET Framework
Available since 3.5
Return to top