本文整理汇总了C#中Area.InExtern方法的典型用法代码示例。如果您正苦于以下问题:C# Area.InExtern方法的具体用法?C# Area.InExtern怎么用?C# Area.InExtern使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Area
的用法示例。
在下文中一共展示了Area.InExtern方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PopulateList
private static List<Entry> PopulateList(Area area, Entry parentEntry, DirectoryInfo info, string subdirectory, DirectoryInfo adminFolder, bool ignoreDirectory)
{
List<Entry> result = new List<Entry>();
if (area.InExtern(info))
return result;
bool ignoreContents = false;
string slashedSubdirectory = subdirectory;
if (subdirectory != string.Empty)
{
if (slashedSubdirectory[slashedSubdirectory.Length - 1] != '/')
slashedSubdirectory += '/';
if (area != null && area.Directives != null && area.Directives.Include != null)
{
ignoreDirectory = true;
foreach (var y in area.Directives.Include.Directories)
{
if (y.StartsWith(slashedSubdirectory, StringComparison.OrdinalIgnoreCase))
{
if (slashedSubdirectory.Length <= y.Length - 1)
ignoreContents = true;
ignoreDirectory = false;
break;
}
else if (slashedSubdirectory.StartsWith(y))
{
ignoreDirectory = false;
break;
}
}
if (area.Directives.Include.RegexDirectoryPatterns != null)
{
foreach (var y in area.Directives.Include.RegexDirectoryPatterns)
{
if (y.IsMatch(slashedSubdirectory))
{
ignoreDirectory = false;
break;
}
}
}
}
if (area != null && area.Directives != null && area.Directives.Ignore != null && area.Directives.Ignore.RegexDirectoryPatterns != null)
{
foreach (var y in area.Directives.Ignore.Directories)
{
if (slashedSubdirectory.StartsWith(y, StringComparison.OrdinalIgnoreCase))
{
ignoreDirectory = true;
break;
}
}
foreach (var y in area.Directives.Ignore.RegexDirectoryPatterns)
{
if (y.IsMatch(slashedSubdirectory))
{
ignoreDirectory = true;
break;
}
}
}
if (area != null && area.Directives != null && area.Directives.Externals != null)
{
foreach (var x in area.Directives.Externals)
{
string extdir = x.Value.Location.Replace('\\', '/');
if (!extdir.EndsWith("/"))
extdir += "/";
if (string.Equals(slashedSubdirectory, extdir, StringComparison.OrdinalIgnoreCase))
{
return result;
}
}
}
parentEntry = new Entry(area, parentEntry, info, slashedSubdirectory, ignoreDirectory);
result.Add(parentEntry);
if (ignoreDirectory)
return result;
}
// Don't add children for symlinks.
if (Utilities.Symlink.Exists(info))
return result;
List<Task<List<Entry>>> tasks = new List<Task<List<Entry>>>();
string prefix = string.IsNullOrEmpty(subdirectory) ? string.Empty : slashedSubdirectory;
foreach (var x in info.GetFileSystemInfos())
{
string fn = x.Name;
string name = prefix + fn;
if (x.Attributes.HasFlag(FileAttributes.Directory))
{
if (fn == "." || fn == "..")
continue;
if (x.Name == ".versionr")
continue;
#if DEBUG
//.........这里部分代码省略.........