projects/wms-framework/src/lib/basecomponentmodel/DependencyObject.ts
Dependency object support class
Protected bindingExpressions |
Default value : new SimpleDictionary<
string,
BindingExpression
>()
|
Public BindingValidationError |
Default value : new SubscriptionEvent<
(sender: any, e: BindingValidationErrorEventArgs) => void
>()
|
Event for validation errors |
Public change |
Type : SubscriptionEvent<void>
|
Default value : new SubscriptionEvent()
|
Infrastructure event for notifying event changes |
Public Dispatcher |
Type : Dispatcher
|
Default value : Dispatcher.GetDispatcher()
|
isEnableSetPropertiesRegistry |
Type : boolean
|
Default value : true
|
Flag which indicates if the dependency property set mechanism is enable |
Public IsInitializingBindings |
Type : boolean
|
Default value : false
|
Property to determine if bindings are being initialized |
previousValidationMessage |
Type : string
|
Default value : ''
|
Protected properties |
Type : object
|
Default value : {}
|
Private setPropertiesRegistry |
Type : Map<string | boolean>
|
Default value : new Map()
|
Registry with dependencies properties which has been set |
validationerr |
Default value : false
|
validationMessagesStack |
Type : Array<>
|
Default value : []
|
Keeps a queue of validation messages registered on the current Dependency Object |
Private addRelatedSubscriptionIfRequired | ||||||||||||
addRelatedSubscriptionIfRequired(event: SubscriptionEvent<any>, theHandler: any, bindingExpression: BindingExpression)
|
||||||||||||
Parameters :
Returns :
void
|
Private addSubscriptionForTwoWayBindings | ||||||||||||
addSubscriptionForTwoWayBindings(dependencyProperty: DependencyProperty, binding: Binding, bindingExpression: BindingExpression)
|
||||||||||||
Parameters :
Returns :
void
|
addsValidationMessage | |||||||||
addsValidationMessage(propKey: Binding | string, message: string)
|
|||||||||
Adds a new validation message associated to a binding or a property name
Parameters :
Returns :
void
|
Private beginSubscribeToMultiPropertyPathChanges | |||||||||||||||
beginSubscribeToMultiPropertyPathChanges(context: any, binding: Binding, dependencyProperty: DependencyProperty, bindingExpression: BindingExpression)
|
|||||||||||||||
Parameters :
Returns :
void
|
Private checkForSubscriptoinToDataErrorInfo | |||||||||||||||
checkForSubscriptoinToDataErrorInfo(currentContext: any, binding: Binding, propertyToSubscribe: string, bindingExpression: BindingExpression)
|
|||||||||||||||
Parameters :
Returns :
void
|
Public clearValue | ||||||
clearValue(property: DependencyProperty)
|
||||||
Clears the dependency property value
Parameters :
Returns :
void
|
Equals | ||||||
Equals(obj: any)
|
||||||
Compares this dependency object agains another object.
Parameters :
Returns :
boolean
{boolean} |
GetChild | ||||||
GetChild(idx: number)
|
||||||
Gets the child element at the index position
Parameters :
Returns :
DependencyObject
{DependencyObject} |
GetChildrenCount |
GetChildrenCount()
|
Method o know the amount of children the parent has
Returns :
number
{number} |
GetHashCode |
GetHashCode()
|
Gets a hash code for this dependency object.
Returns :
number
{number} |
Public getValue | ||||||
getValue(property: DependencyProperty)
|
||||||
Gets the value of a dependency property
Parameters :
Returns :
any
|
Public getValue | ||||||
getValue(property: string)
|
||||||
Parameters :
Returns :
any
|
Public getValue | ||||||
getValue(property: string | DependencyProperty)
|
||||||
Parameters :
Returns :
any
|
Private handleErrorsOnContext | |||||||||
handleErrorsOnContext(errorCtxt: INotifyDataErrorInfo, args: DataErrorsChangedEventArgs)
|
|||||||||
Check and register possible errors in an error context
Parameters :
Returns :
void
|
Public IsPropertySet | ||||||
IsPropertySet(propertyName: string)
|
||||||
Indicates if the property has been already set.
Parameters :
Returns :
any
|
Private performDataErrorValidationIfRequired |
performDataErrorValidationIfRequired(binding: Binding, theBindingContext: any)
|
Performs validation on model if the model implementes IDataErrorINfo
Returns :
void
|
Private performRemoveValidationIfInValidationError | ||||||
performRemoveValidationIfInValidationError(binding: Binding)
|
||||||
Performs the remove validation if the InValidationError is true
Parameters :
Returns :
void
|
Public performTargetObjectBindingUpdate | |||||||||
performTargetObjectBindingUpdate(dependencyProperty: DependencyProperty, binding: Binding)
|
|||||||||
Updates the target object value associated to the binding.
Parameters :
Returns :
void
|
Private preprocessValue | |||||||||
preprocessValue(property: DependencyProperty, value: any)
|
|||||||||
Preprocess value to be set to dependency property
Parameters :
Returns :
any
|
Private recreateSubscriptionsForMultiPropertyBindingPath | ||||||||||||||||||||||||
recreateSubscriptionsForMultiPropertyBindingPath(currentContext: any, outerContext: any, properties: string[], propertyIndex: number, dependencyProperty: DependencyProperty, bindingExpression: BindingExpression, subscriptionsForCurrentBindingPath: Array<>)
|
||||||||||||||||||||||||
Parameters :
Returns :
void
|
Private registerSetPropertyIfRequired | ||||||
registerSetPropertyIfRequired(name: string)
|
||||||
Register set property if required
Parameters :
Returns :
void
|
Private removeSubscriptionsForMultiPropertyBindingPath | |||||||||
removeSubscriptionsForMultiPropertyBindingPath(subscriptionsForCurrentBindingPath: [], propertyIndex: number)
|
|||||||||
Parameters :
Returns :
void
|
removeValidationMessage | ||||||
removeValidationMessage(propKey: Binding | string)
|
||||||
Removes a validation message associated to a binding or a property name
Parameters :
Returns :
void
|
SetBinding | ||||||||||||
SetBinding(dependencyProperty: DependencyProperty, binding: Binding)
|
||||||||||||
Sets a binding to the specified property at runtime
Parameters :
Returns :
void
|
Public setValue | |||||||||
setValue(property: DependencyProperty, value: any)
|
|||||||||
Sets the value for a dependency property
Parameters :
Returns :
void
|
Public setValueForScopedRegion | ||||||||||||
setValueForScopedRegion(property: DependencyProperty, value: any, scopedRegionManager: IRegionManager)
|
||||||||||||
Sets the value for a dependency property. This is a workaround to support Scoped Region Managers. A research is required to find out the way to get the application region Manager when scoped region managers are used (when creating the DelayedRegionBehavior, the correct scoped region manager must be passed as an argument).
Parameters :
Returns :
void
|
Protected shouldPreventDefaultSourceUpdate | |||||||||
shouldPreventDefaultSourceUpdate(dependencyProperty: DependencyProperty, binding: BindingExpression)
|
|||||||||
Parameters :
Returns :
boolean
|
Private subscribeToBindingPathChanges | |||||||||||||||
subscribeToBindingPathChanges(context: any, binding: Binding, dependencyProperty: DependencyProperty, bindingExpression: BindingExpression)
|
|||||||||||||||
Parameters :
Returns :
void
|
Private subscribeToErrorsChangedInModel | ||||||||||||
subscribeToErrorsChangedInModel(errorCtxt: INotifyDataErrorInfo, propertyToSubscribe: string, bindingExpression: BindingExpression)
|
||||||||||||
Parameters :
Returns :
void
|
Private subscribeToPropertyChanges | ||||||||||||||||||||||||
subscribeToPropertyChanges(currentContext: any, outerContext: any, properties: string[], propertyIndex: number, dependencyProperty: DependencyProperty, bindingExpression: BindingExpression, subscriptionsForCurrentBindingPath: Array<>)
|
||||||||||||||||||||||||
Parameters :
Returns :
void
|
Private updateSourceOfBinding | ||||||||||||
updateSourceOfBinding(binding: Binding, outerContext: any, dependencyProperty: DependencyProperty)
|
||||||||||||
Updates the source of a binding
Parameters :
Returns :
void
|
validationMessage |
getvalidationMessage()
|
Get the latest validation message registered |
InValidationError | ||||
getInValidationError()
|
||||
Gets the validation error condition This property is true if the control is in a validation error condition |
||||
setInValidationError(value)
|
||||
Sets the validation error condition This property is true if the control is in a validation error condition
Parameters :
Returns :
void
|