public MarkupFile GetMarkup(DotvvmConfiguration configuration, string virtualPath)
        {
            var markupFile = defaultMarkupFileLoader.GetMarkup(configuration, virtualPath);

            watchers.GetOrAdd(virtualPath, path =>
            {
                var fullPath = Path.Combine(configuration.ApplicationPhysicalPath, path);

                var watcher          = new FileSystemWatcher();
                watcher.Path         = Path.GetDirectoryName(fullPath);
                watcher.Filter       = Path.GetFileName(fullPath);
                watcher.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.FileName;
                watcher.Changed     += (s, a) => OnFileChanged(configuration, path);
                watcher.Renamed     += (s, a) =>
                {
                    // VS doesn't update the actual file, it writes in the temp file, moves the old file away, and then renames the temp file to the original file
                    if (string.Equals(a.Name, watcher.Filter, Environment.OSVersion.Platform == PlatformID.Win32NT ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal))
                    {
                        OnFileChanged(configuration, path);
                    }
                };
                watcher.EnableRaisingEvents = true;

                return(watcher);
            });

            return(markupFile);
        }
        public MarkupFile?GetMarkup(DotvvmConfiguration configuration, string virtualPath)
        {
            var markupFile = _defaultMarkupFileLoader.GetMarkup(configuration, virtualPath);

            if (virtualPath.Contains("Ugly"))
            {
                EvilizeContentReaderFunc(markupFile, () =>
                {
                    Thread.Sleep(TimeSpan.FromSeconds(10));
                });
            }

            return(markupFile);
        }