Artemis Artemis
Artemis Artemis

Search Results for

    Class DataModelPath

    Represents a path that points to a property in data model

    Inheritance
    object
    DataModelPath
    Implements
    IStorageModel
    IDisposable
    Namespace: Artemis.Core
    Assembly: Artemis.Core.dll
    Syntax
    public class DataModelPath : IStorageModel, IDisposable

    Constructors

    DataModelPath(DataModelPath)

    Creates a new instance of the DataModelPath class based on an existing path

    Declaration
    public DataModelPath(DataModelPath dataModelPath)
    Parameters
    Type Name Description
    DataModelPath dataModelPath

    The path to base the new instance on

    DataModelPath(DataModel)

    Creates a new instance of the DataModelPath class pointing directly to the target

    Declaration
    public DataModelPath(DataModel target)
    Parameters
    Type Name Description
    DataModel target

    The target at which this path starts

    DataModelPath(DataModel, string)

    Creates a new instance of the DataModelPath class pointing to the provided path

    Declaration
    public DataModelPath(DataModel target, string path)
    Parameters
    Type Name Description
    DataModel target

    The target at which this path starts

    string path

    A point-separated path

    DataModelPath(DataModelPathEntity)

    Creates a new instance of the DataModelPath class based on a Artemis.Storage.Entities.Profile.DataModelPathEntity

    Declaration
    public DataModelPath(DataModelPathEntity entity)
    Parameters
    Type Name Description
    DataModelPathEntity entity

    Properties

    DataModelId

    Gets the data model ID of the Target if it is a DataModel

    Declaration
    public string? DataModelId { get; }
    Property Value
    Type Description
    string

    Entity

    Gets the entity used for persistent storage

    Declaration
    public DataModelPathEntity Entity { get; }
    Property Value
    Type Description
    DataModelPathEntity

    IsValid

    Gets a boolean indicating whether all Segments are valid

    Declaration
    public bool IsValid { get; }
    Property Value
    Type Description
    bool

    Path

    Gets the point-separated path associated with this DataModelPath

    Declaration
    public string Path { get; }
    Property Value
    Type Description
    string

    Segments

    Gets a read-only list of all segments of this path

    Declaration
    public IReadOnlyCollection<DataModelPathSegment> Segments { get; }
    Property Value
    Type Description
    IReadOnlyCollection<DataModelPathSegment>

    Target

    Gets the data model at which this path starts

    Declaration
    public DataModel? Target { get; }
    Property Value
    Type Description
    DataModel

    Methods

    Dispose()

    Declaration
    public void Dispose()

    Dispose(bool)

    Releases the unmanaged resources used by the object and optionally releases the managed resources.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    true to release both managed and unmanaged resources; false to release only unmanaged resources.

    Equals(DataModelPath)

    Declaration
    protected bool Equals(DataModelPath other)
    Parameters
    Type Name Description
    DataModelPath other
    Returns
    Type Description
    bool

    Equals(object?)

    Declaration
    public override bool Equals(object? obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    object.Equals(object)

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    object.GetHashCode()

    GetPropertyDescription()

    Gets the property description of the property this path points to

    Declaration
    public DataModelPropertyAttribute? GetPropertyDescription()
    Returns
    Type Description
    DataModelPropertyAttribute

    If found, the data model property description

    GetPropertyInfo()

    Gets the property info of the property this path points to

    Declaration
    public PropertyInfo? GetPropertyInfo()
    Returns
    Type Description
    PropertyInfo

    If static, the property info. If dynamic, null

    GetPropertyType()

    Gets the type of the property this path points to

    Declaration
    public Type? GetPropertyType()
    Returns
    Type Description
    Type

    If possible, the property type

    GetValue()

    Gets the current value of the path

    Declaration
    public object? GetValue()
    Returns
    Type Description
    object

    Load()

    Loads the model from its associated entity

    Declaration
    public void Load()

    OnPathInvalidated()

    Invokes the PathValidated event

    Declaration
    protected virtual void OnPathInvalidated()

    OnPathValidated()

    Invokes the PathInvalidated event

    Declaration
    protected virtual void OnPathValidated()

    Save()

    Saves the model to its associated entity

    Declaration
    public void Save()

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()

    Events

    PathInvalidated

    Occurs whenever the path becomes invalid

    Declaration
    public event EventHandler? PathInvalidated
    Event Type
    Type Description
    EventHandler

    PathValidated

    Occurs whenever the path becomes valid

    Declaration
    public event EventHandler? PathValidated
    Event Type
    Type Description
    EventHandler

    Implements

    IStorageModel
    IDisposable
    Content is available under the PolyForm Noncommercial License, by Artemis RGB.