cleanly separate SiteState service for client and server use cases

This commit is contained in:
Shaun Walker
2022-03-27 21:05:44 -04:00
parent 8b0b7492f5
commit c8129607e8
6 changed files with 23 additions and 9 deletions

View File

@ -2,11 +2,11 @@ using Oqtane.Models;
namespace Oqtane.Shared
{
// this class is used for passing state between components and services as well as controllers and repositories
// this class is used for passing state between components and services on the client
public class SiteState
{
public Alias Alias { get; set; }
public string AntiForgeryToken { get; set; } // for use in client services
public string RemoteIPAddress { get; set; } // captured in _host as cannot be reliably retrieved on Blazor Server
public string AntiForgeryToken { get; set; } // passed from server for use in service calls on client
public string RemoteIPAddress { get; set; } // passed from server as cannot be reliable retrieved on client
}
}