Beispiel #1
0
 public override string ToString()
 {
     return(string.Format("primary name server = {0}\nresponsible mail addr = {1}\nserial  = {2}\nrefresh = {3}\nretry   = {4}\nexpire  = {5}\ndefault TTL = {6}",
                          PrimaryNameServer,
                          ResponsibleMailAddress,
                          Serial.ToString(),
                          Refresh.ToString(),
                          Retry.ToString(),
                          Expire.ToString(),
                          DefaultTtl.ToString()));
 }
Beispiel #2
0
        /// <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 (DefaultTtl != null)
            {
                p.Add(new KeyValuePair <string, string>("DefaultTtl", DefaultTtl.ToString()));
            }

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

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

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

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

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

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

            return(p);
        }