Exemplo n.º 1
0
        /// <summary>
        /// Start a new gaming service in a specified venue area, if one does not already exist.
        /// If the area already has an active service, this should fail.
        ///
        /// Assumes that the database object will throw the error that an active service exists.
        /// </summary>
        /// <param name="managerId">Manager ID</param>
        /// <param name="venueId">Target venue ID</param>
        /// <param name="areaId">Target area ID</param>
        /// <returns>The created gaming service document</returns>
        public async Task <GamingServiceDocument> StartGamingService(string managerId, string venueId, string areaId)
        {
            // Ensure the manager has access to the given service.
            await _EnsureManagerCanAccessVenue(managerId, venueId);

            // Start a new gaming service and return it.
            return(await _database.StartGamingService(venueId, areaId));
        }