private static Regex GetChildPathRegex(IModelObject node, ChildPropertyInfo childProperty) { var path = node.GetFolderPath(); return(string.IsNullOrEmpty(path) ? new Regex($@"{childProperty.FolderName}/[\w-]+/{FileSystemStorage.DataFile}", RegexOptions.IgnoreCase) : new Regex($@"{path}/{childProperty.FolderName}/[\w-]+/{FileSystemStorage.DataFile}", RegexOptions.IgnoreCase)); }
/// <summary> /// Initializes a new instance of the <see cref="ObjectPath"/> class. /// </summary> /// <param name="node">The object.</param> public ObjectPath(IModelObject node) : this(node?.Repository?.Id ?? throw new ArgumentNullException(nameof(node)), node.GetFolderPath()) { }