Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
- requestContext 
 Type: Microsoft.TeamFoundation.Framework.Server.TeamFoundationRequestContext- Team Foundation Service Request Context 
- eventUserId 
 Type: System.Guid- User id who initiated the billing event 
- resourceName 
 Type: Microsoft.VisualStudio.Services.Commerce.ResourceName- Unique name of the resource 
- 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.