AppUriHandlerRegistration AppUriHandlerRegistration AppUriHandlerRegistration AppUriHandlerRegistration AppUriHandlerRegistration Class

Definition

Sets and retrieves dynamic AppUriHandlerHost entries for a given AppUriHandler registration.

public : sealed class AppUriHandlerRegistration
struct winrt::Windows::System::AppUriHandlerRegistration
public sealed class AppUriHandlerRegistration
Public NotInheritable Class AppUriHandlerRegistration
// This class does not provide a public constructor.
Attributes

Windows 10 requirements

Device family
Windows 10, version 1809 (introduced v10.0.17763.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v7)

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

Registrations follow the same structure as entries in the AppxManifest:

<uap3:Extension Category="windows.appUriHandler"> <uap3:AppUriHandler uap7:Name ="Runtime"> <uap3:Host Name="www.appurihandler.com" /> </uap3:AppUriHandler> </uap3:Extension>

Properties

Name Name Name Name Name

The name of the registration.

User User User User User

The user context of this registration.

Methods

GetAppAddedHostsAsync() GetAppAddedHostsAsync() GetAppAddedHostsAsync() GetAppAddedHostsAsync() GetAppAddedHostsAsync()

Retrieves the set of hosts added by SetAppAddedHostsAsync for the given registration.

SetAppAddedHostsAsync(IIterable<AppUriHandlerHost>) SetAppAddedHostsAsync(IIterable<AppUriHandlerHost>) SetAppAddedHostsAsync(IIterable<AppUriHandlerHost>) SetAppAddedHostsAsync(IIterable<AppUriHandlerHost>) SetAppAddedHostsAsync(IIterable<AppUriHandlerHost>)

Registers hosts in addition to the hosts already defined in the AppxManifest.

See also