Exemplo n.º 1
0
        public EntityController(
            IIlaroAdmin admin,
            Notificator notificator,
            IEntityService entityService,
            IFetchingRecords source,
            IFetchingRecordsHierarchy hierarchySource)
        {
            if (admin == null)
            {
                throw new ArgumentNullException(nameof(admin));
            }
            if (notificator == null)
            {
                throw new ArgumentNullException(nameof(notificator));
            }
            if (entityService == null)
            {
                throw new ArgumentNullException(nameof(entityService));
            }
            if (source == null)
            {
                throw new ArgumentNullException(nameof(source));
            }
            if (hierarchySource == null)
            {
                throw new ArgumentNullException(nameof(hierarchySource));
            }

            _admin           = admin;
            _notificator     = notificator;
            _entityService   = entityService;
            _source          = source;
            _hierarchySource = hierarchySource;
        }
Exemplo n.º 2
0
        public RecordsDeleter(
            IIlaroAdmin admin,
            IExecutingDbCommand executor,
            IFetchingRecordsHierarchy hierarchySource,
            IProvidingUser user)
        {
            if (admin == null)
            {
                throw new ArgumentNullException(nameof(admin));
            }
            if (executor == null)
            {
                throw new ArgumentNullException(nameof(executor));
            }
            if (hierarchySource == null)
            {
                throw new ArgumentNullException(nameof(hierarchySource));
            }
            if (user == null)
            {
                throw new ArgumentNullException(nameof(user));
            }

            _admin           = admin;
            _executor        = executor;
            _hierarchySource = hierarchySource;
            _user            = user;
        }
Exemplo n.º 3
0
        public EntityController(
            Notificator notificator,
            IEntityService entityService,
            IFetchingRecords source,
            IFetchingRecordsHierarchy hierarchySource)
        {
            if (notificator == null)
            {
                throw new ArgumentNullException("notificator");
            }
            if (entityService == null)
            {
                throw new ArgumentNullException("entityService");
            }
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }
            if (hierarchySource == null)
            {
                throw new ArgumentNullException("hierarchySource");
            }

            _notificator     = notificator;
            _entityService   = entityService;
            _source          = source;
            _hierarchySource = hierarchySource;
        }
Exemplo n.º 4
0
 public RecordsDeleter_()
 {
     _user = A.Fake<IProvidingUser>();
     A.CallTo(() => _user.CurrentUserName()).Returns("Test");
     var executor = new DbCommandExecutor(_admin, _user);
     _hierarchySource = new RecordsHierarchySource(_admin);
     _deleter = new RecordsDeleter(_admin, executor, _hierarchySource, _user);
     _source = new RecordsSource(_admin, new Notificator());
 }
Exemplo n.º 5
0
        public RecordsDeleter_()
        {
            _user = A.Fake <IProvidingUser>();
            A.CallTo(() => _user.CurrentUserName()).Returns("Test");
            var executor = new DbCommandExecutor(_admin, _user);

            _hierarchySource = new RecordsHierarchySource(_admin);
            _deleter         = new RecordsDeleter(_admin, executor, _hierarchySource, _user);
            _source          = new RecordsSource(_admin, new Notificator());
        }
Exemplo n.º 6
0
        public RecordsDeleter(
            IExecutingDbCommand executor,
            IFetchingRecordsHierarchy hierarchySource)
        {
            if (executor == null)
                throw new ArgumentNullException("executor");
            if (hierarchySource == null)
                throw new ArgumentNullException("hierarchySource");

            _executor = executor;
            _hierarchySource = hierarchySource;
        }
Exemplo n.º 7
0
        public RecordsDeleter(
            IExecutingDbCommand executor,
            IFetchingRecordsHierarchy hierarchySource)
        {
            if (executor == null)
            {
                throw new ArgumentNullException("executor");
            }
            if (hierarchySource == null)
            {
                throw new ArgumentNullException("hierarchySource");
            }

            _executor        = executor;
            _hierarchySource = hierarchySource;
        }
Exemplo n.º 8
0
        public EntityController(
            Notificator notificator,
            IEntityService entityService,
            IFetchingRecords source,
            IFetchingRecordsHierarchy hierarchySource)
        {
            if (notificator == null)
                throw new ArgumentNullException("notificator");
            if (entityService == null)
                throw new ArgumentNullException("entityService");
            if (source == null)
                throw new ArgumentNullException("source");
            if (hierarchySource == null)
                throw new ArgumentNullException("hierarchySource");

            _notificator = notificator;
            _entityService = entityService;
            _source = source;
            _hierarchySource = hierarchySource;
        }
Exemplo n.º 9
0
        public RecordsDeleter(
            IIlaroAdmin admin,
            IExecutingDbCommand executor,
            IFetchingRecordsHierarchy hierarchySource,
            IProvidingUser user)
        {
            if (admin == null)
                throw new ArgumentNullException(nameof(admin));
            if (executor == null)
                throw new ArgumentNullException(nameof(executor));
            if (hierarchySource == null)
                throw new ArgumentNullException(nameof(hierarchySource));
            if (user == null)
                throw new ArgumentNullException(nameof(user));

            _admin = admin;
            _executor = executor;
            _hierarchySource = hierarchySource;
            _user = user;
        }
Exemplo n.º 10
0
        public EntityController(
            IIlaroAdmin admin,
            Notificator notificator,
            IEntityService entityService,
            IFetchingRecords source,
            IFetchingRecordsHierarchy hierarchySource)
        {
            if (admin == null)
                throw new ArgumentNullException(nameof(admin));
            if (notificator == null)
                throw new ArgumentNullException(nameof(notificator));
            if (entityService == null)
                throw new ArgumentNullException(nameof(entityService));
            if (source == null)
                throw new ArgumentNullException(nameof(source));
            if (hierarchySource == null)
                throw new ArgumentNullException(nameof(hierarchySource));

            _admin = admin;
            _notificator = notificator;
            _entityService = entityService;
            _source = source;
            _hierarchySource = hierarchySource;
        }