我需要在WebHookReceiverConfig类中重写GetReceiverConfigAsync方法。它在构造函数中要求2个参数,但不知道如何处理。 我该如何实现?
public class MyWebHookHandler : WebHookHandler
{
public MyWebHookHandler()
{
this.Receiver = "genericjson";
}
public override Task ExecuteAsync(string generator, WebHookHandlerContext context)
{
var data = context.GetDataOrDefault<object>();
return Task.FromResult(true);
}
}
public class CustomWHReceiver : WebHookReceiverConfig
{
public override System.Threading.Tasks.Task<string> GetReceiverConfigAsync(string name, string id)
{
//Code goes here
}
}