Example #1
0
        public IGetsEditTicketModel GetEditTicketModelFactory()
        {
            IGetsEditTicketModel output = baseFactory();

            foreach (var decoratorFactory in decoratorFactories)
            {
                output = decoratorFactory(output);
            }

            return(output);
        }
Example #2
0
 public TempDataRestoringEditTicketModelFactoryDecorator(IGetsTempData tempData, IGetsEditTicketModel wrapped)
 {
     if (wrapped == null)
     {
         throw new ArgumentNullException(nameof(wrapped));
     }
     if (tempData == null)
     {
         throw new ArgumentNullException(nameof(tempData));
     }
     this.tempData = tempData;
     this.wrapped  = wrapped;
 }
Example #3
0
 public AvailableRelationshipsTicketModelFactoryDecorator(IGetsEditTicketModel wrapped,
                                                          IGetsAvailableRelationships relationshipProvider,
                                                          IMapper mapper)
 {
     if (mapper == null)
     {
         throw new ArgumentNullException(nameof(mapper));
     }
     if (relationshipProvider == null)
     {
         throw new ArgumentNullException(nameof(relationshipProvider));
     }
     if (wrapped == null)
     {
         throw new ArgumentNullException(nameof(wrapped));
     }
     this.wrapped = wrapped;
     this.relationshipProvider = relationshipProvider;
     this.mapper = mapper;
 }
 public AvailableTicketTypesTicketModelFactoryDecorator(IGetsEditTicketModel wrapped,
                                                        ITicketTypeProvider ticketTypesProvider,
                                                        IMapper mapper)
 {
     if (mapper == null)
     {
         throw new ArgumentNullException(nameof(mapper));
     }
     if (ticketTypesProvider == null)
     {
         throw new ArgumentNullException(nameof(ticketTypesProvider));
     }
     if (wrapped == null)
     {
         throw new ArgumentNullException(nameof(wrapped));
     }
     this.wrapped             = wrapped;
     this.ticketTypesProvider = ticketTypesProvider;
     this.mapper = mapper;
 }
Example #5
0
        public AvailableSprintsTicketModelFactoryDecorator(IGetsEditTicketModel wrapped,
                                                           ISprintLister sprintLister,
                                                           IMapper mapper)
        {
            if (mapper == null)
            {
                throw new ArgumentNullException(nameof(mapper));
            }
            if (sprintLister == null)
            {
                throw new ArgumentNullException(nameof(sprintLister));
            }
            if (wrapped == null)
            {
                throw new ArgumentNullException(nameof(wrapped));
            }

            this.wrapped      = wrapped;
            this.sprintLister = sprintLister;
            this.mapper       = mapper;
        }