コード例 #1
0
        private string GetStringFor(ICollection <DynamicRecord> dynamicRecords)
        {
            Pair <sbyte[], sbyte[]> source = _stringStore.readFullByteArray(dynamicRecords, PropertyType.String);

            // A string doesn't have a header in the data array
            return(DecodeString(source.Other()));
        }
コード例 #2
0
        public virtual string GetStringFor(RECORD nameRecord)
        {
            EnsureHeavy(nameRecord);
            int recordToFind = nameRecord.NameId;
            IEnumerator <DynamicRecord> records         = nameRecord.NameRecords.GetEnumerator();
            ICollection <DynamicRecord> relevantRecords = new List <DynamicRecord>();

            while (recordToFind != Record.NO_NEXT_BLOCK.intValue() && records.MoveNext())
            {
                DynamicRecord record = records.Current;
                if (record.InUse() && record.Id == recordToFind)
                {
                    recordToFind = ( int )record.NextBlock;
                    // TODO: optimize here, high chance next is right one
                    relevantRecords.Add(record);
                    records = nameRecord.NameRecords.GetEnumerator();
                }
            }
            return(decodeString(_nameStore.readFullByteArray(relevantRecords, PropertyType.String).other()));
        }