private Geobase(UnmanagedBuffer buffer) { _buffer = buffer; var cityIndexData = GeobaseIndexData <GLocation> .Create(Header.Records, GetCityLocationIndex, GetLocation); CityIndex = new GeobaseIndex <string, GLocation>(cityIndexData, new GCityComparer()); var ipIntervalIndexData = GeobaseIndexData <GIpInterval> .Create(Header.Records, idx => idx, GetIpInterval); IpIntervalIndex = new GeobaseIndex <string, GIpInterval>(ipIntervalIndexData, new GIpComparer()); }
public GeobaseIndex(GeobaseIndexData <TStruct> indexData, IGComparer <TKey, TStruct> comparer) { IndexData = indexData; Comparer = comparer; }