/// <summary> /// Entry point method /// </summary> /// <param name="args">Command line arguments for the program.</param> public static void Main(string[] args) { var config = ConfigLoader.GetConfig(); var libMon = LibraryMonitor.GetInstance(config.LibraryLocations, config.MimeTypes.Keys.ToList()); BuildWebHost(args, config).Run(); }
/// <summary> /// Singleton constructor. LibraryMonitor will be created if it does not already exist. /// Once created, the instance lives until the program is terminated. /// </summary> /// <param name="libraryLocations">List of full paths to all directories to monitor for music</param> /// <param name="fileTypes">List of music file extensions to watch in @param libraryLocations</param> /// <returns>An instance of the library monitor</returns> public static LibraryMonitor GetInstance(List <String> libraryLocations, List <String> fileTypes) { if (m_instance == null) { m_instance = new LibraryMonitor(libraryLocations, fileTypes); } return(m_instance); }