using System.Collections.Concurrent; namespace Pal.Client.DependencyInjection { internal sealed class FloorService { public ConcurrentDictionary FloorMarkers { get; } = new(); public ConcurrentBag EphemeralMarkers { get; set; } = new(); public LocalState GetFloorMarkers(ushort territoryType) { return FloorMarkers.GetOrAdd(territoryType, tt => LocalState.Load(tt) ?? new LocalState(tt)); } } }