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

Inheritance: IUrlService
Afficher le fichier Open project: devbridge/BetterCMS Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

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.
Résultat string

DefaultUrlService() public méthode

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.
Résultat System

FixUrl() public méthode

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

FixUrlFront() public méthode

public FixUrlFront ( string url ) : string
url string
Résultat string

ValidateExternalUrl() public méthode

Validates the internal URL.
public ValidateExternalUrl ( string url ) : bool
url string The URL.
Résultat bool

ValidateInternalUrl() public méthode

Validates the internal URL.
public ValidateInternalUrl ( string url ) : bool
url string The URL.
Résultat bool

ValidateInternalUrlWithQueryString() public méthode

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

ValidateUrlPatterns() public méthode

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.
Résultat bool