Navigation :
Introduction
FAQ
Setup, deployment & projects
Getting started
Examples
Catel.Core
Catel.MVVM
Catel.Fody
Catel.ReSharper
Tips & tricks
API reference
-
Catel.Cores
--
Catel
---
Catel.Android
---
Catel.ApiCop
---
Catel.Caching
---
Catel.Collections
---
Catel.ComponentModel
---
Catel.Configuration
---
Catel.Core
---
Catel.Data
---- AdvancedPropertyChangedEventArgs
---- AttributeValidatorProvider
---- BoxingCache
---- BusinessRuleValidationResult
---- CatelTypeInfo
---- ChangeNotificationWrapper
---- ChildAwareModelBase
---- ComparableModelBase
---- CompositeValidator
---- CompositeValidatorProvider
---- DispatcherObservableObject
---- EditableObjectHelper
---- EventChangeType
---- ExcludeFromValidationAttribute
---- FieldValidationResult
---- IAdvancedNotifyPropertyChanged
---- IBusinessRuleValidationResult
---- IFieldValidationResult
---- IModel
---- IModelEditor
---- IModelEqualityComparer
---- IModelExtensions
---- IModelSerialization
---- ISavableModel
---- ISavableModelExtensions
---- IValidatable
---- IValidatableExtensions
---- IValidatableModel
---- IValidatableModelExtensions
---- IValidationContext
---- IValidationContextExtensions
---- IValidationResult
---- IValidationSummary
---- IValidator
---- IValidatorProvider
---- IValueValidator
---- InvalidPropertyException
---- InvalidPropertyValueException
---- ModelBase
---- ModelBaseExtensions
---- ModelEqualityComparer
---- ObservableObject
---- ObservableObjectExtensions
---- PropertyAlreadyRegisteredException
---- PropertyBag
---- PropertyData
---- PropertyDataManager
---- PropertyNotNullableException
---- PropertyNotRegisteredException
---- PropertyValue
---- SavableModelBase
---- SuspensionContext
---- ValidatableModelBase
---- ValidateModelAttribute
---- ValidationContext
---- ValidationContextChange
---- ValidationContextChangeType
---- ValidationContextHelper
---- ValidationEventArgs
---- ValidationExtensions
---- ValidationResult
---- ValidationResultType
---- ValidationSummary
---- ValidatorBase
---- ValidatorProviderBase
---- XmlNameMapper
---
Catel.ExceptionHandling
---
Catel.IO
---
Catel.IoC
---
Catel.Linq
---
Catel.Logging
---
Catel.Messaging
---
Catel.Pooling
---
Catel.Reflection
---
Catel.Runtime
---
Catel.Scoping
---
Catel.Services
---
Catel.Test
---
Catel.Text
---
Catel.Threading
--- Argument
--- AsyncEventHandler
--- AsyncEventHandlerExtensions
--- ByteArrayExtensions
--- CatelEnvironment
--- CompositeFilter
--- CompositePredicate
--- CoreModule
--- DesignTimeCodeAttribute
--- DesignTimeHelper
--- DesignTimeInitializer
--- Disposable
--- DisposableToken
--- Enum
--- EnvironmentHelper
--- EventHandlerExtensions
--- ExceptionExtensions
--- ExceptionFactory
--- ExpressionHelper
--- FastDateTime
--- HashHelper
--- IBindableEnum
--- ICommandManagerExtensions
--- ICompositeFilter
--- IDisposableToken
--- IExecute
--- IExecuteWithObject
--- IFluent
--- INotifyPropertyChangedExtensions
--- IUniqueIdentifyable
--- IWeakAction
--- IWeakEventListener
--- IWeakFunc
--- IWeakReference
--- JsonExtensions
--- KnownPlatforms
--- LanguageHelper
--- MVVMModule
--- MustBeImplementedException
--- NotSupportedInPlatformException
--- ObjectHelper
--- ObjectToStringHelper
--- OpenInstanceActionHandler
--- OpenInstanceEventHandler
--- ParallelHelper
--- Platforms
--- ProcessExtensions
--- ProgressContext
--- ResourceHelper
--- SerializationJsonModule
--- StringExtensions
--- StringToObjectHelper
--- SupportedPlatforms
--- TagHelper
--- ThemeHelper
--- ThreadHelper
--- UniqueIdentifierHelper
--- UriExtensions
--- WeakAction
--- WeakActionBase
--- WeakEventListener
--- WeakFunc
--
Systems
-
Catel.MVVMs
-
Catel.Serialization.Jsons
ChangeNotificationWrapper
Name
Value
Assembly
Catel.Core
Namespace
Catel.Data
Available on
.NET Framework 4.5, .NET Framework 4.6, Portable Class Libraries, Xamarin - Android, Xamarin - iOS
public class ChangeNotificationWrapper
Wrapper for an object that implements the and. This class is thread-safe and uses weak events to prevent memory leaks.
Fields
Constructors
ChangeNotificationWrapper(object value)
Initializes a new instance of the ChangeNotificationWrapper class.
Parameters
Name
Description
value
The value.
Exceptions
Name
Description
ArgumentNullException
The value isnull
or whitespace.
Properties
IsObjectAlive
Gets a value indicating whether the object is alive.
SupportsNotifyCollectionChanged
Gets a value indicating whether is supported by the target object.
SupportsNotifyPropertyChanged
Gets a value indicating whether is supported by the target object.
Events
CollectionChanged
Occurs when the CollectionChanged event occurs on the target object.
CollectionItemPropertyChanged
Occurs when the PropertyChanged event occurs in the collection when the target object is a collection.
PropertyChanged
Occurs when the PropertyChanged event occurs on the target object.
Methods
IsUsefulForObject(object obj)
Determines whether creating a ChangeNotificationWrapper is useful for the specified object. An object is considered usable when it implements either or.
Parameters
Name
Description
obj
The object to check.
Returns
true
if it is useful to create a ChangeNotificationWrapper ; otherwise,false
.
OnObjectCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
Called when the target object raises the event.
Parameters
Name
Description
sender
The sender.
e
The instance containing the event data.
This method is public to allow the usage of the WeakEventListener , do not call this method yourself.
OnObjectCollectionItemPropertyChanged(object sender, PropertyChangedEventArgs e)
Called when the target object raises the event of an object that is located inside the collection being monitored.
Parameters
Name
Description
sender
The sender.
e
The instance containing the event data.
This method is public to allow the usage of the WeakEventListener , do not call this method yourself.
OnObjectPropertyChanged(object sender, PropertyChangedEventArgs e)
Called when the target object raises the event.
Parameters
Name
Description
sender
The sender.
e
The instance containing the event data.
This method is public to allow the usage of the WeakEventListener , do not call this method yourself.
SubscribeNotifyChangedEvents(object value, ICollection parentCollection)
Subscribes to the notify changed events.
Parameters
Name
Description
value
The object to subscribe to.
parentCollection
If notnull
, this is a collection item which should use Object,PropertyChangedEventArgs).
UnsubscribeFromAllEvents()
Unsubscribes from all events.
UnsubscribeNotifyChangedEvents(object value, ICollection parentCollection)
Unsubscribes from the notify changed events.
Parameters
Name
Description
value
The object to unsubscribe from.
parentCollection
The parent collection.
No need to check for weak events, they are unsubscribed automatically.
UpdateCollectionSubscriptions(ICollection collection)
Updates all the collection subscriptions. This method is internally used when a notifiable collection raises the event.
Have a question about Catel? Use StackOverflow with the Catel tag!
Discussion
Please enable JavaScript to view the comments powered by Disqus.