Share via


ContentLinkProviderCollection.GetMany(UInt32, ContentLinkProvider[]) Method

Definition

Retrieves multiple elements in a single pass through the iterator.

public:
 virtual unsigned int GetMany(unsigned int startIndex, Platform::Array <ContentLinkProvider ^> ^ items) = IVector<ContentLinkProvider ^>::GetMany;
uint32_t GetMany(uint32_t const& startIndex, winrt::array_view <ContentLinkProvider const&> & items);
public uint GetMany(uint startIndex, ContentLinkProvider[] items);
function getMany(startIndex, items)
Public Function GetMany (startIndex As UInteger, items As ContentLinkProvider()) As UInteger

Parameters

startIndex
UInt32

unsigned int

uint32_t

The index from which to start retrieval.

items
ContentLinkProvider[]

Provides the destination for the result. Size the initial array size as a "capacity" in order to specify how many results should be retrieved.

Returns

UInt32

unsigned int

uint32_t

The number of items retrieved.

Implements

M:Windows.Foundation.Collections.IVector1.GetMany(System.UInt32,0[]) M:Windows.Foundation.Collections.IVector1.GetMany(unsigned int,0[]) M:Windows.Foundation.Collections.IVector1.GetMany(uint32_t,0[])

Remarks

Important

This API supports content links. The Windows features that enable content links are not available in versions of Windows after Windows 10 version 1903. Content links for XAML text controls will not function in versions of Windows later than version 1903.

The GetMany method operates identically as if calling and for each element in the supplied array. This means that the first element returned by the GetMany method is the same element as returned by retrieving the property prior to calling GetMany. After the GetMany call returns, the property will retrieve the element following the last element returned by the GetMany call, or produce an error if no more elements exist in the sequences.

The GetMany method returns the actual number of elements returned. It must be the minimum of a) the number of elements remaining in the collection, or b) the number of elements requested, that is "capacity". Therefore, whenever GetMany returns fewer than the number of elements requested, the end of the sequence has been reached. It returns the number of elements retrieved in the "actual" output parameter.

When the caller specifies a capacity of zero, the position of the iterator is unchanged. Elements in the array following the values returned are unchanged.

Applies to