Exemple #1
0
        public Palette(JToken json)
        {
            if (json == null)
            {
                throw new ArgumentNullException(nameof(json));
            }

            m_name    = (string)json[JsonNames.Name];
            m_entries = new PaletteEntryList(json[JsonNames.PaletteEntries]);
        }
Exemple #2
0
        protected Palette(Palette prototype)
        {
            if (prototype == null)
            {
                throw new ArgumentNullException(nameof(prototype));
            }

            m_name    = prototype.m_name;
            m_entries = prototype.m_entries.Clone();
        }
Exemple #3
0
 public Palette(string name)
 {
     m_name    = name ?? throw new ArgumentNullException(nameof(name));
     m_entries = new PaletteEntryList();
 }