Search Results for

    Show / Hide Table of Contents
    View Source

    Class DeepCloneableList<T>

    A List that can be deep cloned with deep cloned elements and can reset the collection's items dirty flags

    Inheritance
    object
    List<T>
    Namespace: Umbraco.Cms.Core.Collections
    Assembly: Umbraco.Core.dll
    Syntax
    public class DeepCloneableList<T> : List<T>, IDeepCloneable, IRememberBeingDirty, ICanBeDirty
    Type Parameters
    Name Description
    T

    Constructors

    View Source

    DeepCloneableList(IEnumerable<T>)

    Default behavior is CloneOnce

    Declaration
    public DeepCloneableList(IEnumerable<T> collection)
    Parameters
    Type Name Description
    IEnumerable<T> collection
    View Source

    DeepCloneableList(IEnumerable<T>, ListCloneBehavior)

    Declaration
    public DeepCloneableList(IEnumerable<T> collection, ListCloneBehavior listCloneBehavior)
    Parameters
    Type Name Description
    IEnumerable<T> collection
    ListCloneBehavior listCloneBehavior
    View Source

    DeepCloneableList(ListCloneBehavior)

    Declaration
    public DeepCloneableList(ListCloneBehavior listCloneBehavior)
    Parameters
    Type Name Description
    ListCloneBehavior listCloneBehavior

    Methods

    View Source

    DeepClone()

    Creates a new list and adds each element as a deep cloned element if it is of type IDeepCloneable

    Declaration
    public object DeepClone()
    Returns
    Type Description
    object
    View Source

    DisableChangeTracking()

    Disables change tracking.

    Declaration
    public void DisableChangeTracking()
    View Source

    EnableChangeTracking()

    Enables change tracking.

    Declaration
    public void EnableChangeTracking()
    View Source

    GetDirtyProperties()

    Gets properties that are dirty.

    Declaration
    public IEnumerable<string> GetDirtyProperties()
    Returns
    Type Description
    IEnumerable<string>
    Remarks

    Always return an empty enumerable, the list has no properties that can be dirty.

    View Source

    GetWereDirtyProperties()

    Declaration
    public IEnumerable<string> GetWereDirtyProperties()
    Returns
    Type Description
    IEnumerable<string>
    Remarks

    Always return an empty enumerable, the list has no properties that can be dirty.

    View Source

    IsDirty()

    Determines whether the current entity is dirty.

    Declaration
    public bool IsDirty()
    Returns
    Type Description
    bool
    View Source

    IsPropertyDirty(string)

    Determines whether a specific property is dirty.

    Declaration
    public bool IsPropertyDirty(string propName)
    Parameters
    Type Name Description
    string propName
    Returns
    Type Description
    bool
    Remarks

    Always return false, the list has no properties that can be dirty.

    View Source

    ResetDirtyProperties()

    Resets dirty properties.

    Declaration
    public void ResetDirtyProperties()
    View Source

    ResetDirtyProperties(bool)

    Resets dirty properties.

    Declaration
    public void ResetDirtyProperties(bool rememberDirty)
    Parameters
    Type Name Description
    bool rememberDirty

    A value indicating whether to remember dirty properties.

    Remarks

    When rememberDirty is true, dirty properties are saved so they can be checked with WasDirty.

    View Source

    ResetWereDirtyProperties()

    Resets properties that were dirty.

    Declaration
    public void ResetWereDirtyProperties()
    View Source

    WasDirty()

    Determines whether the current entity is dirty.

    Declaration
    public bool WasDirty()
    Returns
    Type Description
    bool
    Remarks

    A property was dirty if it had been changed and the changes were committed.

    View Source

    WasPropertyDirty(string)

    Determines whether a specific property was dirty.

    Declaration
    public bool WasPropertyDirty(string propertyName)
    Parameters
    Type Name Description
    string propertyName
    Returns
    Type Description
    bool
    Remarks

    A property was dirty if it had been changed and the changes were committed.

    Events

    View Source

    PropertyChanged

    Declaration
    public event PropertyChangedEventHandler? PropertyChanged
    Event Type
    Type Description
    PropertyChangedEventHandler
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX