AddInStore.FindAddIn(Type, String, String, String) 메서드

정의

특정 추가 기능을 찾습니다.

public:
 static System::Collections::ObjectModel::Collection<System::AddIn::Hosting::AddInToken ^> ^ FindAddIn(Type ^ hostViewOfAddIn, System::String ^ pipelineRootFolderPath, System::String ^ addInFilePath, System::String ^ addInTypeName);
[System.Security.SecurityCritical]
public static System.Collections.ObjectModel.Collection<System.AddIn.Hosting.AddInToken> FindAddIn (Type hostViewOfAddIn, string pipelineRootFolderPath, string addInFilePath, string addInTypeName);
[<System.Security.SecurityCritical>]
static member FindAddIn : Type * string * string * string -> System.Collections.ObjectModel.Collection<System.AddIn.Hosting.AddInToken>
Public Shared Function FindAddIn (hostViewOfAddIn As Type, pipelineRootFolderPath As String, addInFilePath As String, addInTypeName As String) As Collection(Of AddInToken)

매개 변수

hostViewOfAddIn
Type

추가 기능의 호스트 뷰를 정의하는 형식입니다.

pipelineRootFolderPath
String

파이프라인 디렉터리 구조의 루트에 대한 경로입니다.

addInFilePath
String

찾을 추가 기능의 경로 및 파일 이름입니다.

addInTypeName
String

추가 기능의 형식 이름입니다.

반환

발견된 추가 기능을 나타내는 토큰만 들어 있는 토큰 컬렉션입니다.

특성

예외

pipelineRootFolderPath, addInFilePath 또는 addInTypeName의 길이가 0인 경우

또는

추가 기능 파일이 addInfilePath에 존재하지 않습니다.

하나 이상의 매개 변수가 null인 경우

호출자에게 pipelineRootFolderPath에 대한 읽기 액세스 권한이 없습니다.

예제

다음 예제에서는 특정 추가 기능을 찾습니다.

// Find a specific add-in.

// Construct the path to the add-in.
string addInFilePath = pipeRoot + @"\AddIns\P3AddIn2\P3AddIn2.dll";

// The fourth parameter, addinTypeName, takes the full name
// of the type qualified by its namespace. Same as AddInToken.AddInFullName.
Collection<AddInToken> tokenColl = AddInStore.FindAddIn(typeof(Calculator),
    pipeRoot, addInFilePath, "CalcAddIns.P3AddIn2");
Console.WriteLine("Found {0}", tokenColl[0].Name);
' Find a specific add-in.
' Construct the path to the add-in.
Dim addInFilePath As String = (pipeRoot + "\AddIns\P3AddIn2\P3AddIn2.dll")
' The fourth parameter, addinTypeName, takes the full name 
' of the type qualified by its namespace. Same as AddInToken.AddInFullName.
Dim tokenColl As System.Collections.ObjectModel.Collection(Of AddInToken) = AddInStore.FindAddIn(GetType(Calculator), pipeRoot, addInFilePath, "CalcAddIns.P3AddIn2")
Console.WriteLine("Found {0}", tokenColl(0).Name)

설명

추가 기능에 대한 단일 파이프라인이 발견되면 컬렉션에서 유일한 항목이 AddInToken 됩니다. 지정된 추가 기능에 대한 여러 파이프라인이 있는 경우 속성을 검사 QualificationData 하여 구분할 수 있습니다.

적용 대상

추가 정보