Пример #1
0
        private XElement GetBooleanParameter(BooleanParameter parameter)
        {
            XElement result = new XElement("parameter",
                                           new XAttribute("id", parameter.Id),
                                           new XAttribute("caption", parameter.Caption),
                                           new XAttribute("type", "boolean"),
                                           new XElement("values",
                                                        new XElement("current", (bool)parameter.GetValue())));

            return(result);
        }
Пример #2
0
        public override bool Equals(Parameter other)
        {
            if (other == this)
            {
                return(true);
            }

            if (!(other is BooleanParameter))
            {
                return(false);
            }

            BooleanParameter otherAsBoolean = other as BooleanParameter;

            return(other.Id == Id && value == otherAsBoolean.value && other.Caption == Caption);
        }