Exemplo n.º 1
0
 public InheritableModel(Inheritable <TValue> inheritable)
 {
     OwnValue       = inheritable.OwnValue;
     InheritedValue = inheritable.Value;
     Heritage       = inheritable.Heritage
                      .Select(h => new InheritableModel <TValue>(h))
                      .ToList();
 }
Exemplo n.º 2
0
    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]));
            }
        }
    }