XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEToolBox

【WPF】XFE工具箱

公开
关注 0 Fork 0 Star 0
UTF-8
namespace XFEToolBox.Server.Realtime;

internal sealed class ChatCallRoom(
    string callId,
    string creatorUserId,
    string targetType,
    string targetId,
    TimeProvider timeProvider)
{
    public object SyncRoot { get; } = new();

    public string CallId { get; } = callId;

    public string CreatorUserId { get; } = creatorUserId;

    public string TargetType { get; } = targetType;

    public string TargetId { get; } = targetId;

    public Dictionary<string, ChatCallParticipant> Participants { get; } = new(StringComparer.Ordinal);

    public DateTimeOffset LastActivityUtc { get; private set; } = timeProvider.GetUtcNow();

    public void Touch() => LastActivityUtc = timeProvider.GetUtcNow();
}

internal sealed record ChatCallParticipant(string UserId, string ConnectionId, string DisplayName);