Hidistro.Core/Configuration/AppLocation.cs
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
namespace Hidistro.Core.Configuration
{
using Hidistro.Core;
using Hidistro.Core.Enums;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Text.RegularExpressions;
using System.Web;
using System.Xml;
public class AppLocation
{
private string defaultName;
private Hashtable ht = new Hashtable();
private const string HttpContextAppLocation = "AppLocation";
private IList<string> keys = new List<string>();
private string pattern;
private Regex regex;
internal void Add(HiApplication app)
{
if (this.ht.Contains(app.Name))
{
throw new Exception(string.Format(CultureInfo.InvariantCulture, "The HiApplication.Name ({0}) was not unique", new object[] { app.Name }));
}
this.ht.Add(app.Name, app);
this.keys.Add(app.Name);
}
public static AppLocation Create(XmlNode node)
{
if (node == null)
{
return null;
}
AppLocation location = new AppLocation();
XmlAttributeCollection attributes = node.Attributes;
if (attributes != null)
{
foreach (XmlAttribute attribute in attributes)
{
if (attribute.Name == "pattern")
{
location.Pattern = Globals.ApplicationPath + attribute.Value;
}
else if (attribute.Name == "defaultName")
{
location.DefaultName = attribute.Value;
}
}
for (int i = 0; i < node.ChildNodes.Count; i++)
{
XmlNode node2 = node.ChildNodes[i];
if (node2.Name == "add")
{
XmlAttributeCollection attributes2 = node2.Attributes;
if (attributes2 != null)
{
后面还有 131 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
