private static TeleportDescription GetTeleportDescription(IRequest request, Teleport teleport) { var descriptionId = request.Data.GetOrDefault <int>(k.ID); var description = teleport.GetTeleportDescriptions().FirstOrDefault(d => d.id == descriptionId).ThrowIfNull(ErrorCodes.TeleportDescriptionNotFound); description.active.ThrowIfFalse(ErrorCodes.TeleportChannelInactive); description.IsValid().ThrowIfFalse(ErrorCodes.InvalidTeleportChannel); return(description); }