Example #1
0
 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)));
 }
Example #2
0
 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);
 }
Example #3
0
 private IEnumerable <SearchAction> GetUnavailableSearchActions(FieldLookups lookups)
 {
     return(actionProvider.AllSearchActions
            .Where(action => !IsSearchable(action, lookups)));
 }
Example #4
0
 private bool IsSearchable(SearchAction searchAction, FieldLookups lookups)
 {
     return(AreSet(lookups, searchAction.RequiredFields.ToArray()));
 }
Example #5
0
        private bool AreSet(FieldLookups lookups, params IMappingField[] requiredFields)
        {
            var mappings = requiredFields.Select(field => field.GetValue(lookups));

            return(mappings.All(IsSet));
        }
Example #6
0
 private bool IsDisplayable(FieldLookups lookups, DisplayField displayField)
 {
     return(AreSet(lookups, displayField.RequiredField));
 }
Example #7
0
 private DisplayField[] GetDisplayableFields(FieldLookups lookups)
 {
     return(displayFieldProvider.AllFields
            .Where(field => IsDisplayable(lookups, field))
            .ToArray());
 }
Example #8
0
 public ISearcherFactory CreateSearcherFactory(FieldLookups lookups)
 {
     return(new SearcherFactory(GetUnavailableSearchActions(lookups), GetDisplayableFields(lookups)));
 }