refactor(notification-outbox): drop unused state from sandbox Notify fakes

This commit is contained in:
Joseph Doherty
2026-05-19 03:49:54 -04:00
parent c8b5871782
commit a5653b4296
3 changed files with 4 additions and 16 deletions

View File

@@ -96,16 +96,9 @@ public class SandboxDatabaseHelper
/// </summary>
public class SandboxNotifyHelper
{
private readonly string _instanceName;
public SandboxNotifyHelper(string instanceName)
{
_instanceName = instanceName;
}
/// <summary>Selects the notification list to send to.</summary>
public SandboxNotifyTarget To(string listName) =>
new(listName, _instanceName);
new();
/// <summary>
/// Queries the delivery status of a previously-sent notification. The
@@ -123,13 +116,8 @@ public class SandboxNotifyHelper
/// </summary>
public class SandboxNotifyTarget
{
private readonly string _listName;
private readonly string _instanceName;
internal SandboxNotifyTarget(string listName, string instanceName)
internal SandboxNotifyTarget()
{
_listName = listName;
_instanceName = instanceName;
}
/// <summary>

View File

@@ -80,7 +80,7 @@ public class SandboxInstanceContext
_gateway = gateway;
ExternalSystem = external ?? new SandboxExternalHelper(null, "<sandbox>");
Database = database ?? new SandboxDatabaseHelper(null, "<sandbox>");
Notify = notify ?? new SandboxNotifyHelper("<sandbox>");
Notify = notify ?? new SandboxNotifyHelper();
Scripts = scripts ?? new SandboxScriptCallHelper(null);
}

View File

@@ -276,7 +276,7 @@ public class ScriptAnalysisService
// mirrors production signatures so scripts compile identically, but it
// does not deliver (production now enqueues into the site S&F engine,
// which has no central-side equivalent here).
var notify = new SandboxNotifyHelper(instanceLabel);
var notify = new SandboxNotifyHelper();
var compileCache = new Dictionary<string, Script<object>>(StringComparer.Ordinal);
var compileCacheLock = new object();