共用方式為


AppUriHandlerRegistrationManager.GetDefault 方法

定義

為目前使用者的呼叫應用程式建立 AppUriHandlerRegistrationManager

public:
 static AppUriHandlerRegistrationManager ^ GetDefault();
 static AppUriHandlerRegistrationManager GetDefault();
public static AppUriHandlerRegistrationManager GetDefault();
function getDefault()
Public Shared Function GetDefault () As AppUriHandlerRegistrationManager

傳回

AppUriHandlerRegistrationManager,可用來存取AppUriHandlerRegistrations

範例

string uriHandlerName = "Runtime"; 
Windows.System.AppUriHandlerRegistrationManager manager = AppUriHandlerRegistrationManager.GetDefault(); // Or GetForUser() for multi user-aware apps. 
AppUriHandlerRegistration registration = manager.TryGetRegistration(uriHandlerName);
if (registration != null)
{
    // App can get or set hosts as needed
}

備註

支援多個使用者的應用程式應該改用 AppUriHandlerRegistrationManager.GetForUser

適用於

另請參閱