简体   繁体   English

Twilio c#助手,如何使用此方法签名? 无效AddOutgoingCallerId(phoneNumber,friendlyName,callDelay,回调)

[英]Twilio c# helper, How do I use this method signature? void AddOutgoingCallerId (phoneNumber, friendlyName, callDelay, callback)

I'm trying to follow the Twilio docs for adding a Caller ID as a verified out going telephone number. 我正在尝试按照Twilio文档添加呼叫者ID作为经过验证的去电电话号码。

The Twilio c# helper library has a method signature which looks like so Twilio c#帮助程序库具有方法签名,如下所示

void AddOutgoingCallerId (phoneNumber, friendlyName, callDelay, callback) 无效AddOutgoingCallerId(phoneNumber,friendlyName,callDelay,回调)

where callback is Action<ValidationRequestResult> 回调为Action<ValidationRequestResult>

I don't understand this. 我不明白 I'm trying to set a URL that Twilio can post back to once the verification has taken place. 我正在尝试设置一个URL,验证完成后Twilio可以将其发布回该URL。

Help appreciated. 帮助表示赞赏。

You need to implement a method that takes a ValidationRequestResult and returns void . 您需要实现一个采用ValidationRequestResult并返回void That's the method that will get called. 这就是将被调用的方法。 You provide that method as the callback parameter. 您提供该方法作为回调参数。

Here's your call: 这是您的电话:

AddOutgoingCallerId (phoneNumber, friendlyName, callDelay, HandleAddOutgoingCallerId)

And here's the method that you need to create. 这是您需要创建的方法。

private void HandleAddOutgoingCallerId(ValidationRequestResult result)
{
    // Do something (or just return).
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从C#调用具有void * callback和object参数的C ++ Dll中的函数 - How do I call a function in a C++ Dll from C# that has void* callback and object parameter 如何在 C# 证书回调中查看“签名哈希算法”? - How do I view "Signature hash algorithm" in C# certificate callback? 我应该在我的void方法中使用输出吗? - c# Should I use a output in my void method? 为什么在此C#.NET控制器方法中,我具有此签名? - Why in this C# .NET controller method do I have this signature? 使用mvc2和c#,如何从视图中调用控制器中的void方法 - Using mvc2 and c#, how do I call a void method in my controller from view 如何在ClickOnce场景中设置AppDomain FriendlyName? - How do I set the AppDomain FriendlyName in a ClickOnce scenario? 如何在C#中动态调用带有任何签名的方法? - How do you invoke a method with any signature dynamically in C#? 如何在C#中调用异步方法从同步方法返回void并确保异步方法完成? - How do I call asynchronous method returning void from synchronous method in C# and be sure async method is finished? 如何生成一次 Random.Range 值,然后在 void Update 中使用它来移动? 团结,C# - How do I generate a Random.Range value once, and then use it in void Update to move? Unity, C# 如何从另一个 void c# 获得 object - How do I get an object from another void c#
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM