C# Class Sakura.AspNetCore.Mvc.Generators.CurrentUriBasedLinkGenerator

Provide the common feature for current uri based pager item link generator.
Inheritance: IPagerItemLinkGenerator
显示文件 Open project: sgjsakura/AspNetCore

Public Methods

Method Description
GenerateLink ( PagerItemGenerationContext context ) : string

Generate the link url for the specified PagerItem.

Protected Methods

Method Description
HandleUriCore ( [ currentUri, [ context ) : string

The core method for handling the current uri.

Most URI handling method requirest the URI be absolute format, however in the view page relative URI is recommended. The currentUri argument in this method has been handled and is ensured to be absolute. The generator will correctly recover it to the original format after handling.

Private Methods

Method Description
GetCurrentUriWithQuery ( ViewContext viewContext ) : string

Method Details

GenerateLink() public method

Generate the link url for the specified PagerItem.
public GenerateLink ( PagerItemGenerationContext context ) : string
context PagerItemGenerationContext The generation context.
return string

HandleUriCore() protected abstract method

The core method for handling the current uri.
Most URI handling method requirest the URI be absolute format, however in the view page relative URI is recommended. The currentUri argument in this method has been handled and is ensured to be absolute. The generator will correctly recover it to the original format after handling.
protected abstract HandleUriCore ( [ currentUri, [ context ) : string
currentUri [ The URL to handle, this URL is ensured in absolute mode.
context [ The generation context.
return string