JacobTech
d8fbf281d0
I moved the two server types to their own classes to prevent API calls to a server, not of that type.
22 lines
490 B
C#
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);
|
|
}
|
|
} |