{"path":"NexusReader.Application/Queries/Reader/ViewModels.cs","purpose":"Defines polymorphic content-block models and a reader page view model used by the application query layer to transport reader UI data (blocks, chapter indexes, ebook id).","classification":{"role":"dto","layer":"application","confidence":0.9,"evidence":["DTO/view-model naming pattern","namespace NexusReader.Application.Queries.Reader","file contains record types and a ReaderPageViewModel used for queries","uses JsonDerivedType attributes for JSON polymorphism"]},"className":"","methods":[],"types":[{"name":"ContentBlock","kind":"model","line":7,"purpose":"Abstract base record for polymorphic content blocks carrying an Id.","fields":[{"name":"Id","type":"string","required":true,"line":7,"description":"Identifier for the content block"}]},{"name":"TextSegmentBlock","kind":"model","line":8,"purpose":"Represents a text segment block containing textual content.","fields":[{"name":"Id","type":"string","required":true,"line":8,"description":"Inherited block identifier"},{"name":"Content","type":"string","required":true,"line":8,"description":"Text content of the segment"}]},{"name":"AiActionTriggerBlock","kind":"model","line":9,"purpose":"Represents an actionable AI-trigger block with dialogue and selectable action options.","fields":[{"name":"Id","type":"string","required":true,"line":9,"description":"Inherited block identifier"},{"name":"Dialogue","type":"string","required":true,"line":9,"description":"Prompt or dialogue shown to the user"},{"name":"ActionOptions","type":"List","required":true,"line":9,"description":"List of action option labels or keys"}]},{"name":"ReaderPageViewModel","kind":"view-model","line":11,"purpose":"Aggregates content blocks and chapter/ebook metadata for rendering a reader page.","fields":[{"name":"Blocks","type":"List","required":true,"line":11,"description":"Polymorphic list of content blocks to render"},{"name":"CurrentChapterIndex","type":"int","required":true,"line":11,"description":"Zero-based index of the current chapter"},{"name":"TotalChapters","type":"int","required":true,"line":11,"description":"Total number of chapters in the ebook"},{"name":"ChapterTitle","type":"string","required":true,"line":11,"description":"Title of the current chapter"},{"name":"EbookId","type":"Guid","required":false,"line":11,"description":"Optional ebook identifier (has default Guid value)"}]}],"serviceRegistrations":[],"startupActions":[],"dependencies":[],"patterns":["ViewModel","Polymorphic DTO","JSON-discriminated union (JsonDerivedType)"],"domainConcepts":["ContentBlock","TextSegment","AiActionTrigger","ReaderPage","Ebook","Chapter"],"keyDetails":"Defines JSON polymorphism via JsonDerivedType attributes mapping discriminator values \"text\" and \"trigger\" to concrete record types; used in the Application.Queries.Reader boundary for transporting reader UI data.","orchestrationMethods":[],"typedContracts":[{"name":"ContentBlock","kind":"model","line":7,"fieldCount":1,"evidencePaths":["NexusReader.Application/Queries/Reader/ViewModels.cs"]},{"name":"TextSegmentBlock","kind":"model","line":8,"fieldCount":2,"evidencePaths":["NexusReader.Application/Queries/Reader/ViewModels.cs"]},{"name":"AiActionTriggerBlock","kind":"model","line":9,"fieldCount":3,"evidencePaths":["NexusReader.Application/Queries/Reader/ViewModels.cs"]},{"name":"ReaderPageViewModel","kind":"view-model","line":11,"fieldCount":5,"evidencePaths":["NexusReader.Application/Queries/Reader/ViewModels.cs"]}],"persistenceInteractions":[],"externalInteractions":[],"evidenceAnchors":[{"kind":"typed-contract","label":"ContentBlock","line":7,"summary":"model with 1 fields.","confidence":0.8,"evidencePaths":["NexusReader.Application/Queries/Reader/ViewModels.cs"]},{"kind":"typed-contract","label":"TextSegmentBlock","line":8,"summary":"model with 2 fields.","confidence":0.8,"evidencePaths":["NexusReader.Application/Queries/Reader/ViewModels.cs"]},{"kind":"typed-contract","label":"AiActionTriggerBlock","line":9,"summary":"model with 3 fields.","confidence":0.8,"evidencePaths":["NexusReader.Application/Queries/Reader/ViewModels.cs"]},{"kind":"typed-contract","label":"ReaderPageViewModel","line":11,"summary":"view-model with 5 fields.","confidence":0.8,"evidencePaths":["NexusReader.Application/Queries/Reader/ViewModels.cs"]}],"cacheMetadata":{"schemaVersion":2,"analysisVersion":"2026-05-23.cache-v1","contentChecksum":"8c4b78c0ade14be88965dd39245eeb3032b6bda405cfb8bd60cd2cf8eac9c4b7","sourceByteSize":601,"analyzedAt":"2026-05-23T16:20:04.008Z","technology":"dotnet"}}