DnssdServiceWatcher.Added Event


Event that is triggered when a DnssdServiceWatcher has added a DNS Service Discovery (DNS-SD) instance to its collection of available service instances.


DnssdServiceWatcher is not supported and may be altered or unavailable in the future. Instead, use the Windows.Devices.Enumeration API.

// Register
event_token Added(TypedEventHandler<DnssdServiceWatcher, DnssdServiceInstance const&> const& handler) const;

// Revoke with event_token
void Added(event_token const* cookie) const;

// Revoke with event_revoker
DnssdServiceWatcher::Added_revoker Added(auto_revoke_t, TypedEventHandler<DnssdServiceWatcher, DnssdServiceInstance const&> const& handler) const;
public event TypedEventHandler<DnssdServiceWatcher,DnssdServiceInstance> Added;
function onAdded(eventArgs) { /* Your code */ }
dnssdServiceWatcher.addEventListener("added", onAdded);
dnssdServiceWatcher.removeEventListener("added", onAdded);
- or -
dnssdServiceWatcher.onadded = onAdded;
Public Custom Event Added As TypedEventHandler(Of DnssdServiceWatcher, DnssdServiceInstance) 

Event Type


Applies to