public TransactionFieldReader GetDataReader(FieldLookups lookups) { return(new TransactionFieldReader( GetIdColumn(lookups.Id), GetColumn <string>(lookups.Username), GetDateColumn(lookups.TransactionDate), GetColumn <string>(lookups.NominalCode), GetColumn <double>(lookups.Amount), GetColumn <string>(lookups.Description), GetColumn <string>(lookups.Type), GetColumn <string>(lookups.NominalName))); }
protected bool Equals(FieldLookups other) { return(Description == other.Description && Username == other.Username && TransactionDate == other.TransactionDate && NominalCode == other.NominalCode && NominalName == other.NominalName && Amount == other.Amount && Id == other.Id && Type == other.Type); }
private IEnumerable <SearchAction> GetUnavailableSearchActions(FieldLookups lookups) { return(actionProvider.AllSearchActions .Where(action => !IsSearchable(action, lookups))); }
private bool IsSearchable(SearchAction searchAction, FieldLookups lookups) { return(AreSet(lookups, searchAction.RequiredFields.ToArray())); }
private bool AreSet(FieldLookups lookups, params IMappingField[] requiredFields) { var mappings = requiredFields.Select(field => field.GetValue(lookups)); return(mappings.All(IsSet)); }
private bool IsDisplayable(FieldLookups lookups, DisplayField displayField) { return(AreSet(lookups, displayField.RequiredField)); }
private DisplayField[] GetDisplayableFields(FieldLookups lookups) { return(displayFieldProvider.AllFields .Where(field => IsDisplayable(lookups, field)) .ToArray()); }
public ISearcherFactory CreateSearcherFactory(FieldLookups lookups) { return(new SearcherFactory(GetUnavailableSearchActions(lookups), GetDisplayableFields(lookups))); }