Пример #1
0
 /// <summary>
 /// 获取父对象
 /// </summary>
 /// <param name="pathInfo"></param>
 /// <returns></returns>
 public VxPathInfo GetParent(VxPathInfo pathInfo)
 {
     if (pathInfo == null)
     {
         throw new ArgumentNullException(nameof(pathInfo));
     }
     return(this.OnGetParent(pathInfo));
 }
Пример #2
0
 /// <summary>
 /// 获取父对象
 /// </summary>
 /// <param name="pathInfo"></param>
 /// <returns></returns>
 protected virtual VxPathInfo OnGetParent(VxPathInfo pathInfo)
 {
     if (pathInfo.IsRoot)
     {
         return(pathInfo);
     }
     return(this.OnCreatePathInfo(pathInfo.GetParentPathString()));
 }
Пример #3
0
 /// <summary>
 /// 获取所有子级文件
 /// </summary>
 /// <param name="pathInfo"></param>
 /// <param name="pattern"></param>
 /// <returns></returns>
 public IEnumerable <VxPathInfo> GetFiles(VxPathInfo pathInfo, string pattern) => this.OnGetFiles(pathInfo, pattern);
Пример #4
0
 /// <summary>
 /// 获取指定对象相对环境的完整路径
 /// </summary>
 /// <param name="pathInfo"></param>
 /// <returns></returns>
 public string GetFullPathString(VxPathInfo pathInfo) => this.OnGetFullPathString(pathInfo);
Пример #5
0
 /// <summary>
 /// 获取所有子级对象
 /// </summary>
 /// <param name="pathInfo"></param>
 /// <param name="pattern"></param>
 /// <returns></returns>
 protected virtual IEnumerable <VxPathInfo> OnGetChildren(VxPathInfo pathInfo, string pattern)
 {
     throw new NotImplementedException();
 }
Пример #6
0
 /// <summary>
 /// 获取指定对象相对环境的完整路径
 /// </summary>
 /// <param name="pathInfo"></param>
 /// <returns></returns>
 protected virtual string OnGetFullPathString(VxPathInfo pathInfo)
 {
     return($"{this.EntryPathString}{pathInfo.PathString.Substring(1)}");
 }
Пример #7
0
 /// <summary>
 /// 获取所有子级对象
 /// </summary>
 /// <param name="pathInfo"></param>
 /// <param name="pattern"></param>
 /// <returns></returns>
 public IEnumerable <VxPathInfo> GetChildren(VxPathInfo pathInfo, string pattern) => this.OnGetChildren(pathInfo, pattern);