DeploymentManager 類別

定義

提供 Windows 應用程式 SDK 執行時的部署資訊存取。

Important

你的應用程式在啟動時應該呼叫 DeploymentManager.Initialize 。 更多資訊請參見初始化 Windows 應用程式 SDK

public ref class DeploymentManager abstract sealed
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Version(1)]
class DeploymentManager final
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Windows.ApplicationModel.WindowsAppRuntime.DeploymentContract, 65536)]
class DeploymentManager final
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Version(1)]
public static class DeploymentManager
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Windows.ApplicationModel.WindowsAppRuntime.DeploymentContract), 65536)]
public static class DeploymentManager
Public Class DeploymentManager
繼承
Object Platform::Object IInspectable DeploymentManager
屬性

方法

名稱 Description
GetStatus()

回傳目前載入的 Windows 應用程式 SDK 執行時的部署狀態。 使用此方法可判斷是否需要先安裝 Windows 應用程式 SDK 執行套件,才能讓現有應用程式使用 Windows 應用程式 SDK 功能。

Initialize()

檢查目前套件所參考的 Windows 應用程式 SDK 執行狀態,並嘗試註冊任何可註冊的 Windows 應用程式 SDK 套件

Important

為了確保必要的 Windows 應用程式 SDK 執行時套件齊全,應用程式應在啟動應用程式時呼叫 DeploymentManager.Initialize 一次(不超過一次)。 欲了解更多資訊,以及判斷是否需要這個明確呼叫,請參閱初始化 Windows 應用程式 SDK

Initialize(DeploymentInitializeOptions)

檢查目前套件參考的 Windows 應用程式 SDK 執行狀態,並嘗試註冊任何可註冊的 Windows 應用程式 SDK 套件,同時套用所提供的選項。

Important

為了確保必要的 Windows 應用程式 SDK 執行時套件齊全,應用程式應在啟動應用程式時呼叫 DeploymentManager.Initialize 一次(不超過一次)。 欲了解更多資訊,以及判斷是否需要這個明確呼叫,請參閱初始化 Windows 應用程式 SDK

Repair()

嘗試修復 Windows 應用程式 SDK 執行時,不論其狀態如何。 因此,為了避免在 Windows 應用程式 SDK 執行環境良好時進行不必要的修復,只有在部署狀態異常時才應呼叫此 API。

所有關於版本、通道及架構的資訊均來自現行的 Windows 應用程式 SDK 框架套件。

適用於

另請參閱