|
|
@ -36,23 +36,22 @@ namespace Perspex |
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// The overridden default values for the property, by type.
|
|
|
/// The overridden default values for the property, by type.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
private readonly Dictionary<Type, object> _defaultValues = new Dictionary<Type, object>(); |
|
|
private readonly Dictionary<Type, object> _defaultValues; |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Observable fired when this property changes on any <see cref="PerspexObject"/>.
|
|
|
/// Observable fired when this property changes on any <see cref="PerspexObject"/>.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
private readonly Subject<PerspexPropertyChangedEventArgs> _initialized = new Subject<PerspexPropertyChangedEventArgs>(); |
|
|
private readonly Subject<PerspexPropertyChangedEventArgs> _initialized; |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Observable fired when this property changes on any <see cref="PerspexObject"/>.
|
|
|
/// Observable fired when this property changes on any <see cref="PerspexObject"/>.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
private readonly Subject<PerspexPropertyChangedEventArgs> _changed = new Subject<PerspexPropertyChangedEventArgs>(); |
|
|
private readonly Subject<PerspexPropertyChangedEventArgs> _changed; |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// The validation functions for the property, by type.
|
|
|
/// The validation functions for the property, by type.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
private readonly Dictionary<Type, Func<PerspexObject, object, object>> _validation = |
|
|
private readonly Dictionary<Type, Func<PerspexObject, object, object>> _validation; |
|
|
new Dictionary<Type, Func<PerspexObject, object, object>>(); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets the ID of the property.
|
|
|
/// Gets the ID of the property.
|
|
|
@ -95,6 +94,11 @@ namespace Perspex |
|
|
throw new ArgumentException("'name' may not contain periods."); |
|
|
throw new ArgumentException("'name' may not contain periods."); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_defaultValues = new Dictionary<Type, object>(); |
|
|
|
|
|
_initialized = new Subject<PerspexPropertyChangedEventArgs>(); |
|
|
|
|
|
_changed = new Subject<PerspexPropertyChangedEventArgs>(); |
|
|
|
|
|
_validation = new Dictionary<Type, Func<PerspexObject, object, object>>(); |
|
|
|
|
|
|
|
|
Name = name; |
|
|
Name = name; |
|
|
PropertyType = valueType; |
|
|
PropertyType = valueType; |
|
|
OwnerType = ownerType; |
|
|
OwnerType = ownerType; |
|
|
@ -136,6 +140,11 @@ namespace Perspex |
|
|
throw new ArgumentException("'name' may not contain periods."); |
|
|
throw new ArgumentException("'name' may not contain periods."); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_defaultValues = new Dictionary<Type, object>(); |
|
|
|
|
|
_initialized = new Subject<PerspexPropertyChangedEventArgs>(); |
|
|
|
|
|
_changed = new Subject<PerspexPropertyChangedEventArgs>(); |
|
|
|
|
|
_validation = new Dictionary<Type, Func<PerspexObject, object, object>>(); |
|
|
|
|
|
|
|
|
Name = name; |
|
|
Name = name; |
|
|
PropertyType = valueType; |
|
|
PropertyType = valueType; |
|
|
OwnerType = ownerType; |
|
|
OwnerType = ownerType; |
|
|
@ -161,22 +170,15 @@ namespace Perspex |
|
|
"This method cannot be called on direct PerspexProperties."); |
|
|
"This method cannot be called on direct PerspexProperties."); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//Name = name;
|
|
|
_defaultValues = source._defaultValues; |
|
|
//PropertyType = valueType;
|
|
|
_initialized = source._initialized; |
|
|
//OwnerType = ownerType;
|
|
|
_changed = source._changed; |
|
|
//_defaultValues.Add(ownerType, defaultValue);
|
|
|
_validation = source._validation; |
|
|
//Inherits = inherits;
|
|
|
|
|
|
//DefaultBindingMode = defaultBindingMode;
|
|
|
|
|
|
//IsAttached = isAttached;
|
|
|
|
|
|
//Notifying = notifying;
|
|
|
|
|
|
//_id = s_nextId++;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Name = source.Name; |
|
|
Name = source.Name; |
|
|
PropertyType = source.PropertyType; |
|
|
PropertyType = source.PropertyType; |
|
|
OwnerType = ownerType; |
|
|
OwnerType = ownerType; |
|
|
_defaultValue = source._defaultValue; |
|
|
_defaultValue = source._defaultValue; |
|
|
_defaultValues = source._defaultValues; |
|
|
|
|
|
Inherits = source.Inherits; |
|
|
Inherits = source.Inherits; |
|
|
DefaultBindingMode = source.DefaultBindingMode; |
|
|
DefaultBindingMode = source.DefaultBindingMode; |
|
|
IsAttached = false; |
|
|
IsAttached = false; |
|
|
@ -208,6 +210,11 @@ namespace Perspex |
|
|
"This method can only be called on direct PerspexProperties."); |
|
|
"This method can only be called on direct PerspexProperties."); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_defaultValues = source._defaultValues; |
|
|
|
|
|
_initialized = source._initialized; |
|
|
|
|
|
_changed = source._changed; |
|
|
|
|
|
_validation = source._validation; |
|
|
|
|
|
|
|
|
Name = source.Name; |
|
|
Name = source.Name; |
|
|
PropertyType = source.PropertyType; |
|
|
PropertyType = source.PropertyType; |
|
|
OwnerType = ownerType; |
|
|
OwnerType = ownerType; |
|
|
|