/// <summary> /// Private to ensure local instantiation. /// </summary> private StreamHandler() { // Get singleton instancees _fileSystemHandler = FileSystemDao.GetInstance(); _dao = DatabaseDao.GetInstance(); _trackPrioritizer = TrackPrioritizer.GetInstance(); //Initialize collections runningChannelIds = new Dictionary<int, EzProcess>(); newTrackPlays = new List<TrackPlay>(); ezstreamProcessIds = new List<int>(); }
/// <summary> /// Accessor method to access the only instance of the class /// </summary> /// <returns>The singleton instance of the class</returns> public static DatabaseDao GetInstance() { return _instance ?? (_instance = new DatabaseDao()); }