public async ValueTask <bool> TryHandleFileChange(DotNetWatchContext context, FileItem file, CancellationToken cancellationToken) { return (await _staticFileHandler.TryHandleFileChange(context, file, cancellationToken) || await _scopedCssFileHandler.TryHandleFileChange(context, file, cancellationToken) || await _compilationHandler.TryHandleFileChange(context, file, cancellationToken)); }
public async ValueTask <bool> TryHandleFileChange(DotNetWatchContext context, FileItem file, CancellationToken cancellationToken) { HotReloadEventSource.Log.HotReloadStart(HotReloadEventSource.StartType.Main); var fileHandlerResult = await _staticFileHandler.TryHandleFileChange(context, file, cancellationToken) || await _scopedCssFileHandler.TryHandleFileChange(context, file, cancellationToken) || await _compilationHandler.TryHandleFileChange(context, file, cancellationToken); HotReloadEventSource.Log.HotReloadEnd(HotReloadEventSource.StartType.Main); return(fileHandlerResult); }
public async ValueTask <bool> TryHandleFileChange(DotNetWatchContext context, FileItem[] files, CancellationToken cancellationToken) { HotReloadEventSource.Log.HotReloadStart(HotReloadEventSource.StartType.Main); var fileHandlerResult = false; for (var i = files.Length - 1; i >= 0; i--) { var file = files[i]; if (await _staticFileHandler.TryHandleFileChange(context, file, cancellationToken) || await _scopedCssFileHandler.TryHandleFileChange(context, file, cancellationToken)) { fileHandlerResult = true; } } fileHandlerResult |= await _compilationHandler.TryHandleFileChange(context, files, cancellationToken); HotReloadEventSource.Log.HotReloadEnd(HotReloadEventSource.StartType.Main); return(fileHandlerResult); }