public DataSearcher(IDataService <TEntity> dataService, DataSearcherAttribute[] attributes) { this.DataService = dataService ?? throw new ArgumentNullException(nameof(dataService)); if (attributes != null && attributes.Length > 0) { this.Conditioner = DataSearcherResolver.Create(attributes); } }
public DataSearcher(IDataService <TModel> dataService, DataSearcherAttribute[] attributes) { this.DataService = dataService ?? throw new ArgumentNullException(nameof(dataService)); if (attributes != null && attributes.Length > 0) { this.Conditioner = DataSearcherResolver.Create(typeof(TModel).GetTypeInfo(), attributes); } }
public DataSearcher(IDataService <TModel> dataService) { this.DataService = dataService ?? throw new ArgumentNullException(nameof(dataService)); var attributes = dataService.GetType().GetCustomAttributes <DataSearcherAttribute>(true).ToArray(); if (attributes != null && attributes.Length > 0) { this.Conditioner = DataSearcherResolver.Create(typeof(TModel).GetTypeInfo(), attributes); } }