AddInStore クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
使用可能なアドインとパイプライン セグメントに関する情報を格納および検索するメソッドを提供します。
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 新しいパイプライン セグメントでファイルを更新します。 新しいセグメントがインストールされていない場合、このメソッドはキャッシュを検証するだけです。 Rebuild ファイルを再構築し、新しいパイプライン セグメントを含めます。 |
| AddIns.store このファイルは、1 つ以上のアドイン サブディレクトリを含むディレクトリにあります。 このディレクトリがパイプライン ディレクトリ構造にある場合は、AddIns という名前を付ける必要があります。 |
UpdateAddIns 指定した場所にある新しいアドインでファイルを更新します。 アドインがパイプライン ディレクトリ構造の外部にある場合は、このメソッドを呼び出します。 新しいアドインがインストールされていない場合、このメソッドはキャッシュを検証するだけです。 RebuildAddIns ファイルを再構築し、指定した場所にアドインを含めます。 アドインがパイプライン ディレクトリ構造の外部にある場合は、このメソッドを呼び出します。 Update アドインがパイプライン ディレクトリ構造にある場合、このメソッドは新しいアドインでファイルを更新します。 Rebuild アドインがパイプライン ディレクトリ構造にある場合、このメソッドはファイルを再構築し、新しいアドインを含めます。 |
これらのメソッドは、キャッシュ ファイルが以前に存在しない場合に作成します。
キャッシュ ファイルが作成されたら、 FindAddIns メソッドを使用してファイルを調べて、アドインの指定されたホスト ビューに一致するすべてのアドインを検索します。 FindAddIn メソッドを使用して、特定のアドインを検索することもできます。
Important
信頼されていないユーザーまたはエンティティが PipelineSegments.store および Addins.store にアクセスすることを許可することはサポートされていません。 これを行うと、アプリケーションのデータ破損の問題が発生する可能性があります。
メソッド
| 名前 | 説明 |
|---|---|
| FindAddIn(Type, String, String, String) |
特定のアドインを検索します。 |
| FindAddIns(Type, PipelineStoreLocation, String[]) |
PipelineStoreLocation値とオプションのアドイン フォルダーで指定された場所にある、アドインの指定したホスト ビューのすべてのアドインを検索します。 |
| FindAddIns(Type, PipelineStoreLocation) |
PipelineStoreLocation列挙値で指定された場所にあるアドインの指定したホスト ビューのすべてのアドインを検索します。 |
| FindAddIns(Type, String, String[]) |
指定したルート ディレクトリから、アドインの指定したホスト ビューのすべてのアドインを検索します。 |
| Rebuild(PipelineStoreLocation) |
パイプライン セグメント キャッシュを再構築し、 PipelineStoreLocation 値で指定された場所に新しいセグメントを含めます。 |
| Rebuild(String) |
パイプライン セグメント キャッシュを再構築し、指定したルート ディレクトリから新しいセグメントを含めます。 |
| RebuildAddIns(String) |
アドイン キャッシュを再構築し、指定したルート ディレクトリから新しいアドインを含めます。 |
| Update(PipelineStoreLocation) |
PipelineStoreLocation値で指定された場所にある新しいセグメントでパイプライン セグメント キャッシュを更新します。 |
| Update(String) |
指定したルート ディレクトリの新しいセグメントでパイプライン セグメント キャッシュを更新します。 |
| UpdateAddIns(String) |
アドイン キャッシュを更新し、指定した場所に新しいアドインを含めます。 |