public EntityObjectDataLoaderWrapper(
            IEntityDataLoader<object> entityDataLoader,
            IReadOnlyCollection<ColumnDescription> columnsDescription)
        {
            if (entityDataLoader == null)
                throw new ArgumentNullException("entityDataLoader");

            if (columnsDescription == null)
                throw new ArgumentNullException("columnsDescription");

            if (!columnsDescription.Any())
                throw new ArgumentException("Parameter columnsDescription cannot be empty", "columnsDescription");

            _entityDataLoader = entityDataLoader;
            _columnsDescription = columnsDescription;
        }
        public EntityObjectDataLoaderWrapper(
            IEntityDataLoader <object> entityDataLoader,
            IReadOnlyCollection <ColumnDescription> columnsDescription)
        {
            if (entityDataLoader == null)
            {
                throw new ArgumentNullException("entityDataLoader");
            }

            if (columnsDescription == null)
            {
                throw new ArgumentNullException("columnsDescription");
            }

            if (!columnsDescription.Any())
            {
                throw new ArgumentException("Parameter columnsDescription cannot be empty", "columnsDescription");
            }

            _entityDataLoader   = entityDataLoader;
            _columnsDescription = columnsDescription;
        }
 private void AddBinding <TEntity>(string tableName, IEntityDataLoader <TEntity> loader)
     where TEntity : class
 {
     _bindings.Add(tableName, loader);
 }
 public EntityObjectDataLoaderBindingsBuilder Add <TEntity>(IEntityDataLoader <TEntity> loader)
     where TEntity : class
 {
     AddBinding(typeof(TEntity).Name, loader);
     return(this);
 }
 public EntityObjectDataLoaderBindingsBuilder Add <TEntity>(string tableName, IEntityDataLoader <TEntity> loader)
     where TEntity : class
 {
     AddBinding(tableName, loader);
     return(this);
 }
 public EntityObjectDataLoaderWrapper(IEntityDataLoader<object> loader, IReadOnlyCollection<ColumnDescription> columns)
 {
     _loader = loader;
     _columns = columns;
 }
Ejemplo n.º 7
0
 public EntityObjectDataLoaderWrapper(IEntityDataLoader <object> loader, IReadOnlyCollection <ColumnDescription> columns)
 {
     _loader  = loader;
     _columns = columns;
 }