Delen via


IMeteringService.ReportUsage Method

Sends usage information to billing pipeline. Note that this method requires the request context to be at the application level with user identity.

Namespace:  Microsoft.VisualStudio.Services.Commerce
Assembly:  Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)

Syntax

'Declaration
Sub ReportUsage ( _
    requestContext As TeamFoundationRequestContext, _
    eventUserId As Guid, _
    resourceName As ResourceName, _
    quantity As Integer, _
    eventId As String, _
    billingEventDateTime As DateTime _
)
void ReportUsage(
    TeamFoundationRequestContext requestContext,
    Guid eventUserId,
    ResourceName resourceName,
    int quantity,
    string eventId,
    DateTime billingEventDateTime
)
void ReportUsage(
    TeamFoundationRequestContext^ requestContext, 
    Guid eventUserId, 
    ResourceName resourceName, 
    int quantity, 
    String^ eventId, 
    DateTime billingEventDateTime
)
abstract ReportUsage : 
        requestContext:TeamFoundationRequestContext * 
        eventUserId:Guid * 
        resourceName:ResourceName * 
        quantity:int * 
        eventId:string * 
        billingEventDateTime:DateTime -> unit
function ReportUsage(
    requestContext : TeamFoundationRequestContext, 
    eventUserId : Guid, 
    resourceName : ResourceName, 
    quantity : int, 
    eventId : String, 
    billingEventDateTime : DateTime
)

Parameters

  • eventUserId
    Type: System.Guid

    User id who initiated the billing event

  • quantity
    Type: System.Int32

    Quantity used in the billing event

  • eventId
    Type: System.String

    Unique human readable identifier for the billing event

  • billingEventDateTime
    Type: System.DateTime

    Timestamp at which the event started

Exceptions

Exception Condition
InvalidResourceException

InvalidResourceException is thrown if the resource is invalid

.NET Framework Security

See Also

Reference

IMeteringService Interface

Microsoft.VisualStudio.Services.Commerce Namespace