Beispiel #1
0
        public TicketController(IGetsTicketDetailDtoByReference ticketDetailProvider,
                                Lazy <IHandlesEditTicketRequest> editor,
                                Lazy <IGetsEditTicketModel> editTicketModelFactory,
                                IMapper mapper,
                                ILog logger,
                                IGetsTicketByReference ticketProvider)
        {
            if (ticketProvider == null)
            {
                throw new ArgumentNullException(nameof(ticketProvider));
            }
            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }
            if (editTicketModelFactory == null)
            {
                throw new ArgumentNullException(nameof(editTicketModelFactory));
            }
            if (mapper == null)
            {
                throw new ArgumentNullException(nameof(mapper));
            }
            if (editor == null)
            {
                throw new ArgumentNullException(nameof(editor));
            }
            if (ticketDetailProvider == null)
            {
                throw new ArgumentNullException(nameof(ticketDetailProvider));
            }

            this.mapper                 = mapper;
            this.logger                 = logger;
            this.ticketProvider         = ticketProvider;
            this.ticketDetailProvider   = ticketDetailProvider;
            this.editor                 = editor;
            this.editTicketModelFactory = editTicketModelFactory;
        }
 public UserCanEditTicketDetailDecorator(IGetsTicketDetailDtoByReference wrapped,
                                         IDeterminesIfCurrentUserHasCapability capabilityProvider)
 {
     this.wrapped            = wrapped ?? throw new ArgumentNullException(nameof(wrapped));
     this.capabilityProvider = capabilityProvider ?? throw new ArgumentNullException(nameof(capabilityProvider));
 }