表示TFS服务挂钩事件的C#对象
我正在寻找一个C#对象,该对象与在中找到的build.complete事件的示例负载相匹配。参考页面推荐一个nuget包,但我在其中找不到“BuildCompleteEvent” 我正在寻找此对象,因为我有一个TFS服务挂钩输出到Azure存储队列,当我在Azure函数中从队列中读取该消息时,我希望能够将消息字符串解析为有用的C对象。对于“构建完成”事件:表示TFS服务挂钩事件的C#对象,c#,azure,tfs,hook,ado,C#,Azure,Tfs,Hook,Ado,我正在寻找一个C#对象,该对象与在中找到的build.complete事件的示例负载相匹配。参考页面推荐一个nuget包,但我在其中找不到“BuildCompleteEvent” 我正在寻找此对象,因为我有一个TFS服务挂钩输出到Azure存储队列,当我在Azure函数中从队列中读取该消息时,我希望能够将消息字符串解析为有用的C对象。对于“构建完成”事件: 公共类消息 { 公共字符串文本{get;set;} 公共字符串html{get;set;} 公共字符串标记{get;set;} } 公共类详
公共类消息
{
公共字符串文本{get;set;}
公共字符串html{get;set;}
公共字符串标记{get;set;}
}
公共类详细信息
{
公共字符串文本{get;set;}
公共字符串html{get;set;}
公共字符串标记{get;set;}
}
公务舱降落
{
公共字符串位置{get;set;}
公共字符串类型{get;set;}
公共字符串url{get;set;}
公共字符串下载URL{get;set;}
}
公共类日志
{
公共字符串类型{get;set;}
公共字符串url{get;set;}
公共字符串下载URL{get;set;}
}
公共类最近更改为
{
公共字符串id{get;set;}
公共字符串displayName{get;set;}
公共字符串uniqueName{get;set;}
公共字符串url{get;set;}
公共字符串imageUrl{get;set;}
}
公共类定义
{
public int batchSize{get;set;}
公共字符串触发器类型{get;set;}
公共字符串定义类型{get;set;}
公共int id{get;set;}
公共字符串名称{get;set;}
公共字符串url{get;set;}
}
公共类队列
{
公共字符串队列类型{get;set;}
公共int id{get;set;}
公共字符串名称{get;set;}
公共字符串url{get;set;}
}
请求的公共类
{
公共字符串id{get;set;}
公共字符串displayName{get;set;}
公共字符串uniqueName{get;set;}
公共字符串url{get;set;}
公共字符串imageUrl{get;set;}
}
公共类请求
{
公共int id{get;set;}
公共字符串url{get;set;}
public RequestedFor RequestedFor{get;set;}
}
公共类资源
{
公共字符串uri{get;set;}
公共int id{get;set;}
公共字符串buildNumber{get;set;}
公共字符串url{get;set;}
公共日期时间开始时间{get;set;}
公共日期时间完成时间{get;set;}
公共字符串原因{get;set;}
公共字符串状态{get;set;}
公共字符串位置{get;set;}
公共拖放{get;set;}
公共日志日志{get;set;}
公共字符串sourceGetVersion{get;set;}
公共LastChangedBy LastChangedBy{get;set;}
公共布尔保留有限{get;set;}
公共bool hasDiagnostics{get;set;}
公共定义{get;set;}
公共队列队列{get;set;}
公共列表请求{get;set;}
}
公共类集合
{
公共字符串id{get;set;}
}
公共类帐户
{
公共字符串id{get;set;}
}
公共类项目
{
公共字符串id{get;set;}
}
公共类资源容器
{
公共集合{get;set;}
公共帐户{get;set;}
公共项目{get;set;}
}
公共类根对象
{
公共字符串id{get;set;}
公共字符串事件类型{get;set;}
公共字符串publisherId{get;set;}
公共字符串作用域{get;set;}
公共消息{get;set;}
public DetailedMessage DetailedMessage{get;set;}
公共资源资源{get;set;}
公共字符串resourceVersion{get;set;}
公共资源容器资源容器{get;set;}
公共日期时间createdDate{get;set;}
}
您不能从页面中获取json并在Visual Studio中“粘贴特殊”->“将json粘贴为类”吗?
public class Message
{
public string text { get; set; }
public string html { get; set; }
public string markdown { get; set; }
}
public class DetailedMessage
{
public string text { get; set; }
public string html { get; set; }
public string markdown { get; set; }
}
public class Drop
{
public string location { get; set; }
public string type { get; set; }
public string url { get; set; }
public string downloadUrl { get; set; }
}
public class Log
{
public string type { get; set; }
public string url { get; set; }
public string downloadUrl { get; set; }
}
public class LastChangedBy
{
public string id { get; set; }
public string displayName { get; set; }
public string uniqueName { get; set; }
public string url { get; set; }
public string imageUrl { get; set; }
}
public class Definition
{
public int batchSize { get; set; }
public string triggerType { get; set; }
public string definitionType { get; set; }
public int id { get; set; }
public string name { get; set; }
public string url { get; set; }
}
public class Queue
{
public string queueType { get; set; }
public int id { get; set; }
public string name { get; set; }
public string url { get; set; }
}
public class RequestedFor
{
public string id { get; set; }
public string displayName { get; set; }
public string uniqueName { get; set; }
public string url { get; set; }
public string imageUrl { get; set; }
}
public class Request
{
public int id { get; set; }
public string url { get; set; }
public RequestedFor requestedFor { get; set; }
}
public class Resource
{
public string uri { get; set; }
public int id { get; set; }
public string buildNumber { get; set; }
public string url { get; set; }
public DateTime startTime { get; set; }
public DateTime finishTime { get; set; }
public string reason { get; set; }
public string status { get; set; }
public string dropLocation { get; set; }
public Drop drop { get; set; }
public Log log { get; set; }
public string sourceGetVersion { get; set; }
public LastChangedBy lastChangedBy { get; set; }
public bool retainIndefinitely { get; set; }
public bool hasDiagnostics { get; set; }
public Definition definition { get; set; }
public Queue queue { get; set; }
public List<Request> requests { get; set; }
}
public class Collection
{
public string id { get; set; }
}
public class Account
{
public string id { get; set; }
}
public class Project
{
public string id { get; set; }
}
public class ResourceContainers
{
public Collection collection { get; set; }
public Account account { get; set; }
public Project project { get; set; }
}
public class RootObject
{
public string id { get; set; }
public string eventType { get; set; }
public string publisherId { get; set; }
public string scope { get; set; }
public Message message { get; set; }
public DetailedMessage detailedMessage { get; set; }
public Resource resource { get; set; }
public string resourceVersion { get; set; }
public ResourceContainers resourceContainers { get; set; }
public DateTime createdDate { get; set; }
}