diff --git a/src/blazor/admin/BootstrapAdmin.Web/Components/LoginLogSearch.razor.cs b/src/blazor/admin/BootstrapAdmin.Web/Components/LoginLogSearch.razor.cs index ff501372..4067a373 100644 --- a/src/blazor/admin/BootstrapAdmin.Web/Components/LoginLogSearch.razor.cs +++ b/src/blazor/admin/BootstrapAdmin.Web/Components/LoginLogSearch.razor.cs @@ -2,6 +2,9 @@ namespace BootstrapAdmin.Web.Components; +/// +/// +/// public partial class LoginLogSearch { /// diff --git a/src/blazor/admin/BootstrapAdmin.Web/Extensions/InternalIPAddressExtensions.cs b/src/blazor/admin/BootstrapAdmin.Web/Extensions/InternalIPAddressExtensions.cs new file mode 100644 index 00000000..57c8f42a --- /dev/null +++ b/src/blazor/admin/BootstrapAdmin.Web/Extensions/InternalIPAddressExtensions.cs @@ -0,0 +1,24 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +using System.Net; + +namespace Microsoft.AspNetCore.Builder; + +/// +/// IPAddress 内部操作扩展类 +/// +internal static class InternalIPAddressExtensions +{ + /// + /// + /// + /// + /// + public static string ToIPv4String(this IPAddress? address) + { + var ipv4Address = (address ?? IPAddress.IPv6Loopback).ToString(); + return ipv4Address.StartsWith("::ffff:") ? (address ?? IPAddress.IPv6Loopback).MapToIPv4().ToString() : ipv4Address; + } +} diff --git a/src/blazor/admin/BootstrapAdmin.Web/Pages/Admin/Logins.razor.cs b/src/blazor/admin/BootstrapAdmin.Web/Pages/Admin/Logins.razor.cs index 4c23888f..35bd8084 100644 --- a/src/blazor/admin/BootstrapAdmin.Web/Pages/Admin/Logins.razor.cs +++ b/src/blazor/admin/BootstrapAdmin.Web/Pages/Admin/Logins.razor.cs @@ -2,6 +2,9 @@ namespace BootstrapAdmin.Web.Pages.Admin; +/// +/// +/// public partial class Logins { ///