Class BeingDirty
Provides a concrete implementation of BeingDirtyBase.
Namespace: Umbraco.Cms.Core.Models.Entities
Assembly: Umbraco.Core.dll
Syntax
public sealed class BeingDirty : BeingDirtyBase, IRememberBeingDirty, ICanBeDirty
Remarks
This class is provided for classes that cannot inherit from BeingDirtyBase and therefore need to implement IRememberBeingDirty, by re-using some of BeingDirtyBase logic.
Methods
View SourceOnPropertyChanged(String)
Registers that a property has changed.
Declaration
public void OnPropertyChanged(string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName |
SetPropertyValueAndDetectChanges<T>(T, ref T, String, Nullable<IEqualityComparer<T>>)
Sets a property value, detects changes and manages the dirty flag.
Declaration
public void SetPropertyValueAndDetectChanges<T>(T value, ref T valueRef, string propertyName, IEqualityComparer<T>? comparer = null)
Parameters
Type | Name | Description |
---|---|---|
T | value | The new value. |
T | valueRef | A reference to the value to set. |
System.String | propertyName | The property name. |
System.Nullable<IEqualityComparer<T>> | comparer | A comparer to compare property values. |
Type Parameters
Name | Description |
---|---|
T | The type of the value. |