From 4fb0403e905dc8bfd3529b888da77b8161b98ac4 Mon Sep 17 00:00:00 2001 From: maliming Date: Sat, 11 Jul 2026 12:15:13 +0800 Subject: [PATCH] Move Docs TableOfContents helper to Web layer to fix tiered DI ITocGeneratorService is a presentation helper for rendering, not a remote application service, so it must be registered on the web tier. --- .../Volo.Docs.Application.abppkg.analyze.json | 128 ------------------ .../TableOfContents/ITocGeneratorService.cs | 3 +- .../TableOfContents/TocGeneratorService.cs | 0 .../TableOfContents/TocHeading.cs | 0 4 files changed, 1 insertion(+), 130 deletions(-) rename modules/docs/src/{Volo.Docs.Application.Contracts/Volo/Docs => Volo.Docs.Web}/TableOfContents/ITocGeneratorService.cs (78%) rename modules/docs/src/{Volo.Docs.Application/Volo/Docs => Volo.Docs.Web}/TableOfContents/TocGeneratorService.cs (100%) rename modules/docs/src/{Volo.Docs.Application.Contracts/Volo/Docs => Volo.Docs.Web}/TableOfContents/TocHeading.cs (100%) diff --git a/modules/docs/src/Volo.Docs.Application/Volo.Docs.Application.abppkg.analyze.json b/modules/docs/src/Volo.Docs.Application/Volo.Docs.Application.abppkg.analyze.json index 328a610eeb..3eb0baf95f 100644 --- a/modules/docs/src/Volo.Docs.Application/Volo.Docs.Application.abppkg.analyze.json +++ b/modules/docs/src/Volo.Docs.Application/Volo.Docs.Application.abppkg.analyze.json @@ -84,134 +84,6 @@ "name": "DocsApplicationModule", "summary": null }, - { - "namespace": "Volo.Docs.TableOfContents", - "baseClass": { - "name": "Object", - "namespace": "System", - "declaringAssemblyName": "System.Private.CoreLib", - "fullName": "System.Object" - }, - "implementingInterfaces": [ - { - "name": "ITocGeneratorService", - "namespace": "Volo.Docs.TableOfContents", - "declaringAssemblyName": "Volo.Docs.Application.Contracts", - "fullName": "Volo.Docs.TableOfContents.ITocGeneratorService" - }, - { - "name": "IApplicationService", - "namespace": "Volo.Abp.Application.Services", - "declaringAssemblyName": "Volo.Abp.Ddd.Application.Contracts", - "fullName": "Volo.Abp.Application.Services.IApplicationService" - }, - { - "name": "IRemoteService", - "namespace": "Volo.Abp", - "declaringAssemblyName": "Volo.Abp.Core", - "fullName": "Volo.Abp.IRemoteService" - }, - { - "name": "ITransientDependency", - "namespace": "Volo.Abp.DependencyInjection", - "declaringAssemblyName": "Volo.Abp.Core", - "fullName": "Volo.Abp.DependencyInjection.ITransientDependency" - } - ], - "methods": [ - { - "returnType": "List", - "namespace": "Volo.Docs.TableOfContents", - "name": "GenerateTocHeadings", - "summary": null, - "isAsync": false, - "isPublic": true, - "isPrivate": false, - "isStatic": false, - "parameters": [ - { - "type": "String", - "name": "markdownContent", - "isOptional": false - } - ] - }, - { - "returnType": "List", - "namespace": "Volo.Docs.TableOfContents", - "name": "GenerateTocItems", - "summary": null, - "isAsync": false, - "isPublic": true, - "isPrivate": false, - "isStatic": false, - "parameters": [ - { - "type": "List", - "name": "tocHeadings", - "isOptional": false - }, - { - "type": "Int32", - "name": "topLevel", - "isOptional": false - }, - { - "type": "Int32", - "name": "levelCount", - "isOptional": false - } - ] - }, - { - "returnType": "Int32", - "namespace": "Volo.Docs.TableOfContents", - "name": "GetTopLevel", - "summary": null, - "isAsync": false, - "isPublic": true, - "isPrivate": false, - "isStatic": false, - "parameters": [ - { - "type": "List", - "name": "headings", - "isOptional": false - } - ] - }, - { - "returnType": "List", - "namespace": "Volo.Docs.TableOfContents", - "name": "GenerateTocItems", - "summary": null, - "isAsync": false, - "isPublic": true, - "isPrivate": false, - "isStatic": false, - "parameters": [ - { - "type": "String", - "name": "markdownContent", - "isOptional": false - }, - { - "type": "Int32", - "name": "levelCount", - "isOptional": false - }, - { - "type": "Nullable", - "name": "topLevel", - "isOptional": true - } - ] - } - ], - "contentType": "applicationService", - "name": "TocGeneratorService", - "summary": null - }, { "namespace": "Volo.Docs.Documents", "baseClass": { diff --git a/modules/docs/src/Volo.Docs.Application.Contracts/Volo/Docs/TableOfContents/ITocGeneratorService.cs b/modules/docs/src/Volo.Docs.Web/TableOfContents/ITocGeneratorService.cs similarity index 78% rename from modules/docs/src/Volo.Docs.Application.Contracts/Volo/Docs/TableOfContents/ITocGeneratorService.cs rename to modules/docs/src/Volo.Docs.Web/TableOfContents/ITocGeneratorService.cs index 7a57597efe..5d1ebe00f0 100644 --- a/modules/docs/src/Volo.Docs.Application.Contracts/Volo/Docs/TableOfContents/ITocGeneratorService.cs +++ b/modules/docs/src/Volo.Docs.Web/TableOfContents/ITocGeneratorService.cs @@ -1,9 +1,8 @@ using System.Collections.Generic; -using Volo.Abp.Application.Services; namespace Volo.Docs.TableOfContents; -public interface ITocGeneratorService : IApplicationService +public interface ITocGeneratorService { List GenerateTocHeadings(string markdownContent); diff --git a/modules/docs/src/Volo.Docs.Application/Volo/Docs/TableOfContents/TocGeneratorService.cs b/modules/docs/src/Volo.Docs.Web/TableOfContents/TocGeneratorService.cs similarity index 100% rename from modules/docs/src/Volo.Docs.Application/Volo/Docs/TableOfContents/TocGeneratorService.cs rename to modules/docs/src/Volo.Docs.Web/TableOfContents/TocGeneratorService.cs diff --git a/modules/docs/src/Volo.Docs.Application.Contracts/Volo/Docs/TableOfContents/TocHeading.cs b/modules/docs/src/Volo.Docs.Web/TableOfContents/TocHeading.cs similarity index 100% rename from modules/docs/src/Volo.Docs.Application.Contracts/Volo/Docs/TableOfContents/TocHeading.cs rename to modules/docs/src/Volo.Docs.Web/TableOfContents/TocHeading.cs