Esempio n. 1
0
        public LightnessPair(Dictionary <string, object> dictionary) : this()
        {
            if (dictionary == null)
            {
                throw new ArgumentException();
            }

            {
                if (dictionary.TryGetValue("lightness1", out object o) == false || !(o is Dictionary <string, object> dict))
                {
                    throw new ArgumentException();
                }

                this.Lightness1 = new LightnessVariant(dict);
            }

            {
                if (dictionary.TryGetValue("lightness2", out object o) == false || !(o is Dictionary <string, object> dict))
                {
                    throw new ArgumentException();
                }

                this.Lightness2 = new LightnessVariant(dict);
            }
        }
Esempio n. 2
0
 public LightnessPair()
 {
     this.Lightness1 = new LightnessVariant();
     this.Lightness2 = new LightnessVariant();
 }