示例#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)));
 }