語言

AddInStore.Update 方法

定義

更新管線區段快取並新增區段。

多載

名稱 Description
Update(PipelineStoreLocation)

更新管線區段在指定位置 PipelineStoreLocation 的新區段快取。

Update(String)

更新管線區段快取中指定的根目錄中新區段。

Update(PipelineStoreLocation)

更新管線區段在指定位置 PipelineStoreLocation 的新區段快取。

public:
 static cli::array <System::String ^> ^ Update(System::AddIn::Hosting::PipelineStoreLocation location);
[System.Security.SecurityCritical]
[System.Security.SecurityTreatAsSafe]
public static string[] Update(System.AddIn.Hosting.PipelineStoreLocation location);
public static string[] Update(System.AddIn.Hosting.PipelineStoreLocation location);
[<System.Security.SecurityCritical>]
[<System.Security.SecurityTreatAsSafe>]
static member Update : System.AddIn.Hosting.PipelineStoreLocation -> string[]
static member Update : System.AddIn.Hosting.PipelineStoreLocation -> string[]
Public Shared Function Update (location As PipelineStoreLocation) As String()

參數

location
PipelineStoreLocation

其中一個列舉值。

目前此枚舉中唯一的值是用來設定主機應用程式域的屬性所指定的 ApplicationBase 目錄。

傳回

String[]

一組字串描述警報,當管線段被評估時。

屬性

例外狀況

管線目錄結構中缺少一個段目錄。

管線目錄結構存在存取違規。

location 是無效 PipelineStoreLocation 值。

備註

利用此方法過載,使部分受信任的主機(可能無法自行發現位置)能在自己的目錄中發現外掛。

適用於

Update(String)

更新管線區段快取中指定的根目錄中新區段。

public:
 static cli::array <System::String ^> ^ Update(System::String ^ pipelineRootFolderPath);
[System.Security.SecurityCritical]
public static string[] Update(string pipelineRootFolderPath);
[<System.Security.SecurityCritical>]
static member Update : string -> string[]
Public Shared Function Update (pipelineRootFolderPath As String) As String()

參數

pipelineRootFolderPath
String

管線目錄結構根節點的路徑。

傳回

String[]

一組字串描述警報,當管線段被評估時。

屬性

例外狀況

管線目錄結構中缺少一個段目錄。

管線目錄結構存在存取違規。

範例

以下範例說明如何更新快取檔案。 此程式碼範例是本類別更大範例 AddInStore 的一部分。

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

foreach (string warning in warnings)
{
    Console.WriteLine(warning);
}
' 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

備註

此方法也會更新插件快取,若插件位於管線目錄結構中。

如果沒有新的管線區段或外掛,這個方法只會驗證快取。

適用於