CSLA .NET 10.0.0
A home for your business logic
Loading...
Searching...
No Matches
Csla.Core.BindableBase Class Referenceabstract

This class implements INotifyPropertyChanged and INotifyPropertyChanging in a serialization-safe manner. More...

Inheritance diagram for Csla.Core.BindableBase:
Csla.Core.MobileObject Csla.Serialization.Mobile.IMobileObject Csla.Serialization.Mobile.IMobileObjectMetastate Csla.Core.UndoableBase Csla.ReadOnlyBase< T > Csla.Core.BusinessBase Csla.Security.UsernameCriteria Csla.Server.Hosts.DataPortalChannel.CriteriaRequest Csla.Server.Hosts.DataPortalChannel.DataPortalErrorInfo Csla.BusinessBase< T >

Protected Member Functions

 BindableBase ()
 Creates an instance of the type.
virtual bool ShouldHandlerSerialize (PropertyChangedEventHandler value)
 Override this method to change the default logic for determining if the event handler should be serialized.
virtual void OnPropertyChanged (string propertyName)
 Call this method to raise the PropertyChanged event for a specific property.
virtual void OnMetaPropertyChanged (string propertyName)
virtual void OnPropertyChanged (IPropertyInfo propertyInfo)
 Call this method to raise the PropertyChanged event for a specific property.
virtual void OnIsDirtyChanged ()
 Call this method to raise the PropertyChanged event for all object properties.
virtual void OnUnknownPropertyChanged ()
 Call this method to raise the PropertyChanged event for all object properties.
virtual void OnIsDirtyChanging ()
 Call this method to raise the PropertyChanging event for all object properties.
virtual void OnUnknownPropertyChanging ()
 Call this method to raise the PropertyChanging event for all object properties.
virtual void OnPropertyChanging (string propertyName)
 Call this method to raise the PropertyChanging event for a specific property.
virtual void OnPropertyChanging (IPropertyInfo propertyInfo)
 Call this method to raise the PropertyChanging event for a specific property.
virtual bool ShouldHandlerSerialize (PropertyChangingEventHandler value)
 Override this method to change the default logic for determining if the event handler should be serialized.
Protected Member Functions inherited from Csla.Core.MobileObject
virtual void OnGetState (SerializationInfo info, StateMode mode)
 Override this method to insert your field values into the MobileFormatter serialization stream.
virtual void OnGetChildren (SerializationInfo info, MobileFormatter formatter)
 Override this method to insert your child object references into the MobileFormatter serialization stream.
virtual void OnSetState (SerializationInfo info, StateMode mode)
 Override this method to retrieve your field values from the MobileFormatter serialization stream.
virtual void OnSetChildren (SerializationInfo info, MobileFormatter formatter)
 Override this method to retrieve your child object references from the MobileFormatter serialization stream.
virtual void OnGetMetastate (BinaryWriter writer)
 Override this method to write field values directly to a binary stream for metastate serialization.
virtual void OnSetMetastate (BinaryReader reader)
 Override this method to read field values directly from a binary stream for metastate deserialization.

Events

PropertyChangedEventHandler? PropertyChanged [add, remove]
 Implements a serialization-safe PropertyChanged event.
PropertyChangingEventHandler? PropertyChanging [add, remove]
 Implements a serialization-safe PropertyChanging event.

Detailed Description

This class implements INotifyPropertyChanged and INotifyPropertyChanging in a serialization-safe manner.

Constructor & Destructor Documentation

◆ BindableBase()

Csla.Core.BindableBase.BindableBase ( )
inlineprotected

Creates an instance of the type.

Member Function Documentation

◆ OnIsDirtyChanged()

virtual void Csla.Core.BindableBase.OnIsDirtyChanged ( )
inlineprotectedvirtual

Call this method to raise the PropertyChanged event for all object properties.

This method is for backward compatibility with CSLA .NET 1.x.

◆ OnIsDirtyChanging()

virtual void Csla.Core.BindableBase.OnIsDirtyChanging ( )
inlineprotectedvirtual

Call this method to raise the PropertyChanging event for all object properties.

This method is for backward compatibility with CSLA .NET 1.x.

◆ OnMetaPropertyChanged()

virtual void Csla.Core.BindableBase.OnMetaPropertyChanged ( string propertyName)
inlineprotectedvirtual

Call this method to raise the PropertyChanged event for a MetaData (IsXYZ) property

Parameters
propertyNameName of the property that has changed.

This method may be called by properties in the business class to indicate the change in a specific property.

◆ OnPropertyChanged() [1/2]

virtual void Csla.Core.BindableBase.OnPropertyChanged ( IPropertyInfo propertyInfo)
inlineprotectedvirtual

Call this method to raise the PropertyChanged event for a specific property.

Parameters
propertyInfoPropertyInfo of the property that has changed.

This method may be called by properties in the business class to indicate the change in a specific property.

Reimplemented in Csla.Core.BusinessBase.

◆ OnPropertyChanged() [2/2]

virtual void Csla.Core.BindableBase.OnPropertyChanged ( string propertyName)
inlineprotectedvirtual

Call this method to raise the PropertyChanged event for a specific property.

Parameters
propertyNameName of the property that has changed.

This method may be called by properties in the business class to indicate the change in a specific property.

◆ OnPropertyChanging() [1/2]

virtual void Csla.Core.BindableBase.OnPropertyChanging ( IPropertyInfo propertyInfo)
inlineprotectedvirtual

Call this method to raise the PropertyChanging event for a specific property.

Parameters
propertyInfoPropertyInfo of the property that has Changing.

This method may be called by properties in the business class to indicate the change in a specific property.

◆ OnPropertyChanging() [2/2]

virtual void Csla.Core.BindableBase.OnPropertyChanging ( string propertyName)
inlineprotectedvirtual

Call this method to raise the PropertyChanging event for a specific property.

Parameters
propertyNameName of the property that has Changing.

This method may be called by properties in the business class to indicate the change in a specific property.

◆ OnUnknownPropertyChanged()

virtual void Csla.Core.BindableBase.OnUnknownPropertyChanged ( )
inlineprotectedvirtual

Call this method to raise the PropertyChanged event for all object properties.

This method is automatically called by MarkDirty. It actually raises PropertyChanged for an empty string, which tells data binding to refresh all properties.

◆ OnUnknownPropertyChanging()

virtual void Csla.Core.BindableBase.OnUnknownPropertyChanging ( )
inlineprotectedvirtual

Call this method to raise the PropertyChanging event for all object properties.

This method is automatically called by MarkDirty. It actually raises PropertyChanging for an empty string, which tells data binding to refresh all properties.

◆ ShouldHandlerSerialize() [1/2]

virtual bool Csla.Core.BindableBase.ShouldHandlerSerialize ( PropertyChangedEventHandler value)
inlineprotectedvirtual

Override this method to change the default logic for determining if the event handler should be serialized.

Parameters
valuethe event handler to review

◆ ShouldHandlerSerialize() [2/2]

virtual bool Csla.Core.BindableBase.ShouldHandlerSerialize ( PropertyChangingEventHandler value)
inlineprotectedvirtual

Override this method to change the default logic for determining if the event handler should be serialized.

Parameters
valuethe event handler to review

Event Documentation

◆ PropertyChanged

PropertyChangedEventHandler? Csla.Core.BindableBase.PropertyChanged
addremove

Implements a serialization-safe PropertyChanged event.

◆ PropertyChanging

PropertyChangingEventHandler? Csla.Core.BindableBase.PropertyChanging
addremove

Implements a serialization-safe PropertyChanging event.


The documentation for this class was generated from the following file: