static IPQuery( ) { filePath = TextUtility.GetFullPath(Utility.GetIPDbFilePath); fileIsExsit = FileManager.Exists(filePath, FsoMethod.File); if (!fileIsExsit) { throw new FrameworkExcption("IPdataFileNotExists"); } pcz.SetDbFilePath(filePath); }
static IPQuery() { IPQuery.fileIsExsit = true; IPQuery.filePath = ""; IPQuery.pcz = new IPQuery.PHCZIP(); IPQuery.filePath = TextUtility.GetFullPath(Utility.GetIPDbFilePath); IPQuery.fileIsExsit = FileManager.Exists(IPQuery.filePath, FsoMethod.File); if (!IPQuery.fileIsExsit) { throw new FrameworkExcption("IPdataFileNotExists"); } IPQuery.pcz.SetDbFilePath(IPQuery.filePath); }
///<summary> /// 构造函数 ///</summary> ///<param name="ipfilePath">纯真IP数据库路径</param> public IPSelect() { ipfilePath = TextUtility.GetFullPath(Utility.GetIPDbFilePath); }