private PropertyTreeElement(IEditorProvider provider, IPropertyInfo property, PropertyTreeElement parent)
            : this(provider, property)
        {
            if (parent == null)
            {
                throw new ArgumentNullException(nameof(parent));
            }

            Parent = parent;
        }
        private void UpdatePath()
        {
            if (SelectedPropertyElement == null)
            {
                Path = null;
                return;
            }

            string newPath = String.Empty;
            PropertyTreeElement element = SelectedPropertyElement;

            while (element != null)
            {
                string sep = (newPath != String.Empty) ? ((!element.IsCollection) ? "." : "/") : String.Empty;
                newPath = element.Property.Name + sep + newPath;
                element = element.Parent;
            }

            Path = newPath;
        }