Luski.Net/Luski.net/Server.Events.cs
JacobTech d8fbf281d0 Server Separation.
I moved the two server types to their own classes to prevent API calls to a server, not of that type.
2023-07-08 09:06:13 -04:00

22 lines
490 B
C#

using System;
using System.Threading.Tasks;
using Luski.net.Interfaces;
namespace Luski.net;
public partial class Server
{
public event Func<IUser, IUser, Task>? UserStatusUpdate;
public event Func<Exception, Task>? OnError;
internal void Exception(Exception e)
{
if (OnError is not null) OnError.Invoke(e);
}
internal void StatusUpdate(IUser u1, IUser u2)
{
if (UserStatusUpdate is not null) UserStatusUpdate.Invoke(u1, u2);
}
}