public InheritableModel(Inheritable <TValue> inheritable) { OwnValue = inheritable.OwnValue; InheritedValue = inheritable.Value; Heritage = inheritable.Heritage .Select(h => new InheritableModel <TValue>(h)) .ToList(); }
public SubLocation this[string key] { get { //SubLocation result; if (String.IsNullOrEmpty(key)) { return(Inheritable.Inherited(subLocations[Default])); } else if (subLocations.ContainsKey(key)) { return(Inheritable.Inherited(subLocations[key])); } else { ErrorMessage.Show($"Requested sublocation {key} is not present in location {ID}"); return(Inheritable.Inherited(subLocations[Default])); } } }