示例#1
0
        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));
        }
示例#2
0
 /// <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())
 {
 }