Exemple #1
0
        public Attributes(Dictionary <string, double> values)
        {
            Values = new Dictionary <Attribute, double>();

            if (values != null)
            {
                foreach (string s in values.Keys)
                {
                    Values.Add(AttributeUtil.FromString(s), values[s]);
                }
            }
        }
Exemple #2
0
        public static List <Attribute> ToAttributes(List <string> attributes)
        {
            if (attributes == null)
            {
                return(null);
            }

            List <Attribute> res = new List <Attribute>();

            foreach (string s in attributes)
            {
                res.Add(AttributeUtil.FromString(s));
            }
            return(res);
        }