ConnectionProfile.GetAttributedNetworkUsageAsync メソッド

定義

個々のアプリケーションのネットワーク使用状況データを取得します。

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

パラメーター

startTime
DateTime DateTimeOffset

使用期間の開始時刻。

endTime
DateTime DateTimeOffset

使用期間の終了時刻。

states
NetworkUsageStates

使用状況データを返す必要がある接続プロファイルの状態。

戻り値

メソッドが完了すると、 AttributedNetworkUsage オブジェクトの一覧が返されます。これは、送信値と受信値をバイト単位で示し、対応する時間間隔中にアプリが接続された合計時間を示します。

属性

Windows の要件

アプリの機能
networkDataPlanProvisioning

注釈

注意

実際のデバイスではなく、Microsoft Visual Studio 2013 Update 2のエミュレーターでアプリを実行する場合、データ使用状況の追跡はサポートされません。 その結果、エミュレーターで実行すると、Windows Phone 8.x アプリの GetAttributedNetworkUsageAsync メソッドは失敗します。

適用対象