コード例 #1
0
        /// <summary>
        /// Generate the necessary parameters
        /// </summary>
        public List <KeyValuePair <string, string> > GetParams()
        {
            var p = new List <KeyValuePair <string, string> >();

            if (FriendlyName != null)
            {
                p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName));
            }

            if (VoiceUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceUrl", Serializers.Url(VoiceUrl)));
            }

            if (VoiceMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceMethod", VoiceMethod.ToString()));
            }

            if (VoiceFallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceFallbackUrl", Serializers.Url(VoiceFallbackUrl)));
            }

            if (VoiceFallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceFallbackMethod", VoiceFallbackMethod.ToString()));
            }

            if (StatusCallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("StatusCallbackUrl", Serializers.Url(StatusCallbackUrl)));
            }

            if (StatusCallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("StatusCallbackMethod", StatusCallbackMethod.ToString()));
            }

            if (CnamLookupEnabled != null)
            {
                p.Add(new KeyValuePair <string, string>("CnamLookupEnabled", CnamLookupEnabled.Value.ToString().ToLower()));
            }

            if (ConnectionPolicySid != null)
            {
                p.Add(new KeyValuePair <string, string>("ConnectionPolicySid", ConnectionPolicySid.ToString()));
            }

            if (FromDomainSid != null)
            {
                p.Add(new KeyValuePair <string, string>("FromDomainSid", FromDomainSid.ToString()));
            }

            return(p);
        }
コード例 #2
0
        /// <summary>
        /// Generate the necessary parameters
        /// </summary>
        public List <KeyValuePair <string, string> > GetParams()
        {
            var p = new List <KeyValuePair <string, string> >();

            if (DomainName != null)
            {
                p.Add(new KeyValuePair <string, string>("DomainName", DomainName));
            }

            if (FriendlyName != null)
            {
                p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName));
            }

            if (AuthType != null)
            {
                p.Add(new KeyValuePair <string, string>("AuthType", AuthType));
            }

            if (VoiceUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceUrl", VoiceUrl.AbsoluteUri));
            }

            if (VoiceMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceMethod", VoiceMethod.ToString()));
            }

            if (VoiceFallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceFallbackUrl", VoiceFallbackUrl.AbsoluteUri));
            }

            if (VoiceFallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceFallbackMethod", VoiceFallbackMethod.ToString()));
            }

            if (VoiceStatusCallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceStatusCallbackUrl", VoiceStatusCallbackUrl.AbsoluteUri));
            }

            if (VoiceStatusCallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceStatusCallbackMethod", VoiceStatusCallbackMethod.ToString()));
            }

            if (SipRegistration != null)
            {
                p.Add(new KeyValuePair <string, string>("SipRegistration", SipRegistration.Value.ToString()));
            }

            return(p);
        }
コード例 #3
0
        /// <summary>
        /// Generate the necessary parameters
        /// </summary>
        public List <KeyValuePair <string, string> > GetParams()
        {
            var p = new List <KeyValuePair <string, string> >();

            if (FriendlyName != null)
            {
                p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName));
            }

            if (VoiceFallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceFallbackMethod", VoiceFallbackMethod.ToString()));
            }

            if (VoiceFallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceFallbackUrl", Serializers.Url(VoiceFallbackUrl)));
            }

            if (VoiceMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceMethod", VoiceMethod.ToString()));
            }

            if (VoiceStatusCallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceStatusCallbackMethod", VoiceStatusCallbackMethod.ToString()));
            }

            if (VoiceStatusCallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceStatusCallbackUrl", Serializers.Url(VoiceStatusCallbackUrl)));
            }

            if (VoiceUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceUrl", Serializers.Url(VoiceUrl)));
            }

            if (SipRegistration != null)
            {
                p.Add(new KeyValuePair <string, string>("SipRegistration", SipRegistration.Value.ToString().ToLower()));
            }

            if (DomainName != null)
            {
                p.Add(new KeyValuePair <string, string>("DomainName", DomainName));
            }

            if (EmergencyCallingEnabled != null)
            {
                p.Add(new KeyValuePair <string, string>("EmergencyCallingEnabled", EmergencyCallingEnabled.Value.ToString().ToLower()));
            }

            return(p);
        }
