Skip to content

Commit

Permalink
更新根路径属性并移除 MIME 映射相关代码
Browse files Browse the repository at this point in the history
新增了 `RootPath` 和 `WebRootPath` 两个属性:
- `RootPath` 属性用于获取根路径。
- `WebRootPath` 属性用于获取 Web 根路径,即 `wwwroot`。

删除了以下文件及其内容:
- `IMimeMapper.cs` 文件中的 `IMimeMapper` 接口及其所有方法。
- `MimeMapper.cs` 文件中的 `MimeMapper` 类及其所有方法和属性。
- `MimeMappingItem.cs` 文件中的 `MimeMappingItem` 类及其所有属性。
- `MimeTypes.cs` 文件中的 `MimeTypes` 静态类及其所有常量。

更新了 `Pek.AspNetCore.csproj` 文件中 `Pek.Common` 包的版本,从 `4.0.2024.1129-beta0613` 到 `4.0.2024.1129-beta0854`。
  • Loading branch information
猿人易 committed Nov 29, 2024
1 parent 253c0e6 commit 0fbe319
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 832 deletions.
18 changes: 18 additions & 0 deletions Pek.AspNetCore/Helpers/DHWeb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,4 +228,22 @@ private static String GetLanIP(NetworkInterfaceType type)
/// </summary>
/// <returns></returns>
public static String GetSiteUrl() => Request?.Scheme + "://" + Request?.Host;

#region RootPath(根路径)

/// <summary>
/// 根路径
/// </summary>
public static String? RootPath => Environment?.ContentRootPath;

#endregion

#region WebRootPath(Web根路径)

/// <summary>
/// Web根路径,即wwwroot
/// </summary>
public static String? WebRootPath => Environment?.WebRootPath;

#endregion
}
530 changes: 0 additions & 530 deletions Pek.AspNetCore/Mime/DefaultMimeItems.cs

This file was deleted.

28 changes: 0 additions & 28 deletions Pek.AspNetCore/Mime/IMimeMapper.cs

This file was deleted.

121 changes: 0 additions & 121 deletions Pek.AspNetCore/Mime/MimeMapper.cs

This file was deleted.

17 changes: 0 additions & 17 deletions Pek.AspNetCore/Mime/MimeMappingItem.cs

This file was deleted.

135 changes: 0 additions & 135 deletions Pek.AspNetCore/Mime/MimeTypes.cs

This file was deleted.

2 changes: 1 addition & 1 deletion Pek.AspNetCore/Pek.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Pek.Common" Version="4.0.2024.1129-beta0613" />
<PackageReference Include="Pek.Common" Version="4.0.2024.1129-beta0854" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 0fbe319

Please sign in to comment.