docs: 补全 C# XML 文档注释,覆盖所有公开与内部成员
为 14 个项目中缺少 XML 注释的类、接口、方法、属性、字段、record、 枚举等成员补全中文文档注释。接口方法在接口层定义完整注释,实现类 使用 <inheritdoc /> 引用。私有辅助方法结合业务语义编写注释。 扫描结果:missing-csharp-docs.txt 缺失项归零。 构建结果:0 警告,0 错误。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -2,27 +2,53 @@ using System.Text.Json.Serialization;
|
||||
|
||||
namespace FileShare_Services.Services.FileLibrary
|
||||
{
|
||||
/// <summary>
|
||||
/// 添加文件库根目录的请求。
|
||||
/// </summary>
|
||||
public sealed record AddLibraryRootRequest(
|
||||
[property: JsonPropertyName("path")] string? Path,
|
||||
[property: JsonPropertyName("displayName")] string? DisplayName = null,
|
||||
[property: JsonPropertyName("scanIntervalMinutes")] int? ScanIntervalMinutes = null);
|
||||
[property: JsonPropertyName("path")]
|
||||
string? Path,
|
||||
|
||||
[property: JsonPropertyName("displayName")]
|
||||
string? DisplayName = null,
|
||||
|
||||
[property: JsonPropertyName("scanIntervalMinutes")]
|
||||
int? ScanIntervalMinutes = null);
|
||||
|
||||
/// <summary>
|
||||
/// 更新文件库根目录启用状态的请求。
|
||||
/// </summary>
|
||||
public sealed record UpdateLibraryRootRequest(
|
||||
[property: JsonPropertyName("id")] int Id,
|
||||
[property: JsonPropertyName("isEnabled")] bool IsEnabled);
|
||||
|
||||
/// <summary>
|
||||
/// 触发文件库根目录立即扫描的请求。
|
||||
/// </summary>
|
||||
public sealed record ScanLibraryRootRequest(
|
||||
[property: JsonPropertyName("id")] int Id);
|
||||
|
||||
/// <summary>
|
||||
/// 删除文件库根目录的请求。
|
||||
/// </summary>
|
||||
public sealed record DeleteLibraryRootRequest(
|
||||
[property: JsonPropertyName("id")] int Id);
|
||||
|
||||
/// <summary>
|
||||
/// 查询服务器子目录的请求。
|
||||
/// </summary>
|
||||
public sealed record DirectoryQueryRequest(
|
||||
[property: JsonPropertyName("path")] string? Path);
|
||||
|
||||
/// <summary>
|
||||
/// 根据 ID 查询文件的请求。
|
||||
/// </summary>
|
||||
public sealed record FileQueryRequest(
|
||||
[property: JsonPropertyName("id")] int Id);
|
||||
|
||||
/// <summary>
|
||||
/// 分页搜索已扫描文件的请求。
|
||||
/// </summary>
|
||||
public sealed record SearchFilesRequest(
|
||||
[property: JsonPropertyName("page")] int Page = 1,
|
||||
[property: JsonPropertyName("pageSize")] int PageSize = 24,
|
||||
@@ -30,6 +56,9 @@ namespace FileShare_Services.Services.FileLibrary
|
||||
[property: JsonPropertyName("keyword")] string? Keyword = null,
|
||||
[property: JsonPropertyName("rootId")] int RootId = 0);
|
||||
|
||||
/// <summary>
|
||||
/// 磁盘驱动器信息。
|
||||
/// </summary>
|
||||
public sealed record DriveDto(
|
||||
string Name,
|
||||
string DisplayName,
|
||||
@@ -39,10 +68,16 @@ namespace FileShare_Services.Services.FileLibrary
|
||||
long? AvailableFreeSpace,
|
||||
bool IsReady);
|
||||
|
||||
/// <summary>
|
||||
/// 服务器子目录信息。
|
||||
/// </summary>
|
||||
public sealed record DirectoryDto(
|
||||
string Name,
|
||||
string FullPath);
|
||||
|
||||
/// <summary>
|
||||
/// 文件库根目录信息,包含扫描状态与文件数量。
|
||||
/// </summary>
|
||||
public sealed record LibraryRootDto(
|
||||
int Id,
|
||||
string Path,
|
||||
@@ -55,6 +90,9 @@ namespace FileShare_Services.Services.FileLibrary
|
||||
string? LastScanError,
|
||||
int FileCount);
|
||||
|
||||
/// <summary>
|
||||
/// 已扫描文件的记录信息,包含媒体类型与流式访问 URL。
|
||||
/// </summary>
|
||||
public sealed record FileRecordDto(
|
||||
int Id,
|
||||
int LibraryRootId,
|
||||
@@ -69,15 +107,24 @@ namespace FileShare_Services.Services.FileLibrary
|
||||
string? TextUrl,
|
||||
bool BrowserPlayable);
|
||||
|
||||
/// <summary>
|
||||
/// 浏览文件库目录结构的请求。
|
||||
/// </summary>
|
||||
public sealed record BrowseDirectoryRequest(
|
||||
[property: JsonPropertyName("rootId")] int RootId = 0,
|
||||
[property: JsonPropertyName("path")] string? Path = null);
|
||||
|
||||
/// <summary>
|
||||
/// 浏览文件库目录的响应,包含当前路径、子目录列表和文件列表。
|
||||
/// </summary>
|
||||
public sealed record BrowseDirectoryResponse(
|
||||
string CurrentPath,
|
||||
List<string> Subdirectories,
|
||||
List<FileRecordDto> Files);
|
||||
|
||||
/// <summary>
|
||||
/// 文本文件预览内容,支持截断标记。
|
||||
/// </summary>
|
||||
public sealed record TextPreviewDto(
|
||||
int Id,
|
||||
string FileName,
|
||||
|
||||
Reference in New Issue
Block a user