C# Class BetterCms.Module.Pages.Services.DefaultUrlService

Inheritance: IUrlService
Datei anzeigen Open project: devbridge/BetterCMS Class Usage Examples

Public Methods

Method Description
AddPageUrlPostfix ( string url, string prefixPattern, List unsavedUrls = null ) : string

Adds the postfix to the specified URL.

DefaultUrlService ( IUnitOfWork unitOfWork, ICmsConfiguration configuration ) : System

Initializes a new instance of the DefaultUrlService class.

FixUrl ( string url ) : string

Fixes the URL (adds slashes in front and bottom).

FixUrlFront ( string url ) : string
ValidateExternalUrl ( string url ) : bool

Validates the internal URL.

ValidateInternalUrl ( string url ) : bool

Validates the internal URL.

ValidateInternalUrlWithQueryString ( string url ) : bool

Validates the internal URL with query string.

ValidateUrlPatterns ( string url, string &message, string validatingFieldName = null ) : bool

Validates the URL patterns.

Private Methods

Method Description
PathExistsInDb ( string url ) : bool

Checks if path exists in database.

PathExistsInUnsavedList ( string url, List unsavedUrls ) : bool

Checks if path exists in unsaved list.

Method Details

AddPageUrlPostfix() public method

Adds the postfix to the specified URL.
public AddPageUrlPostfix ( string url, string prefixPattern, List unsavedUrls = null ) : string
url string The page URL.
prefixPattern string The prefix pattern.
unsavedUrls List The list of not saved yet urls.
return string

DefaultUrlService() public method

Initializes a new instance of the DefaultUrlService class.
public DefaultUrlService ( IUnitOfWork unitOfWork, ICmsConfiguration configuration ) : System
unitOfWork IUnitOfWork The unit of work.
configuration ICmsConfiguration The configuration.
return System

FixUrl() public method

Fixes the URL (adds slashes in front and bottom).
public FixUrl ( string url ) : string
url string The URL.
return string

FixUrlFront() public method

public FixUrlFront ( string url ) : string
url string
return string

ValidateExternalUrl() public method

Validates the internal URL.
public ValidateExternalUrl ( string url ) : bool
url string The URL.
return bool

ValidateInternalUrl() public method

Validates the internal URL.
public ValidateInternalUrl ( string url ) : bool
url string The URL.
return bool

ValidateInternalUrlWithQueryString() public method

Validates the internal URL with query string.
public ValidateInternalUrlWithQueryString ( string url ) : bool
url string The URL.
return bool

ValidateUrlPatterns() public method

Validates the URL patterns.
public ValidateUrlPatterns ( string url, string &message, string validatingFieldName = null ) : bool
url string The URL.
message string The message.
validatingFieldName string Name of the validating field.
return bool