refactor(notification-outbox): drop unused state from sandbox Notify fakes
This commit is contained in:
@@ -96,16 +96,9 @@ public class SandboxDatabaseHelper
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class SandboxNotifyHelper
|
public class SandboxNotifyHelper
|
||||||
{
|
{
|
||||||
private readonly string _instanceName;
|
|
||||||
|
|
||||||
public SandboxNotifyHelper(string instanceName)
|
|
||||||
{
|
|
||||||
_instanceName = instanceName;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>Selects the notification list to send to.</summary>
|
/// <summary>Selects the notification list to send to.</summary>
|
||||||
public SandboxNotifyTarget To(string listName) =>
|
public SandboxNotifyTarget To(string listName) =>
|
||||||
new(listName, _instanceName);
|
new();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Queries the delivery status of a previously-sent notification. The
|
/// Queries the delivery status of a previously-sent notification. The
|
||||||
@@ -123,13 +116,8 @@ public class SandboxNotifyHelper
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class SandboxNotifyTarget
|
public class SandboxNotifyTarget
|
||||||
{
|
{
|
||||||
private readonly string _listName;
|
internal SandboxNotifyTarget()
|
||||||
private readonly string _instanceName;
|
|
||||||
|
|
||||||
internal SandboxNotifyTarget(string listName, string instanceName)
|
|
||||||
{
|
{
|
||||||
_listName = listName;
|
|
||||||
_instanceName = instanceName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ public class SandboxInstanceContext
|
|||||||
_gateway = gateway;
|
_gateway = gateway;
|
||||||
ExternalSystem = external ?? new SandboxExternalHelper(null, "<sandbox>");
|
ExternalSystem = external ?? new SandboxExternalHelper(null, "<sandbox>");
|
||||||
Database = database ?? new SandboxDatabaseHelper(null, "<sandbox>");
|
Database = database ?? new SandboxDatabaseHelper(null, "<sandbox>");
|
||||||
Notify = notify ?? new SandboxNotifyHelper("<sandbox>");
|
Notify = notify ?? new SandboxNotifyHelper();
|
||||||
Scripts = scripts ?? new SandboxScriptCallHelper(null);
|
Scripts = scripts ?? new SandboxScriptCallHelper(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ public class ScriptAnalysisService
|
|||||||
// mirrors production signatures so scripts compile identically, but it
|
// mirrors production signatures so scripts compile identically, but it
|
||||||
// does not deliver (production now enqueues into the site S&F engine,
|
// does not deliver (production now enqueues into the site S&F engine,
|
||||||
// which has no central-side equivalent here).
|
// 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 compileCache = new Dictionary<string, Script<object>>(StringComparer.Ordinal);
|
||||||
var compileCacheLock = new object();
|
var compileCacheLock = new object();
|
||||||
|
|||||||
Reference in New Issue
Block a user