AddInStore クラス

定義

利用可能なアドインとパイプライン セグメントに関する情報を格納および検索するためのメソッドを提供します。

public ref class AddInStore abstract sealed
public static class AddInStore
type AddInStore = class
Public Class AddInStore
継承
AddInStore

次の例は、キャッシュ ファイルを更新する方法を示しています。

// 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);
' Get the path for the pipeline root.  
' Assumes that the current directory is the
' pipline directory structure root directory.
Dim pipeRoot As String = Environment.CurrentDirectory
' Update the cache files of the
' pipeline segments and add-ins.
Dim warnings() As String = AddInStore.Update(pipeRoot)
For Each warning As String In warnings
    Console.WriteLine(warning)
Next

' 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.
Dim tokens As Collection(Of AddInToken) = _
    AddInStore.FindAddIns(GetType(Calculator), PipelineStoreLocation.ApplicationBase)

注釈

次の表で説明するように、このクラスを使用して、2 つのキャッシュ ファイルをビルド、再構築、更新します。

キャッシュ ファイル ファイルを作成するメソッド
PipelineSegments.store

このファイルは、パイプライン ディレクトリ構造のルート ディレクトリにあります。
Update

新しいパイプライン セグメントを含むファイルをUpdatesします。 新しいセグメントがインストールされていない場合、このメソッドはキャッシュを検証するだけです。

Rebuild

ファイルを再構築し、新しいパイプライン セグメントを含めます。
AddIns.store

このファイルは、1 つ以上のアドイン サブディレクトリを含むディレクトリにあります。 このディレクトリがパイプライン ディレクトリ構造にある場合は、AddIns という名前を付ける必要があります。
UpdateAddIns

指定した場所に新しいアドインを含むファイルをUpdatesします。 アドインがパイプライン ディレクトリ構造の外部にある場合は、このメソッドを呼び出します。

新しいアドインがインストールされていない場合、このメソッドはキャッシュを検証するだけです。

RebuildAddIns

ファイルを再構築し、指定した場所にアドインを含めます。 アドインがパイプライン ディレクトリ構造の外部にある場合は、このメソッドを呼び出します。

Update

アドインがパイプライン ディレクトリ構造にある場合、このメソッドは新しいアドインでファイルを更新します。

Rebuild

アドインがパイプライン ディレクトリ構造にある場合、このメソッドはファイルを再構築し、新しいアドインを含めます。

これらのメソッドは、キャッシュ ファイルが以前に存在しない場合に作成します。

キャッシュ ファイルが作成されたら、 メソッドを FindAddIns 使用してファイルを調べて、アドインの指定したホスト ビューに一致するすべてのアドインを検索します。 メソッドを FindAddIn 使用して、特定のアドインを検索することもできます。

重要

信頼されていないユーザーまたはエンティティが PipelineSegments.store および Addins.store にアクセスできるようにするには、サポートされていません。 これを行うと、アプリケーションのデータ破損の問題が発生する可能性があります。

メソッド

FindAddIn(Type, String, String, String)

特定のアドインを検索します。

FindAddIns(Type, PipelineStoreLocation)

PipelineStoreLocation 列挙値によって指定された位置にある指定したアドインのホスト ビューを対象に、すべてのアドインを検索します。

FindAddIns(Type, PipelineStoreLocation, String[])

PipelineStoreLocation 値およびアドイン フォルダー (省略可能) によって指定された位置にある指定したアドインのホスト ビューを対象に、すべてのアドインを検索します。

FindAddIns(Type, String, String[])

指定したルート ディレクトリの指定したアドインのホスト ビューを対象に、すべてのアドインを検索します。

Rebuild(PipelineStoreLocation)

パイプライン セグメント キャッシュをビルドし直して、PipelineStoreLocation 値で指定された位置にある新しいセグメントを組み込みます。

Rebuild(String)

パイプライン セグメント キャッシュをビルドし直して、指定したルート ディレクトリから新しいセグメントを組み込みます。

RebuildAddIns(String)

アドイン キャッシュをビルドし直して、指定したルート ディレクトリから新しいアドインを組み込みます。

Update(PipelineStoreLocation)

PipelineStoreLocation 値によって指定された位置にある新しいセグメントでパイプライン セグメント キャッシュを更新します。

Update(String)

指定したルート ディレクトリの新しいセグメントでパイプライン セグメント キャッシュを更新します。

UpdateAddIns(String)

アドイン キャッシュを更新して、指定された位置にある新しいアドインを組み込みます。

適用対象

こちらもご覧ください