public GeoLite2IPSearcher(string file = null) { if (file == null) { file = new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.ToString() + "\\IPSearchers\\Data\\GeoLite2-City.mmdb"; } City = new MaxMind.Db.Reader(file); }
/// <summary> /// The stream to GeoLite2-City.mmdb /// </summary> /// <param name="stream"></param> public Gl2GeoIP(Stream stream, bool leaveOpen = false) { Reader = new MaxMind.Db.Reader(stream); BaseStream = stream; LeaveOpen = leaveOpen; }