다음을 통해 공유


MeteringRecord Class

Definition

Represents a metering record that contains a key identifier and a collection of metering actions of the key identifier.

public class MeteringRecord
type MeteringRecord = class
Public Class MeteringRecord
Inheritance
MeteringRecord

Examples

private void ProcessMeteringRecord(Collection<MeteringRecord> MeteringRecords)
{
    foreach (MeteringRecord record in MeteringRecords)
    {
        foreach (Microsoft.Media.Drm.MeteringAction action in record.Actions)
        {
            if (action.Name == "Play")
            {
                //
                // Update data store with play count of action.Value for record.KeyId
                //
            }
            else
            {
                //
                // etc.
                //
            }
        }
    }
}

Remarks

GetMeteringData() decrypts metering data received from the client and returns a collection of metering records which is then processed by the service for metering.

Constructors

MeteringRecord(Guid, Collection<MeteringAction>)

Initializes a new instance of the MeteringRecord class.

Properties

Actions

Gets the collection of MeteringAction for the metering record.

KeyId

Gets the key identifier of the metering record.

Applies to