示例#1
0
 /// <summary>
 /// Load the current GeoIp
 /// </summary>
 /// <param name="blockFile">Block file</param>
 /// <param name="locationFile">Location file</param>
 public static void LoadCurrent(string blockFile, string locationFile)
 {
     if (_Current == null)
     {
         _Current = new GeoLite2LocationProvider(blockFile, locationFile);
     }
 }
        /// <summary>
        /// Load the current GeoIp
        /// </summary>
        /// <param name="blockFile">Block file</param>
        /// <param name="locationFile">Location file</param>
        public static bool LoadCurrent(string blockFile, string locationFile)
        {
            if (_Current == null || _Current.Count <= 0)
            {
                _Current = new GeoLite2LocationProvider(blockFile, locationFile);
            }

            return(_Current != null && _Current.Count > 0);
        }