IMeteringService.ReportUsage 方法

发送用法信息到计算的管线。 请注意此方法需要请求上下文在应用程序级别的用户标识。

命名空间:  Microsoft.VisualStudio.Services.Commerce
程序集:  Microsoft.TeamFoundation.Framework.Server(在 Microsoft.TeamFoundation.Framework.Server.dll 中)

语法

声明
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
)

参数

  • eventUserId
    类型:System.Guid
    启动开单事件的用户 ID
  • eventId
    类型:System.String
    开单事件的唯一可读的标识符
  • billingEventDateTime
    类型:System.DateTime
    操作将启动的时间戳

异常

异常 条件
InvalidResourceException

如果资源是无效的,InvalidResourceException 引发

.NET Framework 安全性

请参阅

参考

IMeteringService 接口

Microsoft.VisualStudio.Services.Commerce 命名空间