Ejemplo n.º 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());
        }
Ejemplo n.º 2
0
 private PacketManger()
 {
     RuleList  = RuleList.LoadFile();
     mDisabled = RuleList.Disabled;
 }