DnssdServiceInstanceCollection Class

Definition

A collection of DNS Service Discovery (DNS-SD) service instances.

Note

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

Note

Win32 DNS Service Discovery (DNS-SD) APIs are declared in the windns.h header. For example, the Win32 APIs for announcing and discovering services are DnsServiceRegister and DnsServiceBrowse.

public ref class DnssdServiceInstanceCollection sealed : IIterable<DnssdServiceInstance ^>, IVectorView<DnssdServiceInstance ^>
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class DnssdServiceInstanceCollection final : IIterable<DnssdServiceInstance>, IVectorView<DnssdServiceInstance>
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class DnssdServiceInstanceCollection : IEnumerable<DnssdServiceInstance>, IReadOnlyList<DnssdServiceInstance>
Public NotInheritable Class DnssdServiceInstanceCollection
Implements IEnumerable(Of DnssdServiceInstance), IReadOnlyList(Of DnssdServiceInstance)
Inheritance
Object Platform::Object IInspectable DnssdServiceInstanceCollection
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

Your code does not create a DnssdServiceInstanceCollection directly. Instead, handle the DnssdServiceWatcher.EnumerationCompleted event. When that event is triggered, the second argument to the event handler is a pointer to a DnssdServiceInstanceCollection object that contains information about the discovered service instances.

Properties

Size

Gets the number of items in the collection

Note

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

Methods

First()

Gets an iterator that is initialized to refer to the first item in the instance collection.

Note

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

GetAt(UInt32)

Gets the DnssdServiceInstance at a given index into the DnssdServiceInstanceCollection.

Note

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

GetMany(UInt32, DnssdServiceInstance[])

Gets multiple DnssdServiceInstance objects from a DNS-SD service instance collection.

Note

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

IndexOf(DnssdServiceInstance, UInt32)

Gets a value indicating whether a given DnssdServiceInstance is at the specified index in this service instance collection.

Note

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

Applies to

See also