public UnitOptionalProperty(Unit owner, UnitDataType type, string name, Func <T> defaultValueFactory)
 {
     _property = owner.DynamicProperties.GetProperty(name, defaultValueFactory);
     _property.PropertyChanged += PropertyOnPropertyChanged;
     Type = type;
 }
 public IOptionalProperty Get(UnitDataType type)
 {
     return(_properties.GetOrDefault(type));
 }
Beispiel #3
0
 public ReadOnlyOptionalProperty(UnitDataType type, T value)
 {
     _type  = type;
     _value = value;
 }