Ejemplo n.º 1
0
        public IGetsNewTicketModel GetNewTicketModelFactory()
        {
            IGetsNewTicketModel output = baseFactory();

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

            return(output);
        }
Ejemplo n.º 2
0
 public AvailableRelationshipsNewTicketModelFactoryDecorator(IGetsNewTicketModel wrapped,
                                                             IGetsAvailableRelationships relationshipProvider,
                                                             IMapper mapper)
 {
     if (wrapped == null)
     {
         throw new ArgumentNullException(nameof(wrapped));
     }
     if (mapper == null)
     {
         throw new ArgumentNullException(nameof(mapper));
     }
     if (relationshipProvider == null)
     {
         throw new ArgumentNullException(nameof(relationshipProvider));
     }
     this.wrapped = wrapped;
     this.relationshipProvider = relationshipProvider;
     this.mapper = mapper;
 }
Ejemplo n.º 3
0
 public AvailableTicketTypesNewTicketModelFactoryDecorator(IGetsNewTicketModel wrapped,
                                                           ITicketTypeProvider ticketTypesProvider,
                                                           IMapper mapper)
 {
     if (wrapped == null)
     {
         throw new ArgumentNullException(nameof(wrapped));
     }
     if (mapper == null)
     {
         throw new ArgumentNullException(nameof(mapper));
     }
     if (ticketTypesProvider == null)
     {
         throw new ArgumentNullException(nameof(ticketTypesProvider));
     }
     this.wrapped             = wrapped;
     this.ticketTypesProvider = ticketTypesProvider;
     this.mapper = mapper;
 }
        public AvailableSprintsNewTicketModelFactoryDecorator(IGetsNewTicketModel wrapped,
                                                              ISprintLister sprintLister,
                                                              IMapper mapper)
        {
            if (wrapped == null)
            {
                throw new ArgumentNullException(nameof(wrapped));
            }
            if (mapper == null)
            {
                throw new ArgumentNullException(nameof(mapper));
            }
            if (sprintLister == null)
            {
                throw new ArgumentNullException(nameof(sprintLister));
            }

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