Exemple #1
0
        public List <FieldDefinitionRecord> GetFieldRecords(TableDefinitionRecord record)
        {
            var results = new List <FieldDefinitionRecord>();

            for (var i = 0; i < KeyField.Length; i++)
            {
                results.Add(record.Fields[i]);
            }
            return(results);
        }
Exemple #2
0
        /// <summary>
        ///     To parse the values in a field, you must pass the table definition.
        /// </summary>
        /// <param name="record">Table definition of the data field.</param>
        public void ParseValues(TableDefinitionRecord record)
        {
            var values = new List <object>(record.Fields.Count);

            using (var stream = new MemoryStream(Data))
            {
                foreach (var field in record.Fields)
                {
                    values.Add(field.IsArray() ? field.GetArrayValue(stream) : field.GetValue(stream));
                }
            }
            Values = values;
        }