public BasFeatureEntity GetFeatureEntityByOffset(long offset) { BasFeatureEntity feature = null; basReader.BaseStream.Seek(offset, SeekOrigin.Begin); BasEntity entity = BasEntityParser.Parse(basReader); if (entity != null) { feature = BasEntityToFeatureEntityConverter.Convert(entity); } return(feature); }
public Collection <BasFeatureEntity> GetAllFeatureEntities() { Collection <BasFeatureEntity> features = new Collection <BasFeatureEntity>(); basReader.BaseStream.Seek(0, SeekOrigin.Begin); while (basReader.BaseStream.Position != -1 && basReader.BaseStream.Length - basReader.BaseStream.Position > 80) { BasEntity entity = BasEntityParser.Parse(basReader); if (entity != null) { features.Add(BasEntityToFeatureEntityConverter.Convert(entity)); } } return(features); }
public Collection <string> GetColumns() { Collection <string> allColumns = new Collection <string>(); basReader.BaseStream.Seek(0, SeekOrigin.Begin); BasEntity firstRecord = BasEntityParser.Parse(basReader); if (firstRecord != null) { foreach (var column in Enum.GetValues(typeof(BasDefaultColumns))) { allColumns.Add(column.ToString()); } foreach (var column in firstRecord.HeaderResult.VariableData.Keys) { allColumns.Add(column); } } return(allColumns); }