Exemple #1
0
        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);
            }
        }
Exemple #2
0
        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);
            }
        }
Exemple #3
0
        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);
            }
        }