Exemple #1
0
        public void Init()
        {
            this.RawData = this.ReadBinaries();

            this.IpRanges  = this.GetEmptyRangesIps(this.RawData.IpRangesCount);
            this.Locations = this.GetEmptyLocations(this.RawData.LocationsCount);

            var ipRanges  = this.IpRanges;
            var locations = this.Locations;

            BinaryReaderHelper.RawDeserializerList <IpRange>(
                this.RawData.IpRangesBytes,
                this.RawData.IpRangesCount,
                Marshal.SizeOf <IpRange>(),
                ref ipRanges);

            BinaryReaderHelper.RawDeserializerList <Location>(
                this.RawData.LocationsBytes,
                this.RawData.LocationsCount,
                Marshal.SizeOf <Location>(),
                ref locations);

            IpRanges  = ipRanges;
            Locations = locations;

            InitIndexes();

            OnIndexesCreated?.Invoke();
        }