ARCed.Helpers.ResourceHelper.Initialize C# (CSharp) Method

Initialize() public static method

Initializes the system. Must be called before system can be used.
public static Initialize ( ) : void
return void
        public static void Initialize()
        {
            if (IsInitialized) return;
            _resources = new List<GameResource>();
            _localWatcher = new FileSystemWatcher(".") { IncludeSubdirectories = true, EnableRaisingEvents = false };
            //_scriptWatcher = new FileSystemWatcher(".");
            _localWatcher.Created += FileSystemWatcherCreated;
            _localWatcher.Deleted += FileSystemWatcherDeleted;
            _localWatcher.Renamed += FileSystemWatcherRenamed;
            if (Directory.Exists(Constants.RTPPath))
            {
                _rtpWatcher = new FileSystemWatcher(Constants.RTPPath) { IncludeSubdirectories = true, EnableRaisingEvents = true };
                _rtpWatcher.Created += FileSystemWatcherCreated;
                _rtpWatcher.Deleted += FileSystemWatcherDeleted;
                _rtpWatcher.Renamed += FileSystemWatcherRenamed;
                RefreshRTP();
            }
            IsInitialized = true;
        }