Files
Needlework.Net/Needlework.Net/ViewModels/Pages/Websocket/EventViewModel.cs
2025-06-13 22:52:58 -05:00

24 lines
576 B
C#

using BlossomiShymae.Briar.WebSocket.Events;
using CommunityToolkit.Mvvm.ComponentModel;
using System;
namespace Needlework.Net.ViewModels.Pages.WebSocket;
public class EventViewModel : ObservableObject
{
public EventViewModel(EventData eventData)
{
Time = $"{DateTime.Now:HH:mm:ss.fff}";
Type = eventData?.EventType?.ToUpper() ?? string.Empty;
Uri = eventData?.Uri ?? string.Empty;
}
public string Time { get; }
public string Type { get; }
public string Uri { get; }
public string Key => $"{Time} {Type} {Uri}";
}