ConnectionProfile.GetConnectivityIntervalsAsync Method

Definition

Gets a list of ConnectivityInterval objects, which indicate the timestamp for when the network connection began, and a time-span for the duration of that connection.

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

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

When the method completes, it returns a list of ConnectivityInterval objects, which indicate the start time and duration for the current or prior connections.

Attributes

Remarks

For an example of how these methods are used, see How to retrieve connection usage data for a specific period of time

Applies to