コード例 #4
0
        /// <summary>
        /// Generate the necessary parameters
        /// </summary>
        public List <KeyValuePair <string, string> > GetParams()
        {
            var p = new List <KeyValuePair <string, string> >();

            if (AuthType != null)
            {
                p.Add(new KeyValuePair <string, string>("AuthType", AuthType));
            }

            if (FriendlyName != null)
            {
                p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName));
            }

            if (VoiceFallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceFallbackMethod", VoiceFallbackMethod.ToString()));
            }

            if (VoiceFallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceFallbackUrl", VoiceFallbackUrl.ToString()));
            }

            if (VoiceMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceMethod", VoiceMethod.ToString()));
            }

            if (VoiceStatusCallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceStatusCallbackMethod", VoiceStatusCallbackMethod.ToString()));
            }

            if (VoiceStatusCallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceStatusCallbackUrl", VoiceStatusCallbackUrl.ToString()));
            }

            if (VoiceUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceUrl", VoiceUrl.ToString()));
            }

            return(p);
        }
コード例 #5
0
        /// <summary>
        /// Generate the necessary parameters
        /// </summary>
        public List <KeyValuePair <string, string> > GetParams()
        {
            var p = new List <KeyValuePair <string, string> >();

            if (PhoneNumber != null)
            {
                p.Add(new KeyValuePair <string, string>("PhoneNumber", PhoneNumber.ToString()));
            }

            if (AreaCode != null)
            {
                p.Add(new KeyValuePair <string, string>("AreaCode", AreaCode));
            }

            if (ApiVersion != null)
            {
                p.Add(new KeyValuePair <string, string>("ApiVersion", ApiVersion));
            }

            if (FriendlyName != null)
            {
                p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName));
            }

            if (SmsApplicationSid != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsApplicationSid", SmsApplicationSid.ToString()));
            }

            if (SmsFallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsFallbackMethod", SmsFallbackMethod.ToString()));
            }

            if (SmsFallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsFallbackUrl", SmsFallbackUrl.ToString()));
            }

            if (SmsMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsMethod", SmsMethod.ToString()));
            }

            if (SmsUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsUrl", SmsUrl.ToString()));
            }

            if (StatusCallback != null)
            {
                p.Add(new KeyValuePair <string, string>("StatusCallback", StatusCallback.ToString()));
            }

            if (StatusCallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("StatusCallbackMethod", StatusCallbackMethod.ToString()));
            }

            if (VoiceApplicationSid != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceApplicationSid", VoiceApplicationSid.ToString()));
            }

            if (VoiceCallerIdLookup != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceCallerIdLookup", VoiceCallerIdLookup.Value.ToString()));
            }

            if (VoiceFallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceFallbackMethod", VoiceFallbackMethod.ToString()));
            }

            if (VoiceFallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceFallbackUrl", VoiceFallbackUrl.ToString()));
            }

            if (VoiceMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceMethod", VoiceMethod.ToString()));
            }

            if (VoiceUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceUrl", VoiceUrl.ToString()));
            }

            if (EmergencyStatus != null)
            {
                p.Add(new KeyValuePair <string, string>("EmergencyStatus", EmergencyStatus.ToString()));
            }

            if (EmergencyAddressSid != null)
            {
                p.Add(new KeyValuePair <string, string>("EmergencyAddressSid", EmergencyAddressSid.ToString()));
            }

            if (TrunkSid != null)
            {
                p.Add(new KeyValuePair <string, string>("TrunkSid", TrunkSid.ToString()));
            }

            return(p);
        }
