Beispiel #1
0
        /// <summary>
        /// 加载文件
        /// </summary>
        /// <param name="filepath"></param>
        /// <returns></returns>
        public static RuleList LoadFile(string filepath)
        {
            string text = File.ReadAllText(filepath, Encoding.UTF8);
            var    rl   = RuleList.LoadString(text);

            return(rl ?? new RuleList());
        }
Beispiel #2
0
 private PacketManger()
 {
     RuleList  = RuleList.LoadFile();
     mDisabled = RuleList.Disabled;
 }