using System; using System.Collections.Generic; namespace Cryville.Crtr.Browsing.UI { public class MetaProperty { public string Name { get; set; } public IReadOnlyDictionary Values { get; set; } public object MainValue { get { return Values[""]; } } public MetaProperty(string name, IReadOnlyDictionary values) { if (values.Count == 0) throw new ArgumentException("Value is empty."); if (!values.ContainsKey("")) throw new ArgumentException("Main value is missing."); Name = name; Values = values; } public MetaProperty(string name, object value) { Name = name; Values = new Dictionary { { "", value } }; } } }