using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Data; namespace SKMC.Api.Common { public class LogDataService { private static LogDataService instance; private readonly object lockObject = new object(); public ObservableCollection LogEventModels { get; set; } = new ObservableCollection(); public static LogDataService Instance() { if (instance == null) instance = new LogDataService(); return instance; } private LogDataService() { BindingOperations.EnableCollectionSynchronization(LogEventModels, lockObject); } } }