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
requestContext
Type: Microsoft.TeamFoundation.Framework.Server.TeamFoundationRequestContextTeam Foundation Service Request Context
eventUserId
Type: System.GuidUser id who initiated the billing event
resourceName
Type: Microsoft.VisualStudio.Services.Commerce.ResourceNameUnique name of the resource
quantity
Type: System.Int32Quantity used in the billing event
eventId
Type: System.StringUnique human readable identifier for the billing event
billingEventDateTime
Type: System.DateTimeTimestamp 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.