Remove CircuitEvent class.

This commit is contained in:
Jared Goodwin 2023-08-07 06:04:43 -07:00
parent f076089f60
commit ec22b607e8
3 changed files with 2 additions and 43 deletions

View File

@ -451,8 +451,8 @@ public class CircuitConnection : CircuitHandler, ICircuitConnection
{
if (tags.Length > 200)
{
var message = new CircuitEvent(CircuitEventName.DisplayMessage,
$"Tag must be 200 characters or less. Supplied length is {tags.Length}.",
var message = new DisplayNotificationMessage(
$"Tag must be 200 characters or less. Supplied length is {tags.Length}.",
"Tag must be under 200 characters.",
"bg-warning");

View File

@ -1,20 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Remotely.Server.Models;
public class CircuitEvent
{
public CircuitEvent(CircuitEventName eventName, params object[] args)
{
EventName = eventName;
Params = args;
}
public CircuitEventName EventName { get; set; }
// TODO: This is a bad shortcut. Make events for each type.
public object[] Params { get; set; }
}

View File

@ -1,21 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Remotely.Server.Models;
public enum CircuitEventName
{
DisplayMessage,
ChatReceived,
CommandResult,
DeviceUpdate,
DownloadFile,
DownloadFileProgress,
DeviceWentOffline,
ScriptResult,
TransferCompleted,
PowerShellCompletions,
RemoteLogsReceived,
}