aboutsummaryrefslogtreecommitdiff
path: root/plugins/VNLib.Plugins.Essentials.Content.Routing
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-02-16 16:52:41 -0500
committerLibravatar vnugent <public@vaughnnugent.com>2024-02-16 16:52:41 -0500
commiteb9752ab262522271ccaf1ff127658b7202289a4 (patch)
tree9009a8a93504359266a9bd126d272e70a3aa1497 /plugins/VNLib.Plugins.Essentials.Content.Routing
parent0d3612601ee2ff42cc72c9a4e29de66ea9cdc3fd (diff)
Squashed commit of the following:
commit 5745f157e07eaad7a01c8a253ebd84f99202bf2d Author: vnugent <public@vaughnnugent.com> Date: Fri Feb 16 14:30:26 2024 -0500 feat: support new runtime command features and add more debug commit 2735201257cd22981f96b54b4a6120f44cb93c4c Author: vnugent <public@vaughnnugent.com> Date: Mon Feb 12 20:26:57 2024 -0500 refactor: update latest sql extensions commit eb3fea8181344e3550869f92b9643439053f79fe Author: vnugent <public@vaughnnugent.com> Date: Sun Feb 4 01:30:25 2024 -0500 submit pending changes
Diffstat (limited to 'plugins/VNLib.Plugins.Essentials.Content.Routing')
-rw-r--r--plugins/VNLib.Plugins.Essentials.Content.Routing/src/Router.cs17
1 files changed, 5 insertions, 12 deletions
diff --git a/plugins/VNLib.Plugins.Essentials.Content.Routing/src/Router.cs b/plugins/VNLib.Plugins.Essentials.Content.Routing/src/Router.cs
index fda572a..72f091a 100644
--- a/plugins/VNLib.Plugins.Essentials.Content.Routing/src/Router.cs
+++ b/plugins/VNLib.Plugins.Essentials.Content.Routing/src/Router.cs
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2023 Vaughn Nugent
+* Copyright (c) 2024 Vaughn Nugent
*
* Library: VNLib
* Package: VNLib.Plugins.Essentials.Content.Routing
@@ -41,21 +41,14 @@ using VNLib.Plugins.Essentials.Content.Routing.Model;
namespace VNLib.Plugins.Essentials.Content.Routing
{
- internal sealed class Router : IPageRouter
+ internal sealed class Router(PluginBase plugin) : IPageRouter
{
private static readonly RouteComparer Comparer = new();
- private readonly IRouteStore Store;
- private readonly ILogProvider Logger;
+ private readonly IRouteStore Store = plugin.GetOrCreateSingleton<ManagedRouteStore>();
+ private readonly ILogProvider Logger = plugin.Log;
- private readonly ConcurrentDictionary<IWebProcessor, Task<ReadOnlyCollection<Route>>> RouteTable;
-
- public Router(PluginBase plugin)
- {
- Store = plugin.GetOrCreateSingleton<ManagedRouteStore>();
- Logger = plugin.Log;
- RouteTable = new();
- }
+ private readonly ConcurrentDictionary<IWebProcessor, Task<ReadOnlyCollection<Route>>> RouteTable = new();
public Router(PluginBase plugin, IConfigScope config):this(plugin)
{ }