예제 #1
0
        internal DataModelPath(DataModel?target, DataModelPathEntity entity)
        {
            Target = target;
            Path   = entity.Path;
            Entity = entity;

            _segments = new LinkedList <DataModelPathSegment>();

            Load();
            Initialize();
            SubscribeToDataModelStore();
        }
예제 #2
0
        /// <summary>
        ///     Creates a new instance of the <see cref="DataModelPath" /> class pointing to the provided path
        /// </summary>
        /// <param name="target">The target at which this path starts</param>
        /// <param name="path">A point-separated path</param>
        public DataModelPath(DataModel target, string path)
        {
            Target = target ?? throw new ArgumentNullException(nameof(target));
            Path   = path ?? throw new ArgumentNullException(nameof(path));
            Entity = new DataModelPathEntity();

            _segments = new LinkedList <DataModelPathSegment>();

            Save();
            Initialize();
            SubscribeToDataModelStore();
        }
예제 #3
0
        /// <summary>
        ///     Creates a new instance of the <see cref="DataModelPath" /> class based on an existing path
        /// </summary>
        /// <param name="dataModelPath">The path to base the new instance on</param>
        public DataModelPath(DataModelPath dataModelPath)
        {
            if (dataModelPath == null)
            {
                throw new ArgumentNullException(nameof(dataModelPath));
            }

            Target = dataModelPath.Target;
            Path   = dataModelPath.Path;
            Entity = new DataModelPathEntity();

            _segments = new LinkedList <DataModelPathSegment>();

            Save();
            Initialize();
            SubscribeToDataModelStore();
        }