Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
            }
        }