public override ParamData GetParamData() { try { ParamData pd = new ParamExtrusionData(xFunction, yFunction, zFunction, xPrimeFunction, yPrimeFunction, Smin.ToString(), Smax.ToString(), Tmin.ToString(), Tmax.ToString(), NumFacetS, NumFacetT, colorString, null); pd.BackColorString = backColorString; pd.Opaque = !translucent; pd.ImageSource = imageSource; pd.ImageTiled = imageTiled; pd.ImageTransformMatrix = imageTransformMatrix; pd.TransformMatrix = transformMatrix; if (Children != null && Children.Count > 0) { foreach (ParameterObjectData p in Children) { pd.Children.Add(p.GetParamData()); } } return(pd); } catch { return(null); } }
internal Dictionary <string, string> GeneratePostData(string[] keys, Dictionary <string, string> seedParams = null) { Dictionary <string, string> postData = new Dictionary <string, string>(); if (seedParams != null) { seedParams.Keys.ToList().ForEach(key => postData.Add(key, seedParams[key])); } foreach (string key in keys) { if (postData.ContainsKey(key)) { continue; } switch (key.ToLower()) { case "jvmroute": postData.Add(key, JvmRoute); break; case "balancer": if (!string.IsNullOrEmpty(Balancer)) { postData.Add(key, Balancer); } break; case "domain": if (!string.IsNullOrEmpty(Domain)) { postData.Add(key, Domain); } break; case "host": if (!string.IsNullOrEmpty(Host)) { postData.Add(key, Host); } break; case "port": postData.Add(key, Port.ToString()); break; case "type": if (!string.IsNullOrEmpty(Type)) { postData.Add(key, Type); } break; case "alias": if (!string.IsNullOrEmpty(Alias)) { postData.Add(key, Alias); } break; case "stickysession": postData.Add(key, (StickySession ? "yes" : "no")); break; case "stickysessionforce": postData.Add(key, (StickySessionForce ? "yes" : "no")); break; case "stickysessionremove": postData.Add(key, (StickySessionRemove ? "yes" : "no")); break; case "flushpackets": postData.Add(key, (FlushPackets ? "on" : "off")); break; case "waitworker": postData.Add(key, WaitWorker.ToString()); break; case "flushwait": postData.Add(key, Math.Floor(FlushWait.TotalSeconds).ToString()); break; case "maxattempts": postData.Add(key, MaxAttempts.ToString()); break; case "stickysessioncookie": if (!string.IsNullOrEmpty(StickySessionCookie)) { postData.Add(key, StickySessionCookie); } break; case "stickysessionpath": if (!string.IsNullOrEmpty(StickySessionPath)) { postData.Add(key, StickySessionPath); } break; case "ping": postData.Add("ping", Math.Floor(Ping.TotalSeconds).ToString()); break; case "smax": if (Smax.HasValue) { postData.Add(key, Smax.ToString()); } break; case "ttl": postData.Add(key, Math.Floor(Ttl.TotalSeconds).ToString()); break; case "timeout": postData.Add(key, Math.Floor(Timeout.TotalSeconds).ToString()); break; default: throw new InvalidProgramException("Cannot map value " + key); } } return(postData); }