#region ========================================================================= USING ===================================================================================== using Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary.BookLibrary.Reading; using Lumina.Contracts.Responses.MediaLibrary.WrittenContentLibrary.BookLibrary.Books.Reading; using System.Linq; #endregion namespace Lumina.Application.Common.Mapping.MediaLibrary.WrittenContentLibrary.BookLibrary.Books; /// /// Extension methods for converting . /// public static class ReadingTocEntryDtoMapping { /// /// Converts to . /// /// The table of contents entry to be converted. /// The converted table of contents entry response. public static ReadingTocEntryResponse ToResponse(this ReadingTocEntryDto entry) { return new ReadingTocEntryResponse( entry.Label, entry.LocationRef, [.. entry.Children.Select(child => child.ToResponse())] ); } }