Hidistro.Core/Urls/LocationSet.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
namespace Hidistro.Core.Urls
{
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Globalization;
using System.Reflection;
using System.Text;
public class LocationSet : IEnumerable
{
private ListDictionary locations = new ListDictionary();
public void Add(string name, Location location)
{
if (null != name)
{
this.locations[name.ToLower(CultureInfo.InvariantCulture)] = location;
}
}
public Location FindLocationByName(string name)
{
if (null != name)
{
name = name.ToLower(CultureInfo.InvariantCulture);
foreach (string str in this.locations.Keys)
{
if (str == name)
{
return (this.locations[name] as Location);
}
}
}
return null;
}
public Location FindLocationByPath(string path)
{
foreach (Location location in this.locations.Values)
{
if (location.IsMatch(path))
{
return location;
}
}
return null;
}
public IEnumerator GetEnumerator()
{
return this.locations.GetEnumerator();
}
public string Filter
{
get
{
StringBuilder builder = new StringBuilder();
foreach (Location location in this.locations.Values)
后面还有 29 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
