public static void Add(GeoData data) { GeoData geoDataToDict = (GeoData) data.Clone(); /* for example: ipData.IPAddress: 255.101.18.34 long longIp: 4284813858 ip_address 24 mask is a IPCache key: 255.101.18.0 */ uint longIp = IpUtilities.IpToUint(geoDataToDict.IpAddress); IPAddress subnet24 = IpUtilities.UintToIp(longIp - (longIp % 256)); geoDataToDict.IpAddress = subnet24; try { IPCache.Add(subnet24, geoDataToDict); } catch { } }
public BatchWindowListViewView(GeoData ipdata, string clipdata) { _ipdata = (GeoData)ipdata.Clone(); _clipdata = clipdata; }