FileVersionProvider Class

Summary

Provides version hash for a specified file.

Syntax

public class FileVersionProvider

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.TagHelpers.Internal.FileVersionProvider

Constructors

FileVersionProvider(IFileProvider, IMemoryCache, PathString)

Creates a new instance of [Microsoft.AspNet.Mvc.TagHelpers.Internal.FileVersionProvider](Microsoft.AspNet.Mvc.TagHelpers.Internal.FileVersionProvider.yml).

Arguments:
  • fileProvider (IFileProvider) – The file provider to get and watch files.
  • cache (IMemoryCache) – @!:IMemoryCache- where versioned urls of files are cached.
  • requestPathBase (PathString) –
public FileVersionProvider(IFileProvider fileProvider, IMemoryCache cache, PathString requestPathBase)

Methods

AddFileVersionToPath(System.String)

Adds version query parameter to the specified file path.

Arguments:
  • path (System.String) – The path of the file to which version should be added.
Return type:

System.String

Returns:

Path containing the version query string.

public string AddFileVersionToPath(string path)