コード例 #6
0
        /// <summary>
        /// Generate the necessary parameters
        /// </summary>
        public List <KeyValuePair <string, string> > GetParams()
        {
            var p = new List <KeyValuePair <string, string> >();

            if (FriendlyName != null)
            {
                p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName));
            }

            if (ApiVersion != null)
            {
                p.Add(new KeyValuePair <string, string>("ApiVersion", ApiVersion));
            }

            if (VoiceUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceUrl", Serializers.Url(VoiceUrl)));
            }

            if (VoiceMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceMethod", VoiceMethod.ToString()));
            }

            if (VoiceFallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceFallbackUrl", Serializers.Url(VoiceFallbackUrl)));
            }

            if (VoiceFallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceFallbackMethod", VoiceFallbackMethod.ToString()));
            }

            if (StatusCallback != null)
            {
                p.Add(new KeyValuePair <string, string>("StatusCallback", Serializers.Url(StatusCallback)));
            }

            if (StatusCallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("StatusCallbackMethod", StatusCallbackMethod.ToString()));
            }

            if (VoiceCallerIdLookup != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceCallerIdLookup", VoiceCallerIdLookup.Value.ToString().ToLower()));
            }

            if (SmsUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsUrl", Serializers.Url(SmsUrl)));
            }

            if (SmsMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsMethod", SmsMethod.ToString()));
            }

            if (SmsFallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsFallbackUrl", Serializers.Url(SmsFallbackUrl)));
            }

            if (SmsFallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsFallbackMethod", SmsFallbackMethod.ToString()));
            }

            if (SmsStatusCallback != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsStatusCallback", Serializers.Url(SmsStatusCallback)));
            }

            if (MessageStatusCallback != null)
            {
                p.Add(new KeyValuePair <string, string>("MessageStatusCallback", Serializers.Url(MessageStatusCallback)));
            }

            return(p);
        }
コード例 #7
0
ファイル: SimOptions.cs プロジェクト: nemenos/twilio-csharp
        /// <summary>
        /// Generate the necessary parameters
        /// </summary>
        public List <KeyValuePair <string, string> > GetParams()
        {
            var p = new List <KeyValuePair <string, string> >();

            if (UniqueName != null)
            {
                p.Add(new KeyValuePair <string, string>("UniqueName", UniqueName));
            }

            if (CallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("CallbackMethod", CallbackMethod.ToString()));
            }

            if (CallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("CallbackUrl", CallbackUrl.AbsoluteUri));
            }

            if (FriendlyName != null)
            {
                p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName));
            }

            if (RatePlan != null)
            {
                p.Add(new KeyValuePair <string, string>("RatePlan", RatePlan.ToString()));
            }

            if (Status != null)
            {
                p.Add(new KeyValuePair <string, string>("Status", Status.ToString()));
            }

            if (CommandsCallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("CommandsCallbackMethod", CommandsCallbackMethod.ToString()));
            }

            if (CommandsCallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("CommandsCallbackUrl", CommandsCallbackUrl.AbsoluteUri));
            }

            if (SmsFallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsFallbackMethod", SmsFallbackMethod.ToString()));
            }

            if (SmsFallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsFallbackUrl", SmsFallbackUrl.AbsoluteUri));
            }

            if (SmsMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsMethod", SmsMethod.ToString()));
            }

            if (SmsUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsUrl", SmsUrl.AbsoluteUri));
            }

            if (VoiceFallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceFallbackMethod", VoiceFallbackMethod.ToString()));
            }

            if (VoiceFallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceFallbackUrl", VoiceFallbackUrl.AbsoluteUri));
            }

            if (VoiceMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceMethod", VoiceMethod.ToString()));
            }

            if (VoiceUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceUrl", VoiceUrl.AbsoluteUri));
            }

            return(p);
        }
