當前位置: 首頁>>代碼示例>>C#>>正文


C# Tropo.call方法代碼示例

本文整理匯總了C#中TropoCSharp.Tropo.Tropo.call方法的典型用法代碼示例。如果您正苦於以下問題:C# Tropo.call方法的具體用法?C# Tropo.call怎麽用?C# Tropo.call使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TropoCSharp.Tropo.Tropo的用法示例。


在下文中一共展示了Tropo.call方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: testCallUsingCallObject

        public void testCallUsingCallObject()
        {
            Tropo tropo = new Tropo();

            Hashtable headers = new Hashtable();
            headers.Add("foo", "bar");
            headers.Add("bling", "baz");

            StartRecording recording = new StartRecording(AudioFormat.mp3, Method.post, "http://blah.com/recordings/1234.wav", "jose", "password");

            ArrayList to = new ArrayList(1);
            to.Add("3055195825");

            Call call = new Call();
            call.recording = recording;
            call.headers = headers;
            call.timeout = 10;
            call.answerOnMedia = false;
            call.channel = Channel.text;
            call.network = Network.sms;
            call.to = to;
            call.from = new Endpoint("3055551212", null, null, null);

            tropo.call(call);
            Assert.AreEqual(this.callJsonAllOptions, TropoJSON.render(tropo));
        }
開發者ID:hack4reno,項目名稱:hack4reno2011,代碼行數:26,代碼來源:TropoClassesTests.cs

示例2: testToOnly

        public void testToOnly()
        {
            ArrayList numbersToCall = new ArrayList(2);
            numbersToCall.Add("3055195825");
            numbersToCall.Add("3054445567");

            Tropo tropo = new Tropo();
            tropo.call(numbersToCall);
            Assert.AreEqual(this.callJson, TropoJSON.render(tropo));
        }
開發者ID:hack4reno,項目名稱:hack4reno2011,代碼行數:10,代碼來源:TropoClassesTests.cs

示例3: testCallUseAllOptions

        public void testCallUseAllOptions()
        {
            Tropo tropo = new Tropo();

            Hashtable headers = new Hashtable(2);
            headers.Add("foo", "bar");
            headers.Add("bling", "baz");

            StartRecording recording = new StartRecording(AudioFormat.mp3, Method.post, "http://blah.com/recordings/1234.wav", "jose", "password");

            tropo.call("3055195825", "3055551212", Network.sms, Channel.text, false, 10, headers, recording);
            Assert.AreEqual(this.callJsonAllOptions, TropoJSON.render(tropo));
        }
開發者ID:hack4reno,項目名稱:hack4reno2011,代碼行數:13,代碼來源:TropoClassesTests.cs


注:本文中的TropoCSharp.Tropo.Tropo.call方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。