public EventManager(IEventRegistrationPolicy registrationPolicy, IRepository <EventRegistration> eventRegistrationRepository, IRepository <Event, Guid> eventRepository) { this.registrationPolicy = registrationPolicy; this.eventRegistrationRepository = eventRegistrationRepository; this.eventRepository = eventRepository; EventBus = NullEventBus.Instance; }
public EventManager(IEventRegistrationPolicy registrationPolicy, IRepository <EventRegistration> eventRegRepo, IRepository <Event, Guid> eventRepo) { _registrationPolicy = registrationPolicy; _eventRegRepo = eventRegRepo; _eventRepo = eventRepo; _eventBus = NullEventBus.Instance; }
public EventManager( IEventRegistrationPolicy registrationPolicy, IRepository <EventRegistration, int> eventRegistrationRepository, IRepository <Event, Guid> eventRepository) { _registrationPolicy = registrationPolicy; _eventRegistrationRepository = eventRegistrationRepository; _eventRepository = eventRepository; EventBus = NullEventBus.Instance; //init default Service Bus }
public EventManager( IEventRegistrationPolicy registrationPolicy, IRepository<EventRegistration> eventRegistrationRepository, IRepository<Event, Guid> eventRepository) { _registrationPolicy = registrationPolicy; _eventRegistrationRepository = eventRegistrationRepository; _eventRepository = eventRepository; EventBus = NullEventBus.Instance; }
public async static Task<EventRegistration> CreateAsync(Event @event, User user, IEventRegistrationPolicy registrationPolicy) { if (@event == null) { throw new ArgumentNullException("event"); } if (user == null) { throw new ArgumentNullException("user"); } await registrationPolicy.CheckRegistrationAttemptAsync(@event, user); return new EventRegistration { TenantId = @event.TenantId, EventId = @event.Id, Event = @event, UserId = @user.Id, User = user }; }
public static async Task <EventRegistration> CreateAsync(CreekEvent @event, User user, IEventRegistrationPolicy registrationPolicy) { await registrationPolicy.CheckRegistrationAttemptAsync(@event, user); return(new EventRegistration { TenantId = @event.TenantId, EventId = @event.Id, Event = @event, UserId = @user.Id, User = user }); }
public async static Task <EventRegistration> CreateAsync(Event @event, User user, IEventRegistrationPolicy registrationPolicy) { if (@event == null) { throw new ArgumentNullException("event"); } if (user == null) { throw new ArgumentNullException("user"); } if (registrationPolicy == null) { throw new ArgumentNullException("registrationPolicy"); } await registrationPolicy.CheckRegistrationAttemptAsync(@event, user); return(new EventRegistration { TenantId = @event.TenantId, EventId = @event.Id, Event = @event, UserId = @user.Id, User = user }); }
public static async Task <EventRegistration> CreateAsync(Event @event, User user, IEventRegistrationPolicy registrationPolicy) { if (!await registrationPolicy.CheckRegistrationAttemptAsync(@event, user)) { return(null); } return(new EventRegistration() { TenantId = @event.TenantId, EventId = @event.Id, Event = @event, UserId = user.Id, User = user }); }