/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (Url != null) { p.Add(new KeyValuePair <string, string>("Url", Url.ToString())); } if (Method != null) { p.Add(new KeyValuePair <string, string>("Method", Method.ToString())); } if (Status != null) { p.Add(new KeyValuePair <string, string>("Status", Status.ToString())); } if (FallbackUrl != null) { p.Add(new KeyValuePair <string, string>("FallbackUrl", FallbackUrl.ToString())); } if (FallbackMethod != null) { p.Add(new KeyValuePair <string, string>("FallbackMethod", FallbackMethod.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())); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (To != null) { p.Add(new KeyValuePair <string, string>("To", To.ToString())); } if (From != null) { p.Add(new KeyValuePair <string, string>("From", From.ToString())); } if (Url != null) { p.Add(new KeyValuePair <string, string>("Url", Url.ToString())); } if (ApplicationSid != null) { p.Add(new KeyValuePair <string, string>("ApplicationSid", ApplicationSid.ToString())); } if (Method != null) { p.Add(new KeyValuePair <string, string>("Method", Method.ToString())); } if (FallbackUrl != null) { p.Add(new KeyValuePair <string, string>("FallbackUrl", FallbackUrl.ToString())); } if (FallbackMethod != null) { p.Add(new KeyValuePair <string, string>("FallbackMethod", FallbackMethod.ToString())); } if (StatusCallback != null) { p.Add(new KeyValuePair <string, string>("StatusCallback", StatusCallback.ToString())); } if (StatusCallbackEvent != null) { p.AddRange(StatusCallbackEvent.Select(prop => new KeyValuePair <string, string>("StatusCallbackEvent", prop))); } if (StatusCallbackMethod != null) { p.Add(new KeyValuePair <string, string>("StatusCallbackMethod", StatusCallbackMethod.ToString())); } if (SendDigits != null) { p.Add(new KeyValuePair <string, string>("SendDigits", SendDigits)); } if (IfMachine != null) { p.Add(new KeyValuePair <string, string>("IfMachine", IfMachine)); } if (Timeout != null) { p.Add(new KeyValuePair <string, string>("Timeout", Timeout.Value.ToString())); } if (Record != null) { p.Add(new KeyValuePair <string, string>("Record", Record.Value.ToString())); } if (RecordingChannels != null) { p.Add(new KeyValuePair <string, string>("RecordingChannels", RecordingChannels)); } if (RecordingStatusCallback != null) { p.Add(new KeyValuePair <string, string>("RecordingStatusCallback", RecordingStatusCallback)); } if (RecordingStatusCallbackMethod != null) { p.Add(new KeyValuePair <string, string>("RecordingStatusCallbackMethod", RecordingStatusCallbackMethod.ToString())); } if (SipAuthUsername != null) { p.Add(new KeyValuePair <string, string>("SipAuthUsername", SipAuthUsername)); } if (SipAuthPassword != null) { p.Add(new KeyValuePair <string, string>("SipAuthPassword", SipAuthPassword)); } if (MachineDetection != null) { p.Add(new KeyValuePair <string, string>("MachineDetection", MachineDetection)); } if (MachineDetectionTimeout != null) { p.Add(new KeyValuePair <string, string>("MachineDetectionTimeout", MachineDetectionTimeout.Value.ToString())); } return(p); }