RickStrahl / Westwind.AspnetCore.LiveReload

ASP.NET Core Live Reload Middleware that monitors file changes in your project and automatically reloads the browser's active page
Other
469 stars 42 forks source link

FileIncludeFilter does not have getter and setter #35

Closed hadisonick closed 4 years ago

hadisonick commented 4 years ago

Athough the filter is listed in LiveReloadConfiguration, it can't be accessed as a property in Startup as no getter and setter is set.

public Func<string, bool> FileIncludeFilter= null;

RickStrahl commented 4 years ago

It should still work as a field:

services.AddLiveReload(opt =>
{
                    opt.FolderToMonitor = ServerConfig.WebRoot;
                    opt.LiveReloadEnabled = ServerConfig.UseLiveReload;

                    opt.FileIncludeFilter = (path) => true;  // this works
}

But yes that's an omission on my part it should be a property.