AddInStore.Update 方法

定義

以新區段更新管線區段快取。

多載

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

備註

如果載入宏位於管線目錄結構中,這個方法也會更新載入宏快取。

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

適用於