Files
LanMountainDesktop/airapp/LanMountainDesktop.AirAppSdk/SettingsChangedEvent.cs

33 lines
976 B
C#
Raw Normal View History

2026-03-13 00:33:00 +08:00
using System.Collections.Generic;
2026-08-11 23:03:55 +08:00
namespace LanMountainDesktop.AirAppSdk;
2026-03-13 00:33:00 +08:00
public sealed class SettingsChangedEvent
{
public SettingsChangedEvent(
2026-08-11 23:03:55 +08:00
AirAppSettingsScope scope,
2026-03-13 00:33:00 +08:00
string? subjectId = null,
string? placementId = null,
string? sectionId = null,
IReadOnlyCollection<string>? changedKeys = null)
{
Scope = scope;
SubjectId = string.IsNullOrWhiteSpace(subjectId) ? null : subjectId.Trim();
PlacementId = string.IsNullOrWhiteSpace(placementId) ? null : placementId.Trim();
SectionId = string.IsNullOrWhiteSpace(sectionId) ? null : sectionId.Trim();
ChangedKeys = changedKeys is { Count: > 0 }
? changedKeys.ToArray()
: [];
}
2026-08-11 23:03:55 +08:00
public AirAppSettingsScope Scope { get; }
2026-03-13 00:33:00 +08:00
public string? SubjectId { get; }
public string? PlacementId { get; }
public string? SectionId { get; }
public IReadOnlyCollection<string> ChangedKeys { get; }
}