コード例 #8
0
        /// <summary>
        /// Generate the necessary parameters
        /// </summary>
        public List <KeyValuePair <string, string> > GetParams()
        {
            var p = new List <KeyValuePair <string, string> >();

            if (PhoneNumber != null)
            {
                p.Add(new KeyValuePair <string, string>("PhoneNumber", PhoneNumber.ToString()));
            }

            if (ApiVersion != null)
            {
                p.Add(new KeyValuePair <string, string>("ApiVersion", ApiVersion));
            }

            if (FriendlyName != null)
            {
                p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName));
            }

            if (SmsApplicationSid != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsApplicationSid", SmsApplicationSid.ToString()));
            }

            if (SmsFallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsFallbackMethod", SmsFallbackMethod.ToString()));
            }

            if (SmsFallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsFallbackUrl", Serializers.Url(SmsFallbackUrl)));
            }

            if (SmsMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsMethod", SmsMethod.ToString()));
            }

            if (SmsUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsUrl", Serializers.Url(SmsUrl)));
            }

            if (StatusCallback != null)
            {
                p.Add(new KeyValuePair <string, string>("StatusCallback", Serializers.Url(StatusCallback)));
            }

            if (StatusCallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("StatusCallbackMethod", StatusCallbackMethod.ToString()));
            }

            if (VoiceApplicationSid != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceApplicationSid", VoiceApplicationSid.ToString()));
            }

            if (VoiceCallerIdLookup != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceCallerIdLookup", VoiceCallerIdLookup.Value.ToString().ToLower()));
            }

            if (VoiceFallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceFallbackMethod", VoiceFallbackMethod.ToString()));
            }

            if (VoiceFallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceFallbackUrl", Serializers.Url(VoiceFallbackUrl)));
            }

            if (VoiceMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceMethod", VoiceMethod.ToString()));
            }

            if (VoiceUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceUrl", Serializers.Url(VoiceUrl)));
            }

            if (IdentitySid != null)
            {
                p.Add(new KeyValuePair <string, string>("IdentitySid", IdentitySid.ToString()));
            }

            if (AddressSid != null)
            {
                p.Add(new KeyValuePair <string, string>("AddressSid", AddressSid.ToString()));
            }

            return(p);
        }
コード例 #9
0
        /// <summary>
        /// Generate the necessary parameters
        /// </summary>
        public List <KeyValuePair <string, string> > GetParams()
        {
            var p = new List <KeyValuePair <string, string> >();

            if (AccountSid != null)
            {
                p.Add(new KeyValuePair <string, string>("AccountSid", AccountSid.ToString()));
            }

            if (ApiVersion != null)
            {
                p.Add(new KeyValuePair <string, string>("ApiVersion", ApiVersion));
            }

            if (FriendlyName != null)
            {
                p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName));
            }

            if (SmsApplicationSid != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsApplicationSid", SmsApplicationSid.ToString()));
            }

            if (SmsFallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsFallbackMethod", SmsFallbackMethod.ToString()));
            }

            if (SmsFallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsFallbackUrl", Serializers.Url(SmsFallbackUrl)));
            }

            if (SmsMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsMethod", SmsMethod.ToString()));
            }

            if (SmsUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsUrl", Serializers.Url(SmsUrl)));
            }

            if (StatusCallback != null)
            {
                p.Add(new KeyValuePair <string, string>("StatusCallback", Serializers.Url(StatusCallback)));
            }

            if (StatusCallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("StatusCallbackMethod", StatusCallbackMethod.ToString()));
            }

            if (VoiceApplicationSid != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceApplicationSid", VoiceApplicationSid.ToString()));
            }

            if (VoiceCallerIdLookup != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceCallerIdLookup", VoiceCallerIdLookup.Value.ToString().ToLower()));
            }

            if (VoiceFallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceFallbackMethod", VoiceFallbackMethod.ToString()));
            }

            if (VoiceFallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceFallbackUrl", Serializers.Url(VoiceFallbackUrl)));
            }

            if (VoiceMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceMethod", VoiceMethod.ToString()));
            }

            if (VoiceUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceUrl", Serializers.Url(VoiceUrl)));
            }

            if (EmergencyStatus != null)
            {
                p.Add(new KeyValuePair <string, string>("EmergencyStatus", EmergencyStatus.ToString()));
            }

            if (EmergencyAddressSid != null)
            {
                p.Add(new KeyValuePair <string, string>("EmergencyAddressSid", EmergencyAddressSid.ToString()));
            }

            if (TrunkSid != null)
            {
                p.Add(new KeyValuePair <string, string>("TrunkSid", TrunkSid.ToString()));
            }

            if (VoiceReceiveMode != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceReceiveMode", VoiceReceiveMode.ToString()));
            }

            if (IdentitySid != null)
            {
                p.Add(new KeyValuePair <string, string>("IdentitySid", IdentitySid.ToString()));
            }

            if (AddressSid != null)
            {
                p.Add(new KeyValuePair <string, string>("AddressSid", AddressSid.ToString()));
            }

            return(p);
        }