AddInStore Class

AddInStore Class

 

Provides methods to store and find information about available add-ins and pipeline segments.

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

System.Object
  System.AddIn.Hosting.AddInStore

public static class AddInStore

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticFindAddIn(Type, String, String, String)

Finds a specific add-in.

System_CAPS_pubmethodSystem_CAPS_staticFindAddIns(Type, PipelineStoreLocation)

Finds all add-ins for a specified host view of the add-in at a location specified by the PipelineStoreLocation enumeration value.

System_CAPS_pubmethodSystem_CAPS_staticFindAddIns(Type, PipelineStoreLocation, String[])

Finds all add-ins for a specified host view of the add-in at the location specified by a PipelineStoreLocation value and an optional add-ins folder.

System_CAPS_pubmethodSystem_CAPS_staticFindAddIns(Type, String, String[])

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

System_CAPS_pubmethodSystem_CAPS_staticRebuild(PipelineStoreLocation)

Rebuilds the pipeline segments cache and includes new segments at the location specified by a PipelineStoreLocation value.

System_CAPS_pubmethodSystem_CAPS_staticRebuild(String)

Rebuilds the pipeline segments cache and includes new segments from a specified root directory.

System_CAPS_pubmethodSystem_CAPS_staticRebuildAddIns(String)

Rebuilds the add-in cache and includes new add-ins from a specified root directory.

System_CAPS_pubmethodSystem_CAPS_staticUpdate(PipelineStoreLocation)

Updates the pipeline segments cache with new segments at the location specified by a PipelineStoreLocation value.

System_CAPS_pubmethodSystem_CAPS_staticUpdate(String)

Updates the pipeline segments cache with new segments from a specified root directory.

System_CAPS_pubmethodSystem_CAPS_staticUpdateAddIns(String)

Updates the add-in cache and includes new add-ins at a specified location.

Use this class to build, rebuild, and update two cache files, as described in the following table.

Cache file

Methods that create the file

PipelineSegments.store

This file is located in the root directory of the pipeline directory structure.

Update

Updates the file with new pipeline segments. If no new segments are installed, this method just validates the cache.

Rebuild

Rebuilds the file and includes new pipeline segments.

AddIns.store

This file is located in a directory that contains one or more add-in subdirectories. If this directory is in the pipeline directory structure, it must be named AddIns.

UpdateAddIns

Updates the file with new add-ins at a specified location. Call this method if your add-ins are outside the pipeline directory structure.

If no new add-ins are installed, this method just validates the cache.

RebuildAddIns

Rebuilds the file and includes add-ins at a specified location. Call this method if your add-ins are outside the pipeline directory structure.

Update

If the add-ins are in the pipeline directory structure, this method updates the file with new add-ins.

Rebuild

If the add-ins are in the pipeline directory structure, this method rebuilds the file and includes new add-ins.

These methods create the cache files if they do not previously exist.

After the cache files are created, use the FindAddIns method to examine the files to find all add-ins that match a specified host view of the add-in. You can also use the FindAddIn method to find a specific add-in.

System_CAPS_security Security Note

It is unsupported to allow untrusted users or entities to access PipelineSegments.store and Addins.store. Doing so can cause data corruption issues for applications.

The following example shows how to update cache files.

// Get path for the pipeline root.
// Assumes that the current directory is the  
// pipeline directory structure root directory. 
String pipeRoot = Environment.CurrentDirectory;

// Update the cache files of the
// pipeline segments and add-ins.
string[] warnings = AddInStore.Update(pipeRoot);

foreach (string warning in warnings)
{
    Console.WriteLine(warning);
}

// Search for add-ins of type Calculator (the host view of the add-in)
// specifying the host's application base, instead of a path,
// for the FindAddIns method.

Collection<AddInToken> tokens = 
            AddInStore.FindAddIns(typeof(Calculator),PipelineStoreLocation.ApplicationBase);

.NET Framework
Available since 3.5

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft