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

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