AppUriHandlerRegistrationManager.GetDefault Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates an AppUriHandlerRegistrationManager for the calling app for the current user.
public:
static AppUriHandlerRegistrationManager ^ GetDefault();
static AppUriHandlerRegistrationManager GetDefault();
public static AppUriHandlerRegistrationManager GetDefault();
function getDefault()
Public Shared Function GetDefault () As AppUriHandlerRegistrationManager
Returns
An AppUriHandlerRegistrationManager which can be used to access AppUriHandlerRegistrations.
Examples
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
}
Remarks
Apps which support multiple users should instead use AppUriHandlerRegistrationManager.GetForUser.