Inheritance: ImplicitModuleBase
        public static ImplicitClamp ClampFromXElement(ImplicitXmlChain chain, XElement xElement)
        {
            var sourceString = (xElement.Attribute("source") != null ? xElement.Attribute("source").Value : String.Empty);
            var low          = (xElement.Attribute("low") != null ? xElement.Attribute("low").Value : String.Empty);
            var high         = (xElement.Attribute("high") != null ? xElement.Attribute("high").Value : String.Empty);

            ImplicitClamp clamp;

            ImplicitModuleBase source;
            Double             value;

            if (!String.IsNullOrEmpty(sourceString))
            {
                if (chain.Modules.TryGetValue(sourceString, out source))
                {
                    clamp = new ImplicitClamp(source);
                }
                else if (Double.TryParse(sourceString, NumberStyles.Any, CultureInfo.InvariantCulture, out value))
                {
                    clamp = new ImplicitClamp(value);
                }
                else
                {
                    throw new InvalidOperationException("Invalid source value");
                }
            }
            else
            {
                throw new InvalidOperationException("Missing source");
            }

            if (!String.IsNullOrEmpty(low))
            {
                if (chain.Modules.TryGetValue(low, out source))
                {
                    clamp.Low = source;
                }
                else if (Double.TryParse(low, NumberStyles.Any, CultureInfo.InvariantCulture, out value))
                {
                    clamp.Low = value;
                }
                else
                {
                    throw new InvalidOperationException("Invalid low value");
                }
            }

            if (!String.IsNullOrEmpty(high))
            {
                if (chain.Modules.TryGetValue(high, out source))
                {
                    clamp.High = source;
                }
                else if (Double.TryParse(high, NumberStyles.Any, CultureInfo.InvariantCulture, out value))
                {
                    clamp.High = value;
                }
                else
                {
                    throw new InvalidOperationException("Invalid high value");
                }
            }

            return(clamp);
        }
        public static ImplicitClamp ClampFromXElement(ImplicitXmlChain chain, XElement xElement)
        {
            var sourceString = (xElement.Attribute("source") != null ? xElement.Attribute("source").Value : String.Empty);
            var low = (xElement.Attribute("low") != null ? xElement.Attribute("low").Value : String.Empty);
            var high = (xElement.Attribute("high") != null ? xElement.Attribute("high").Value : String.Empty);

            ImplicitClamp clamp;

            ImplicitModuleBase source;
            Double value;

            if (!String.IsNullOrEmpty(sourceString))
            {
                if (chain.Modules.TryGetValue(sourceString, out source))
                    clamp = new ImplicitClamp(source);
                else if (Double.TryParse(sourceString, NumberStyles.Any, CultureInfo.InvariantCulture, out value))
                    clamp = new ImplicitClamp(value);
                else
                    throw new InvalidOperationException("Invalid source value");
            }
            else
                throw new InvalidOperationException("Missing source");

            if (!String.IsNullOrEmpty(low))
            {
                if (chain.Modules.TryGetValue(low, out source))
                    clamp.Low = source;
                else if (Double.TryParse(low, NumberStyles.Any, CultureInfo.InvariantCulture, out value))
                    clamp.Low = value;
                else
                    throw new InvalidOperationException("Invalid low value");
            }

            if (!String.IsNullOrEmpty(high))
            {
                if (chain.Modules.TryGetValue(high, out source))
                    clamp.High = source;
                else if (Double.TryParse(high, NumberStyles.Any, CultureInfo.InvariantCulture, out value))
                    clamp.High = value;
                else
                    throw new InvalidOperationException("Invalid high value");
            }

            return clamp;
        }