DnssdServiceInstanceCollection
DnssdServiceInstanceCollection
DnssdServiceInstanceCollection
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.
public : sealed class DnssdServiceInstanceCollection : IIterable, IVectorViewpublic sealed class DnssdServiceInstanceCollection : IEnumerable, IReadOnlyListPublic NotInheritable Class DnssdServiceInstanceCollection Implements IEnumerable, IReadOnlyList// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
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
Item[Int32] Item[Int32] Item[Int32] Item[Int32]
Gets the element at the specified index in the read-only list.
This member is not implemented in C++T this[int index] { get; }ReadOnly Property Item(index As Integer) As TT this[int index] { get; }
- index
The zero-based index of the element to get.
- Value
- T T T T
The element at the specified index in the read-only list.
Size Size Size 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.
public : unsigned int Size { get; }This member is not implemented in C#This member is not implemented in VB.Net// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The number of items in the collection.
Methods
First() First() First() 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.
public : IIterator<DnssdServiceInstance> First()This member is not implemented in C#This member is not implemented in VB.Net// You can use this method in JavaScript.
Gets an iterator instance initialized to the first item in the service instance collection. Your code can use this iterator to enumerate all members of the collection.
GetAt(UInt32) GetAt(UInt32) GetAt(UInt32) 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.
public : DnssdServiceInstance GetAt(unsigned int index)This member is not implemented in C#This member is not implemented in VB.Net// You can use this method in JavaScript.
- index
- unsigned int UInt32 UInt32 UInt32
The index of the instance to be retrieved. Indices are 0-based. If your code specifies an index that is out of bounds, an exception is thrown. The maximum valid index is equal to one less than the DnssdServiceInstanceCollection.Size value.
The DnssdServiceInstance at the given index in the collection.
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()
Returns an enumerator that iterates through the collection.
This member is not implemented in C++IEnumerator<T> GetEnumerator()Function GetEnumerator As IEnumerator(Of T)IEnumerator<T> GetEnumerator()
An enumerator that can be used to iterate through the collection.
GetMany(UInt32, DnssdServiceInstance[]) GetMany(UInt32, DnssdServiceInstance[]) GetMany(UInt32, DnssdServiceInstance[]) 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.
public : unsigned int GetMany(unsigned int startIndex, DnssdServiceInstance[] items)This member is not implemented in C#This member is not implemented in VB.Net// You can use this method in JavaScript.
- startIndex
- unsigned int UInt32 UInt32 UInt32
Index of the first collection item to be retrieved.
- items
- DnssdServiceInstance[] DnssdServiceInstance[] DnssdServiceInstance[] DnssdServiceInstance[]
The retrieved DnssdServiceInstance objects.
The number of items in items.
IndexOf(DnssdServiceInstance, UInt32) IndexOf(DnssdServiceInstance, UInt32) IndexOf(DnssdServiceInstance, UInt32) 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.
public : PlatForm::Boolean IndexOf(DnssdServiceInstance value, unsigned int index)This member is not implemented in C#This member is not implemented in VB.Net// You can use this method in JavaScript.
The DnssdServiceInstance to get the index of.
- index
- unsigned int UInt32 UInt32 UInt32
The index, if the DnssdServiceInstance is found.
true if value is found at index, false otherwise.