From 7e385edd94fcff636fce2d563d4e3484c3829da8 Mon Sep 17 00:00:00 2001 From: RDeck Date: Fri, 30 May 2025 03:58:16 -0400 Subject: [PATCH] ! --- .vs/SummerBestWebForm2/v17/.suo | Bin 76288 -> 78336 bytes .../v17/DocumentLayout.backup.json | 92 +++--------------- .../v17/DocumentLayout.json | 87 ++++------------- ClassObj/IPAddressService.cs | 8 ++ Components/App.razor | 36 ++++++- Components/IPAddressGrabber.razor | 28 ++++++ Components/Pages/Error.razor | 30 +++--- Components/Pages/Home.razor | 2 + Components/Pages/Home.razor.cs | 8 +- Components/Pages/Weather.razor | 86 ++++++++-------- Components/Routes.razor | 1 + Program.cs | 2 + .../net8.0/SummerBestWebForm2.AssemblyInfo.cs | 2 +- ...ummerBestWebForm2.AssemblyInfoInputs.cache | 2 +- ....GeneratedMSBuildEditorConfig.editorconfig | 4 + 15 files changed, 174 insertions(+), 214 deletions(-) create mode 100644 ClassObj/IPAddressService.cs create mode 100644 Components/IPAddressGrabber.razor diff --git a/.vs/SummerBestWebForm2/v17/.suo b/.vs/SummerBestWebForm2/v17/.suo index 90cb9c747690bab5eb9fcb568489667b6d0f5e25..c8fdb99f8bd969dd6fe4887ec461ad2ec5c2d390 100644 GIT binary patch delta 6017 zcmdT|30PBC7JlcEKmrIT`yMa?#Q;GNfkKIjE6U>1`Z;JtU@R(xhJcEWc~F(MR)w5O zzD`?5%e2~lF4bpEJ8n?5w(hoS>n@JnW;)h!NN3Orb8bi!E7s9({Jxp{zCY)_bC=wA z&bj|xgcB0siljcxdkn{M4up=*&Q1~>5NbB(1@iLM->OZ?$In8JSjjI1kRwO}2M(uV zs@ds9(uL5A;7J%kVEQ1N47bTll7kxZLgST`2_+08C~28 z$~w^Q24oeYscXN8hw7?c!I{RsAVCZC}9Xo9%T zc@i{~yFy1pL6+1+{Z(zwYXYOI>Jj_e;?)MOENZS1SbEEiHwFxqTSv|Gm}lvWYF;Yp z0|byp(iptNcJKbYs0=>`#vnbkVx@-xE}?~fF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<( Rzjg1uW30F2GyDDGKLHvf$?O0C diff --git a/.vs/SummerBestWebForm2/v17/DocumentLayout.backup.json b/.vs/SummerBestWebForm2/v17/DocumentLayout.backup.json index 42d0450..400ee1c 100644 --- a/.vs/SummerBestWebForm2/v17/DocumentLayout.backup.json +++ b/.vs/SummerBestWebForm2/v17/DocumentLayout.backup.json @@ -3,28 +3,12 @@ "WorkspaceRootPath": "C:\\Repos\\SummerBestWebForm2\\", "Documents": [ { - "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\pages\\test.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", - "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\pages\\test.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" - }, - { - "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\pages\\home.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", - "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\pages\\home.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" + "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\pages\\error.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\pages\\error.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" }, { "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\pages\\weather.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\pages\\weather.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" - }, - { - "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\app.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", - "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\app.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" - }, - { - "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\pages\\home.razor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\pages\\home.razor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" } ], "DocumentGroupContainers": [ @@ -34,7 +18,7 @@ "DocumentGroups": [ { "DockedWidth": 200, - "SelectedChildIndex": 16, + "SelectedChildIndex": 12, "Children": [ { "$type": "Bookmark", @@ -80,82 +64,30 @@ "$type": "Bookmark", "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}" }, - { - "$type": "Document", - "DocumentIndex": 3, - "Title": "App.razor", - "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\App.razor", - "RelativeDocumentMoniker": "Components\\App.razor", - "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\App.razor", - "RelativeToolTip": "Components\\App.razor", - "ViewState": "AgIAAC0AAAAAAAAAAAAAAAAAAAAHAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", - "WhenOpened": "2025-05-29T18:24:38.258Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 5, - "Title": "Home.razor.cs", - "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor.cs", - "RelativeDocumentMoniker": "Components\\Pages\\Home.razor.cs", - "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor.cs", - "RelativeToolTip": "Components\\Pages\\Home.razor.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-05-29T18:24:42.784Z", - "EditorCaption": "" - }, { "$type": "Document", "DocumentIndex": 1, - "Title": "Home.razor", - "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor", - "RelativeDocumentMoniker": "Components\\Pages\\Home.razor", - "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor", - "RelativeToolTip": "Components\\Pages\\Home.razor", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", - "WhenOpened": "2025-05-29T18:25:48.345Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 4, - "Title": "Program.cs", - "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Program.cs", - "RelativeDocumentMoniker": "Program.cs", - "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Program.cs", - "RelativeToolTip": "Program.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAEAAAAiAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-05-29T18:26:18.113Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 2, "Title": "Weather.razor", "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Weather.razor", "RelativeDocumentMoniker": "Components\\Pages\\Weather.razor", "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Weather.razor", "RelativeToolTip": "Components\\Pages\\Weather.razor", - "ViewState": "AgIAAAAAAAAAAAAAAAAAABQAAAAgAAAAAAAAAA==", + "ViewState": "AgIAAAwAAAAAAAAAAAAAADwAAAAkAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", - "WhenOpened": "2025-05-29T18:28:11.235Z", + "WhenOpened": "2025-05-30T07:56:59.41Z", "EditorCaption": "" }, { "$type": "Document", "DocumentIndex": 0, - "Title": "Test.razor", - "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Test.razor", - "RelativeDocumentMoniker": "Components\\Pages\\Test.razor", - "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Test.razor", - "RelativeToolTip": "Components\\Pages\\Test.razor", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Title": "Error.razor", + "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Error.razor", + "RelativeDocumentMoniker": "Components\\Pages\\Error.razor", + "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Error.razor", + "RelativeToolTip": "Components\\Pages\\Error.razor", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAB8AAABBAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", - "WhenOpened": "2025-05-29T18:28:44.014Z", + "WhenOpened": "2025-05-30T07:57:59.014Z", "EditorCaption": "" } ] diff --git a/.vs/SummerBestWebForm2/v17/DocumentLayout.json b/.vs/SummerBestWebForm2/v17/DocumentLayout.json index 192414d..1089f0c 100644 --- a/.vs/SummerBestWebForm2/v17/DocumentLayout.json +++ b/.vs/SummerBestWebForm2/v17/DocumentLayout.json @@ -3,24 +3,12 @@ "WorkspaceRootPath": "C:\\Repos\\SummerBestWebForm2\\", "Documents": [ { - "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\pages\\home.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", - "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\pages\\home.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" + "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\ipaddressgrabber.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\ipaddressgrabber.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" }, { "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\pages\\weather.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\pages\\weather.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" - }, - { - "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\app.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", - "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\app.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" - }, - { - "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\pages\\home.razor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\pages\\home.razor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" } ], "DocumentGroupContainers": [ @@ -30,7 +18,7 @@ "DocumentGroups": [ { "DockedWidth": 200, - "SelectedChildIndex": 13, + "SelectedChildIndex": 12, "Children": [ { "$type": "Bookmark", @@ -76,58 +64,6 @@ "$type": "Bookmark", "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}" }, - { - "$type": "Document", - "DocumentIndex": 2, - "Title": "App.razor", - "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\App.razor", - "RelativeDocumentMoniker": "Components\\App.razor", - "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\App.razor", - "RelativeToolTip": "Components\\App.razor", - "ViewState": "AgIAAC0AAAAAAAAAAAAAAAAAAAAHAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", - "WhenOpened": "2025-05-29T18:24:38.258Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 4, - "Title": "Home.razor.cs", - "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor.cs", - "RelativeDocumentMoniker": "Components\\Pages\\Home.razor.cs", - "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor.cs", - "RelativeToolTip": "Components\\Pages\\Home.razor.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-05-29T18:24:42.784Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 0, - "Title": "Home.razor", - "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor", - "RelativeDocumentMoniker": "Components\\Pages\\Home.razor", - "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor", - "RelativeToolTip": "Components\\Pages\\Home.razor", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", - "WhenOpened": "2025-05-29T18:25:48.345Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 3, - "Title": "Program.cs", - "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Program.cs", - "RelativeDocumentMoniker": "Program.cs", - "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Program.cs", - "RelativeToolTip": "Program.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAEAAAAiAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-05-29T18:26:18.113Z", - "EditorCaption": "" - }, { "$type": "Document", "DocumentIndex": 1, @@ -136,9 +72,22 @@ "RelativeDocumentMoniker": "Components\\Pages\\Weather.razor", "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Weather.razor", "RelativeToolTip": "Components\\Pages\\Weather.razor", - "ViewState": "AgIAAAAAAAAAAAAAAAAAABQAAAAgAAAAAAAAAA==", + "ViewState": "AgIAAAwAAAAAAAAAAAAAADwAAAAkAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", - "WhenOpened": "2025-05-29T18:28:11.235Z", + "WhenOpened": "2025-05-30T07:56:59.41Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "IPAddressGrabber.razor", + "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\IPAddressGrabber.razor", + "RelativeDocumentMoniker": "Components\\IPAddressGrabber.razor", + "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\IPAddressGrabber.razor", + "RelativeToolTip": "Components\\IPAddressGrabber.razor", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", + "WhenOpened": "2025-05-30T07:58:10.038Z", "EditorCaption": "" } ] diff --git a/ClassObj/IPAddressService.cs b/ClassObj/IPAddressService.cs new file mode 100644 index 0000000..75d1b7f --- /dev/null +++ b/ClassObj/IPAddressService.cs @@ -0,0 +1,8 @@ +namespace SummerBestWebForm2.ClassObj; + +public class IPAddressService +{ + public const string TokenName = "IPAddress"; + + public string RemoteIpAddress { get; set; } = "Not Set"; +} diff --git a/Components/App.razor b/Components/App.razor index 97f2bbb..67a8a85 100644 --- a/Components/App.razor +++ b/Components/App.razor @@ -1,4 +1,5 @@ - +@implements IDisposable + @@ -29,14 +30,16 @@ min-height: 100vh; } - + @* *@ + - + @* *@ + @@ -89,5 +92,32 @@ @code { [CascadingParameter] public CascadingAppState appState { get; set; } + + #region "IPADDR" + [CascadingParameter] HttpContext? HttpContext { get; set; } + [Inject] public PersistentComponentState ApplicationState { get; set; } = default!; + + private PersistingComponentStateSubscription? _persistingSubscription; + private bool _subsequentRender; + private string RemoteIpAddress = "Not Set"; + + protected override void OnInitialized() + { + this.RemoteIpAddress = this.HttpContext?.Connection.RemoteIpAddress?.ToString() ?? "Not Set"; + _persistingSubscription = ApplicationState.RegisterOnPersisting(this.PersistData); + } + + public Task PersistData() + { + this.ApplicationState.PersistAsJson(ClassObj.IPAddressService.TokenName, this.RemoteIpAddress); + return Task.CompletedTask; + } + + void IDisposable.Dispose() + { + _persistingSubscription?.Dispose(); + } +#endregion + private string errMsg = string.Empty; } diff --git a/Components/IPAddressGrabber.razor b/Components/IPAddressGrabber.razor new file mode 100644 index 0000000..aea203c --- /dev/null +++ b/Components/IPAddressGrabber.razor @@ -0,0 +1,28 @@ +@using ClassObj +

IPAddressGrabber

+ +@code { + [Inject] public IPAddressService IPAddressService { get; set; } = default!; + [Inject] public PersistentComponentState ApplicationState { get; set; } = default!; + + private bool _subsequentRender; + private const string TokenName = "IPAddress"; + private string RemoteIpAddress = "Not Set"; + + // Short circuit all the lifecycle stuff - we don't need it + public override Task SetParametersAsync(ParameterView parameters) + { + if (_subsequentRender) + return Task.CompletedTask; + + // if not prerender, try and get the persisted value + if (this.ApplicationState.TryTakeFromJson(IPAddressService.TokenName, out var address)) + { + this.RemoteIpAddress = address ?? "Not Set"; + this.IPAddressService.RemoteIpAddress = this.RemoteIpAddress; + } + + _subsequentRender = true; + return Task.CompletedTask; + } +} diff --git a/Components/Pages/Error.razor b/Components/Pages/Error.razor index 576cc2d..7d98bd9 100644 --- a/Components/Pages/Error.razor +++ b/Components/Pages/Error.razor @@ -8,29 +8,29 @@ @if (ShowRequestId) { -

- Request ID: @RequestId -

+

+ Request ID: @RequestId +

}

Development Mode

- Swapping to Development environment will display more detailed information about the error that occurred. + Swapping to Development environment will display more detailed information about the error that occurred.

- The Development environment shouldn't be enabled for deployed applications. - It can result in displaying sensitive information from exceptions to end users. - For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development - and restarting the app. + The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app.

-@code{ - [CascadingParameter] - private HttpContext? HttpContext { get; set; } +@code { + [CascadingParameter] + private HttpContext? HttpContext { get; set; } - private string? RequestId { get; set; } - private bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + private string? RequestId { get; set; } + private bool ShowRequestId => !string.IsNullOrEmpty(RequestId); - protected override void OnInitialized() => - RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier; + protected override void OnInitialized() => + RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier; } diff --git a/Components/Pages/Home.razor b/Components/Pages/Home.razor index 0c60611..d33c490 100644 --- a/Components/Pages/Home.razor +++ b/Components/Pages/Home.razor @@ -1,5 +1,6 @@ @rendermode InteractiveServer @inject PersistentComponentState ApplicationState +@inject ClassObj.IPAddressService IpAddressService @page "/" Welcome @@ -520,5 +521,6 @@ else DateCreated: @appState.DateCreated DateExpires: @appState.DateExpires IPAddress: @appState.myIpAddress + IPAddress2: @(IpAddressService.RemoteIpAddress.ToString()) } diff --git a/Components/Pages/Home.razor.cs b/Components/Pages/Home.razor.cs index c3a2c2a..1e888d6 100644 --- a/Components/Pages/Home.razor.cs +++ b/Components/Pages/Home.razor.cs @@ -8,13 +8,17 @@ using System.Net.Http; using System.Text.Json; using Microsoft.Extensions.Options; using SummerBestWebForm2.AppState; +using SummerBestWebForm2.ClassObj; namespace SummerBestWebForm2.Components.Pages; public partial class Home { [CascadingParameter] - public CascadingAppState appState { get; set; } + public CascadingAppState appState { get; set; } = default!; + + //[Inject] IPAddressService IpAddressService { get; set; } = default!; + async Task OnFinishHandler() //private void SaveIt() @@ -159,7 +163,7 @@ public partial class Home public bool? IsDesignChoiceValid { get; set; } = false; [CascadingParameter] - public DialogFactory Dialogs { get; set; } + public DialogFactory Dialogs { get; set; } = default!; public bool ShowWizard { get; set; } = true; diff --git a/Components/Pages/Weather.razor b/Components/Pages/Weather.razor index 8eca4cc..cef893e 100644 --- a/Components/Pages/Weather.razor +++ b/Components/Pages/Weather.razor @@ -8,56 +8,56 @@ @if (forecasts == null) { -

Loading...

+

Loading...

} else { - - - - - - - - - - - @foreach (var forecast in forecasts) - { - - - - - - - } - -
DateTemp. (C)Temp. (F)Summary
@forecast.Date.ToShortDateString()@forecast.TemperatureC@forecast.TemperatureF@forecast.Summary
+ + + + + + + + + + + @foreach (var forecast in forecasts) + { + + + + + + + } + +
DateTemp. (C)Temp. (F)Summary
@forecast.Date.ToShortDateString()@forecast.TemperatureC@forecast.TemperatureF@forecast.Summary
} @code { - private WeatherForecast[]? forecasts; + private WeatherForecast[]? forecasts; - protected override async Task OnInitializedAsync() - { - // Simulate asynchronous loading to demonstrate a loading indicator - await Task.Delay(500); + protected override async Task OnInitializedAsync() + { + // Simulate asynchronous loading to demonstrate a loading indicator + await Task.Delay(500); - var startDate = DateOnly.FromDateTime(DateTime.Now); - var summaries = new[] { "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" }; - forecasts = Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - Date = startDate.AddDays(index), - TemperatureC = Random.Shared.Next(-20, 55), - Summary = summaries[Random.Shared.Next(summaries.Length)] - }).ToArray(); - } + var startDate = DateOnly.FromDateTime(DateTime.Now); + var summaries = new[] { "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" }; + forecasts = Enumerable.Range(1, 5).Select(index => new WeatherForecast + { + Date = startDate.AddDays(index), + TemperatureC = Random.Shared.Next(-20, 55), + Summary = summaries[Random.Shared.Next(summaries.Length)] + }).ToArray(); + } - private class WeatherForecast - { - public DateOnly Date { get; set; } - public int TemperatureC { get; set; } - public string? Summary { get; set; } - public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); - } + private class WeatherForecast + { + public DateOnly Date { get; set; } + public int TemperatureC { get; set; } + public string? Summary { get; set; } + public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); + } } diff --git a/Components/Routes.razor b/Components/Routes.razor index 51f8750..09ab959 100644 --- a/Components/Routes.razor +++ b/Components/Routes.razor @@ -1,4 +1,5 @@  + diff --git a/Program.cs b/Program.cs index 283bcf2..0495bd4 100644 --- a/Program.cs +++ b/Program.cs @@ -1,4 +1,5 @@ using Microsoft.AspNetCore.ResponseCompression; +using SummerBestWebForm2.ClassObj; using SummerBestWebForm2.Components; using System.IO.Compression; @@ -32,6 +33,7 @@ namespace SummerBestWebForm2 builder.Services.AddHttpContextAccessor(); builder.Services.AddScoped(); + builder.Services.AddScoped(); // IPADDR var app = builder.Build(); diff --git a/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfo.cs b/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfo.cs index 582779c..e3416e0 100644 --- a/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfo.cs +++ b/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("SummerBestWebForm2")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8490ef01857e10ece7d6fd766ad123c5a53a024f")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+90ec402c8f209ea928327a0151975a536bd86dd1")] [assembly: System.Reflection.AssemblyProductAttribute("SummerBestWebForm2")] [assembly: System.Reflection.AssemblyTitleAttribute("SummerBestWebForm2")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfoInputs.cache b/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfoInputs.cache index 81717f5..cfc1754 100644 --- a/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfoInputs.cache +++ b/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfoInputs.cache @@ -1 +1 @@ -2de27890b60d31f362d1cf2d47078e797ede6fcf6283df998427d26b7d368448 +693802ef0a848d3bf856626462ce9d619e0d8f7d05d5669a9af2d1e415ade510 diff --git a/obj/Debug/net8.0/SummerBestWebForm2.GeneratedMSBuildEditorConfig.editorconfig b/obj/Debug/net8.0/SummerBestWebForm2.GeneratedMSBuildEditorConfig.editorconfig index a7b2a48..03d47e7 100644 --- a/obj/Debug/net8.0/SummerBestWebForm2.GeneratedMSBuildEditorConfig.editorconfig +++ b/obj/Debug/net8.0/SummerBestWebForm2.GeneratedMSBuildEditorConfig.editorconfig @@ -28,6 +28,10 @@ build_metadata.AdditionalFiles.CssScope = build_metadata.AdditionalFiles.TargetPath = Q29tcG9uZW50c1xBcHAucmF6b3I= build_metadata.AdditionalFiles.CssScope = +[C:/Repos/SummerBestWebForm2/Components/IPAddressGrabber.razor] +build_metadata.AdditionalFiles.TargetPath = Q29tcG9uZW50c1xJUEFkZHJlc3NHcmFiYmVyLnJhem9y +build_metadata.AdditionalFiles.CssScope = + [C:/Repos/SummerBestWebForm2/Components/Pages/Counter.razor] build_metadata.AdditionalFiles.TargetPath = Q29tcG9uZW50c1xQYWdlc1xDb3VudGVyLnJhem9y build_metadata.AdditionalFiles.CssScope =