Share via


ConnectionProfile.GetProviderNetworkUsageAsync Method

Definition

Returns the bytes sent and bytes received for each MCC and MNC combination (the combination is represented by a ProviderId).

public:
 virtual IAsyncOperation<IVectorView<ProviderNetworkUsage ^> ^> ^ GetProviderNetworkUsageAsync(DateTime startTime, DateTime endTime, NetworkUsageStates states) = GetProviderNetworkUsageAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<IVectorView<ProviderNetworkUsage>> GetProviderNetworkUsageAsync(DateTime const& startTime, DateTime const& endTime, NetworkUsageStates const& states);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<IReadOnlyList<ProviderNetworkUsage>> GetProviderNetworkUsageAsync(System.DateTimeOffset startTime, System.DateTimeOffset endTime, NetworkUsageStates states);
function getProviderNetworkUsageAsync(startTime, endTime, states)
Public Function GetProviderNetworkUsageAsync (startTime As DateTimeOffset, endTime As DateTimeOffset, states As NetworkUsageStates) As IAsyncOperation(Of IReadOnlyList(Of ProviderNetworkUsage))

Parameters

startTime
DateTime DateTimeOffset

The start time over which to retrieve data. Can be no more than 60 days prior to the current time.

endTime
DateTime DateTimeOffset

The end time over which to retrieve data.

states
NetworkUsageStates

The state of the connection profile for which usage data should be returned.

Returns

Returns an immutable list where each entry contains the bytes sent and bytes received for a specific ProviderId.

Attributes

Windows requirements

Requirements Description
Device family
Windows 10 Fall Creators Update (introduced in 10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v5.0)

Remarks

The returned collection contains one ProviderNetworkUsage entry per detected provider (MCC/MNC combination) within the requested window. Sum the entries if you need aggregate roaming usage. The method returns an empty list when no provider usage is available (for example, Wi-Fi only connections).

Applies to

See also