Ejemplo n.º 1
0
        public EventDescription(DateTime eventDate, string description, ISystemDate systemDate)
        {
            if (eventDate < systemDate.Today)
            {
                throw new Exception("concert date must be future date");
            }

            EventDate   = eventDate;
            Description = description;
            _systemDate = systemDate;
        }
Ejemplo n.º 2
0
        public Container(CampaignTypeEnum type, IBridgeServicesProvider bridge,
                         CampaignWorkerFactory campaignWorkerFactory,
                         ISystemDate systemDate,
                         ILogger <Container> logger) : base(type)
        {
            _campaignWorkerFactory = campaignWorkerFactory;
            _logger     = logger;
            _bridge     = bridge;
            _systemDate = systemDate;

            _campaignsWorkers = new CampaignWorkerList <ICampaignWorker>(_campaignWorkerFactory);
        }
 /// <summary> Супер сервис с логированием </summary>
 public CoolServiceWithLog(ICoolService coolService, ILogger logger, ISystemDate systemDate)
 {
     _coolService = coolService;
     _logger      = logger;
     _systemDate  = systemDate;
 }
Ejemplo n.º 4
0
 private Concert CreateInternal(string titleGeo, string titleEng, string description, DateTime concertDate, ConcertId id = null, ISystemDate systemDate = null)
 {
     return(new Concert(
                id ?? new ConcertId(Guid.NewGuid().ToString()),
                new EventTitleSummary(new GeoTitle(titleGeo)).WithAnotherTitle(new EngTitle(titleEng)),
                new EventDescription(concertDate, description, systemDate ?? SystemDate.Now())
                ));
 }
Ejemplo n.º 5
0
 public Concert Create(ConcertId id, string titleGeo, string titleEng, string description, DateTime concertDate, ISystemDate systemDate = null)
 {
     return(CreateInternal(titleGeo, titleEng, description, concertDate, id, systemDate));
 }
 /// <summary> Супер сервис </summary>
 public CoolService(ILogger logger, ISystemDate systemDate)
 {
     _logger     = logger;
     _systemDate = systemDate;
 }