/// <summary>
        ///     Initializes a new instance of the <see cref="GuestSessionController" /> class.
        /// </summary>
        /// <param name="repositoryFactory">The repository factory.</param>
        /// <param name="validatorLocator">The validator locator.</param>
        /// <param name="eventService">The event service.</param>
        /// <param name="loggerFactory">The logger.</param>
        /// <param name="emailSendingService"></param>
        /// <param name="serviceToServiceProjectApi"></param>
        /// <param name="userApi"></param>
        /// <param name="projectLobbyStateController"></param>
        /// <param name="serviceToServiceAccountSettingsApi">The API for Account/Tenant specific settings</param>
        /// <param name="synthesisObjectSerializer">The Synthesis object serializer</param>
        /// <param name="projectGuestContextService"></param>
        /// <param name="requestHeaders"></param>
        /// <param name="maxGuestsAllowedInProject"></param>
        public GuestSessionController(
            IRepositoryFactory repositoryFactory,
            IValidatorLocator validatorLocator,
            IEventService eventService,
            ILoggerFactory loggerFactory,
            IEmailSendingService emailSendingService,
            IProjectApi serviceToServiceProjectApi,
            IUserApi userApi,
            IProjectLobbyStateController projectLobbyStateController,
            ISettingApi serviceToServiceAccountSettingsApi,
            IObjectSerializer synthesisObjectSerializer,
            IProjectGuestContextService projectGuestContextService,
            IRequestHeaders requestHeaders,
            int maxGuestsAllowedInProject)
        {
            _guestSessionRepository = repositoryFactory.CreateRepository <GuestSession>();
            _guestInviteRepository  = repositoryFactory.CreateRepository <GuestInvite>();

            _validatorLocator            = validatorLocator;
            _eventService                = eventService;
            _logger                      = loggerFactory.GetLogger(this);
            _projectLobbyStateController = projectLobbyStateController;
            _emailSendingService         = emailSendingService;

            _serviceToServiceProjectApi = serviceToServiceProjectApi;
            _userApi = userApi;
            _serviceToServiceAccountSettingsApi = serviceToServiceAccountSettingsApi;
            _synthesisObjectSerializer          = synthesisObjectSerializer;
            _projectGuestContextService         = projectGuestContextService;
            _requestHeaders            = requestHeaders;
            _maxGuestsAllowedInProject = maxGuestsAllowedInProject;
        }
        /// <summary>
        ///     Initializes a new instance of the <see cref="GuestSessionController" /> class.
        /// </summary>
        public ProjectGuestContextController(
            IRepositoryFactory repositoryFactory,
            IGuestSessionController guestSessionController,
            IProjectLobbyStateController projectLobbyStateController,
            IProjectGuestContextService projectGuestContextService,
            IProjectAccessApi serviceToServiceProjectAccessApi,
            IProjectApi serviceToServiceProjectApi,
            IUserApi userApi)
        {
            _guestSessionRepository = repositoryFactory.CreateRepository <GuestSession>();

            _guestSessionController      = guestSessionController;
            _projectLobbyStateController = projectLobbyStateController;

            _serviceToServiceProjectApi       = serviceToServiceProjectApi;
            _serviceToServiceProjectAccessApi = serviceToServiceProjectAccessApi;
            _userApi = userApi;
            _projectGuestContextService = projectGuestContextService;
        }
 /// <inheritdoc />
 public GuestContextMiddleware(RequestDelegate next, IProjectGuestContextService projectGuestContextService)
 {
     _projectGuestContextService = projectGuestContextService;
     _next = next;
 }