public void IEventNotifier(IEventNotifier notifier) { BadEvent @event = new BadEvent(); /* EventTypeMissingEventAttribute(Tests.BadEvent) */ notifier.Publish(@event) /**/; BadEvent[] events = new[] { @event }; /* EventTypeMissingEventAttribute(Tests.BadEvent) */ notifier.PublishMany(events) /**/; } public void IEventNotifier(IEventPublisher publisher) { BadEvent @event = new BadEvent(); /* EventTypeMissingEventAttribute(Tests.BadEvent) */ publisher.Publish(6606, @event) /**/; /* EventTypeMissingEventAttribute(Tests.BadEvent) */ publisher.Publish(6606, @event, DateTime.Now) /**/; BadEvent[] events = new[] { @event }; /* EventTypeMissingEventAttribute(Tests.BadEvent) */ publisher.PublishMany(6606, events) /**/; /* EventTypeMissingEventAttribute(Tests.BadEvent) */ publisher.PublishMany(6606, events, DateTime.Now) /**/; /* EventTypeMissingEventAttribute(Tests.BadEvent) */ publisher.ObsoleteAndUnboundedPublishMany(6606, events) /**/; /* EventTypeMissingEventAttribute(Tests.BadEvent) */ publisher.ObsoleteAndUnboundedPublishMany(6606, events, DateTime.Now) /**/; } public void RefiredEventEnvelopeTests() { BadEvent @event = new BadEvent(); /* EventTypeMissingEventAttribute(Tests.BadEvent) */ RefiredEventEnvelope.Create(6606, @event) /**/; }
public async Task <ActionResult <BadEventDTO> > PostBadEvent(BadEventDTO dto) { //Exchange CreatedByID for current user //create new event object var badEvent = new BadEvent() { Created = DateTime.Now, CreatedById = 1, Date = dto.Date, IsDeleted = false, Message = dto.Message, Placement = dto.Placement, Reason = dto.Reason, SeverityId = dto.SeverityId, StatusId = 1 }; //save the event to the db _context.Events.Add(badEvent); await _context.SaveChangesAsync(); //return the new object with the new id return(CreatedAtAction("GetBadEvent", new { id = badEvent.Id }, BadEventDTO.Selector().Compile()(badEvent))); }
public void IEventNotifier(IEventNotifier notifier) { BadEvent @event = new BadEvent(); /* EventTypeMissingEventAttribute(Tests.BadEvent) */ notifier.Publish(@event) /**/; BadEvent[] events = new[] { @event }; /* EventTypeMissingEventAttribute(Tests.BadEvent) */ notifier.PublishMany(events) /**/; } public void IEventNotifier(IEventPublisher publisher) { BadEvent @event = new BadEvent(); /* EventTypeMissingEventAttribute(Tests.BadEvent) */ publisher.Publish(6606, @event) /**/; /* EventTypeMissingEventAttribute(Tests.BadEvent) */ publisher.Publish(6606, @event, DateTime.Now) /**/; BadEvent[] events = new[] { @event }; /* EventTypeMissingEventAttribute(Tests.BadEvent) */ publisher.PublishMany(6606, events) /**/; /* EventTypeMissingEventAttribute(Tests.BadEvent) */ publisher.PublishMany(6606, events, DateTime.Now) /**/; }