-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.razor
41 lines (39 loc) · 1.15 KB
/
App.razor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@inject Session Session;
@inject IJSRuntime js;
<Router AppAssembly="@typeof(Program).Assembly" PreferExactMatches="@true">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
</Found>
<NotFound>
<LayoutView Layout="@typeof(MainLayout)">
<PageError />
</LayoutView>
</NotFound>
</Router>
@code {
[Parameter]
public Guid sSessionID { get; set; }
[Parameter]
public bool sExisting { get; set; }
[Parameter]
public string sBaseURI { get; set; }
[Parameter]
public string sIPAddress { get; set; }
protected override void OnParametersSet()
{
Session.SessionID = sSessionID;
Session.Existing = sExisting;
Session.IPAddress = System.Net.IPAddress.Parse(sIPAddress);
Session.BaseURI = new Uri(sBaseURI);
Session.UpdateInDatabase();
base.OnParametersSet();
}
protected override void OnAfterRender(bool firstRender)
{
if (firstRender)
{
js.InvokeVoidAsync("eval", "iSketchSite.Blazor.Ready();");
}
base.OnAfterRender(firstRender);
}
}