Пример #1
0
        public Subscription(StudentAddedNotificationService service)
        {
            Name = "Subscription";

            AddField(new EventStreamFieldType
            {
                Name       = "studentAdded",
                Type       = typeof(StudenAddedMessageType),
                Resolver   = new FuncFieldResolver <StudenAddedMessage>(c => c.Source as StudenAddedMessage),
                Subscriber = new EventStreamResolver <StudenAddedMessage>(c => service.GetMessages())
            });
        }
Пример #2
0
 public StudentRepository(CourseContext context, StudentAddedNotificationService notificationService)
 {
     _context             = context;
     _notificationService = notificationService;
 }