Exemplo n.º 1
0
 public AuthorManager(IGuidRepository <Author> authorRepo, IHmmValidator <Author> validator)
 {
     Guard.Against <ArgumentNullException>(authorRepo == null, nameof(authorRepo));
     Guard.Against <ArgumentNullException>(validator == null, nameof(validator));
     _authorRepo = authorRepo;
     _validator  = validator;
 }
Exemplo n.º 2
0
        public NoteRenderManager(IRepository <NoteRender> dataSource, IHmmValidator <NoteRender> validator)
        {
            Guard.Against <ArgumentNullException>(dataSource == null, nameof(dataSource));
            Guard.Against <ArgumentNullException>(validator == null, nameof(validator));

            _dataSource = dataSource;
            _validator  = validator;
        }
Exemplo n.º 3
0
 public HmmNoteManager(IVersionRepository <HmmNote> noteRepo, IHmmValidator <HmmNote> validator, IDateTimeProvider dateProvider)
 {
     Guard.Against <ArgumentNullException>(noteRepo == null, nameof(noteRepo));
     Guard.Against <ArgumentNullException>(validator == null, nameof(validator));
     Guard.Against <ArgumentNullException>(dateProvider == null, nameof(dateProvider));
     _noteRepo     = noteRepo;
     _validator    = validator;
     _dateProvider = dateProvider;
 }
Exemplo n.º 4
0
 public GasLogManager(INoteSerializer <GasLog> noteSerializer, IHmmValidator <GasLog> validator, IHmmNoteManager noteManager, IAutoEntityManager <AutomobileInfo> autoManager, IEntityLookup lookupRepo, IDateTimeProvider dateProvider)
     : base(validator, noteManager, lookupRepo)
 {
     Guard.Against <ArgumentNullException>(autoManager == null, nameof(autoManager));
     Guard.Against <ArgumentNullException>(noteSerializer == null, nameof(noteSerializer));
     Guard.Against <ArgumentNullException>(dateProvider == null, nameof(dateProvider));
     _autoManager   = autoManager;
     NoteSerializer = noteSerializer;
     _dateProvider  = dateProvider;
 }
Exemplo n.º 5
0
        public SubsystemManager(
            IRepository <Subsystem> dataSource,
            IHmmValidator <Subsystem> validator)
        {
            Guard.Against <ArgumentNullException>(dataSource == null, nameof(dataSource));
            Guard.Against <ArgumentNullException>(validator == null, nameof(validator));

            _dataSource = dataSource;
            _validator  = validator;
        }
Exemplo n.º 6
0
        public NoteCatalogManager(IRepository <NoteCatalog> dataSource, IHmmValidator <NoteCatalog> validator, IEntityLookup lookupRepo)
        {
            Guard.Against <ArgumentNullException>(dataSource == null, nameof(dataSource));
            Guard.Against <ArgumentNullException>(validator == null, nameof(validator));
            Guard.Against <ArgumentNullException>(lookupRepo == null, nameof(lookupRepo));

            _dataSource = dataSource;
            _validator  = validator;
            _lookupRepo = lookupRepo;
        }
Exemplo n.º 7
0
        protected EntityManagerBase(IHmmValidator <T> validator, IHmmNoteManager noteManager, IEntityLookup lookupRepo)
        {
            Guard.Against <ArgumentNullException>(validator == null, nameof(validator));
            Guard.Against <ArgumentNullException>(noteManager == null, nameof(noteManager));
            Guard.Against <ArgumentNullException>(lookupRepo == null, nameof(lookupRepo));

            Validator     = validator;
            NoteManager   = noteManager;
            LookupRepo    = lookupRepo;
            DefaultAuthor = ApplicationRegister.DefaultAuthor;
        }
Exemplo n.º 8
0
 public AutomobileManager(INoteSerializer <AutomobileInfo> noteSerializer, IHmmValidator <AutomobileInfo> validator, IHmmNoteManager noteManager, IEntityLookup lookupRepo)
     : base(validator, noteManager, lookupRepo)
 {
     Guard.Against <ArgumentNullException>(noteSerializer == null, nameof(noteSerializer));
     NoteSerializer = noteSerializer;
 }
Exemplo n.º 9
0
 private void SetupTestEnv()
 {
     InsertSeedRecords();
     _validator = new AutomobileValidator(LookupRepo);
     _authorId  = ApplicationRegister.DefaultAuthor.Id;
 }
Exemplo n.º 10
0
 public DiscountManager(INoteSerializer <GasDiscount> noteSerializer, IHmmValidator <GasDiscount> validator, IHmmNoteManager noteManager, IEntityLookup lookupRepo)
     : base(validator, noteManager, lookupRepo)
 {
     Guard.Against <ArgumentNullException>(noteSerializer == null, nameof(noteSerializer));
     NoteSerializer = noteSerializer;
 }
Exemplo n.º 11
0
 public DefaultAppointmentManager(IGuidRepository <Appointment> appointRepo, IHmmValidator <Appointment> validator)
 {
     _appointRepo = appointRepo ?? throw new ArgumentNullException(nameof(appointRepo));
     _validator   = validator ?? throw new ArgumentNullException(nameof(validator));
 }