AddInStore.Update 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
使用新段更新管道段缓存。
重载
| 名称 | 说明 |
|---|---|
| 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 值。
注解
使用此方法重载启用部分受信任的主机,该主机可能无权发现自己的位置,以在其自己的目录中发现加载项。
适用于
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
管道目录结构的根路径。
返回
将警告描述为管道段的字符串集合。
- 属性
例外
管道目录结构中缺少段目录。
管道目录结构存在访问冲突。
示例
以下示例演示如何更新缓存文件。 该代码示例是 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
注解
如果外接程序位于管道目录结构中,此方法还会更新外接程序缓存。
如果没有新的管道段或外接程序,此方法只会验证缓存。