Search Results for

    Show / Hide Table of Contents

    Class Copying

    Allow for making shallow and deep copies of AAS model instances.

    Inheritance
    System.Object
    Copying
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: AasCore.Aas3_0
    Assembly: AasCore.Aas3_0.dll
    Syntax
    public static class Copying

    Methods

    | Improve this Doc View Source

    Deep<T>(T)

    Make a recursively a deep copy of that.

    Declaration
    public static T Deep<T>(T that)
        where T : IClass
    Parameters
    Type Name Description
    T that

    to be deeply copied in a recursive manner

    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    type to cast the result to

    | Improve this Doc View Source

    Shallow<T>(T)

    Make a shallow copy of that.

    Declaration
    public static T Shallow<T>(T that)
        where T : IClass
    Parameters
    Type Name Description
    T that

    to be copied in a shallow manner

    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    type to cast the result to

    Remarks

    All the properties are copied by reference. This includes also the lists. Hence, a list property is copied by reference, and not, as sometimes might be expected, as a new list of underlying references.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX