BlazorWebViewHandler.CreateFileProvider(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a file provider for static assets used in the BlazorWebView. The default implementation
serves files from a platform-specific location. Override this method to return a custom IFileProvider to serve assets such
as wwwroot/index.html
. Call the base method and combine its return value with a CompositeFileProvider
to use both custom assets and default assets.
public:
virtual Microsoft::Extensions::FileProviders::IFileProvider ^ CreateFileProvider(System::String ^ contentRootDir);
public virtual Microsoft.Extensions.FileProviders.IFileProvider CreateFileProvider (string contentRootDir);
abstract member CreateFileProvider : string -> Microsoft.Extensions.FileProviders.IFileProvider
override this.CreateFileProvider : string -> Microsoft.Extensions.FileProviders.IFileProvider
Public Overridable Function CreateFileProvider (contentRootDir As String) As IFileProvider
Parameters
- contentRootDir
- String
The base directory to use for all requested assets, such as wwwroot
.
Returns
Returns a IFileProvider for static assets.