20 lines
829 B
C#
20 lines
829 B
C#
using HRM.UI.Realtime.Jobs;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace HRM.UI.Realtime
|
|
{
|
|
/// <summary>
|
|
/// What the server can call on a browser. The method names are the event names the Angular RealtimeService listens to,
|
|
/// so renaming one here means renaming it there (src/app/_services/realtime/realtime.service.ts).
|
|
/// Prefer <see cref="Event"/> with a new topic over adding a method: it needs no change on either side.
|
|
/// </summary>
|
|
public interface IAppClient
|
|
{
|
|
/// <summary>A background job moved on (progress, stage, finished, failed).</summary>
|
|
Task JobProgress(JobSnapshot snapshot);
|
|
|
|
/// <summary>Any other real-time message. <paramref name="topic"/> is a dotted name such as "calendar.changed".</summary>
|
|
Task Event(string topic, object payload);
|
|
}
|
|
}
|