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)); }
public ReadOnlyOptionalProperty(UnitDataType type, T value) { _type = type; _value = value; }