Hidistro.Core/Configuration/HiApplication.cs

(完整代码) 1KB

namespace Hidistro.Core.Configuration
{
    using Hidistro.Core.Enums;
    using System;
    using System.Globalization;
    using System.Text.RegularExpressions;

    internal class HiApplication
    {
        private Hidistro.Core.Enums.ApplicationType _appType = Hidistro.Core.Enums.ApplicationType.Common;
        private string _name;
        private Regex _regex;

        internal HiApplication(string pattern, string name, Hidistro.Core.Enums.ApplicationType appType)
        {
            this._name = name.ToLower(CultureInfo.InvariantCulture);
            this._appType = appType;
            this._regex = new Regex(pattern, RegexOptions.Compiled | RegexOptions.IgnoreCase);
        }

        public bool IsMatch(string url)
        {
            return this._regex.IsMatch(url);
        }

        public Hidistro.Core.Enums.ApplicationType ApplicationType
        {
            get
            {
                return this._appType;
            }
        }

        public string Name
        {
            get
            {
                return this._name;
            }
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。