/// ------------------------------------------------------------------------------------ /// <summary> /// Load the field values into the model's data cache. /// </summary> /// ------------------------------------------------------------------------------------ private void LoadFields() { var factoryFields = FileType.FactoryFields.ToArray(); _fieldDefsForFile = factoryFields .Union(_fieldGatherer.GetAllFieldsForFileType(FileType) .Where(f => factoryFields.All(e => e.Key != f.Key))); foreach (var field in _fieldDefsForFile) { if (_includedFieldFilterFunction != null && !_includedFieldFilterFunction(field.Key)) { continue; } //TODO: make use of field.ReadOnly var fieldValue = new FieldInstance(field.Key, _file.GetStringValue(field.Key, string.Empty)); RowData.Add(fieldValue); } }