Apama API Reference for .NET  9.10.0.4
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Apama.Util.PropertyChangeSupport Class Reference

PropertyChangeSupport is a utility class to support maintaining property listeners, keyed by property name. More...

Public Member Functions

virtual void AddPropertyChangeListener (PropertyChangedEventHandler listener)
 Add a PropertyChangeListener to the listener list. The listener is registered for all properties. The same listener object may be added more than once, and will be called as many times as it is added. If More...
 
virtual void AddPropertyChangeListener (string propertyName, PropertyChangedEventHandler listener)
 Add a PropertyChangeListener for a specific property. The listener will be invoked only when a call on FirePropertyChange names that specific property. The same listener object may be added more than once. For each property, the listener will be invoked the number of times it was added for that property. If More...
 
virtual void Clear ()
 Remove all references to listeners. More...
 
virtual void FireChange (string propertyName, object oldValue, object newValue)
 Report a bound property update to any registered listeners. No event is fired if old and new are equal and non-null. More...
 
virtual void FireChange (PropertyChangedEventArgs evt)
 Fire an existing PropertyChangedEventArgs to any registered listeners. No event is fired if the given event's old and new values are equal and non-null. More...
 
bool HasListeners (string propertyName)
 Returns true if there is any listener that would fire as a result of the specified propertyName changing. More...
 
 PropertyChangeSupport (object sender)
 Create a new PropertyChangeSupport, initialized with the specified sender object More...
 
virtual void RemovePropertyChangeListener (PropertyChangedEventHandler listener)
 Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties. If More...
 
virtual void RemovePropertyChangeListener (string propertyName, PropertyChangedEventHandler listener)
 Remove a PropertyChangeListener for a specific property. If More...
 

Detailed Description

PropertyChangeSupport is a utility class to support maintaining property listeners, keyed by property name.

Constructor & Destructor Documentation

Apama.Util.PropertyChangeSupport.PropertyChangeSupport ( object  sender)

Create a new PropertyChangeSupport, initialized with the specified sender object

Parameters
senderThe object that will be specified as the sender of all property change notification fired by this class.

Member Function Documentation

virtual void Apama.Util.PropertyChangeSupport.AddPropertyChangeListener ( PropertyChangedEventHandler  listener)
virtual

Add a PropertyChangeListener to the listener list. The listener is registered for all properties. The same listener object may be added more than once, and will be called as many times as it is added. If

listener is null, no exception is thrown and no action is taken.

Parameters
listenerThe PropertyChangedEventHandler to be added
virtual void Apama.Util.PropertyChangeSupport.AddPropertyChangeListener ( string  propertyName,
PropertyChangedEventHandler  listener 
)
virtual

Add a PropertyChangeListener for a specific property. The listener will be invoked only when a call on FirePropertyChange names that specific property. The same listener object may be added more than once. For each property, the listener will be invoked the number of times it was added for that property. If

propertyName or listener is null, no exception is thrown and no action is taken.

Parameters
propertyNameThe name of the property to listen on.
listenerThe PropertyChangeListener to be added
virtual void Apama.Util.PropertyChangeSupport.Clear ( )
virtual

Remove all references to listeners.

virtual void Apama.Util.PropertyChangeSupport.FireChange ( string  propertyName,
object  oldValue,
object  newValue 
)
virtual

Report a bound property update to any registered listeners. No event is fired if old and new are equal and non-null.

Parameters
propertyNameThe programmatic name of the property that was changed.
oldValueThe old value of the property.
newValueThe new value of the property.
virtual void Apama.Util.PropertyChangeSupport.FireChange ( PropertyChangedEventArgs  evt)
virtual

Fire an existing PropertyChangedEventArgs to any registered listeners. No event is fired if the given event's old and new values are equal and non-null.

Parameters
evtThe PropertyChangeEventArgs object.
bool Apama.Util.PropertyChangeSupport.HasListeners ( string  propertyName)

Returns true if there is any listener that would fire as a result of the specified propertyName changing.

Parameters
propertyName
Returns
virtual void Apama.Util.PropertyChangeSupport.RemovePropertyChangeListener ( PropertyChangedEventHandler  listener)
virtual

Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties. If

listener was added more than once to the same event source, it will be notified one less time after being removed. If listener is null, or was never added, no exception is thrown and no action is taken.

Parameters
listenerThe PropertyChangeListener to be removed
virtual void Apama.Util.PropertyChangeSupport.RemovePropertyChangeListener ( string  propertyName,
PropertyChangedEventHandler  listener 
)
virtual

Remove a PropertyChangeListener for a specific property. If

listener was added more than once to the same event source for the specified property, it will be notified one less time after being removed. If propertyName is null, no exception is thrown and no action is taken. If listener is null, or was never added for the specified property, no exception is thrown and no action is taken.

Parameters
propertyNameThe name of the property that was listened on.
listenerThe PropertyChangeListener to be removed
Submit a bug or feature
Copyright (c) 2013-2016 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors. Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.