Refactor various classes to initialize lists with empty array syntax for improved clarity and consistency. Update Program.cs to remove unnecessary partial class declaration due to changes in ASP.NET Core 10. Enhance MediaPathResolver by making AssetRelativePath static for better accessibility. Adjust MediaClaimingBackgroundService to centralize idle polling logic. Improve SignalQueue's WaitAsync method for clearer intent in signal draining.
This commit is contained in:
@@ -9,7 +9,7 @@ namespace TeleWave.Domain.Programming;
|
||||
/// </summary>
|
||||
public class GridLayer
|
||||
{
|
||||
private readonly List<Slot> _slots = new();
|
||||
private readonly List<Slot> _slots = [];
|
||||
|
||||
public Guid Id { get; private set; }
|
||||
public Guid TemplateId { get; private set; }
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace TeleWave.Domain.Programming;
|
||||
/// </summary>
|
||||
public class Group
|
||||
{
|
||||
private readonly List<GroupItem> _items = new();
|
||||
private readonly List<GroupItem> _items = [];
|
||||
|
||||
public Guid Id { get; private set; }
|
||||
public string Name { get; private set; } = string.Empty;
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace TeleWave.Domain.Programming;
|
||||
/// </summary>
|
||||
public class JunctionTemplate
|
||||
{
|
||||
private readonly List<JunctionElement> _elements = new();
|
||||
private readonly List<JunctionElement> _elements = [];
|
||||
|
||||
public Guid Id { get; private set; }
|
||||
public Guid ChannelId { get; private set; }
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace TeleWave.Domain.Programming.Planning;
|
||||
/// <summary>Состояние стыков в рамках прогона: когда какая врезка ставилась последний раз.</summary>
|
||||
public sealed class JunctionHistory
|
||||
{
|
||||
private readonly Dictionary<JunctionElementKind, DateTimeOffset> _lastPlaced = new();
|
||||
private readonly Dictionary<JunctionElementKind, DateTimeOffset> _lastPlaced = [];
|
||||
|
||||
public bool Allows(PlanningJunctionElement element, DateTimeOffset moment)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace TeleWave.Domain.Programming;
|
||||
/// </summary>
|
||||
public class ScheduleTemplate
|
||||
{
|
||||
private readonly List<GridLayer> _layers = new();
|
||||
private readonly List<GridLayer> _layers = [];
|
||||
|
||||
public Guid Id { get; private set; }
|
||||
public Guid ChannelId { get; private set; }
|
||||
|
||||
Reference in New Issue
Block a user