C# 클래스 BetterCms.Module.Pages.Services.DefaultRedirectService

상속: IRedirectService
파일 보기 프로젝트 열기: devbridge/BetterCMS

공개 메소드들

메소드 설명
CreateRedirectEntity ( string pageUrl, string redirectUrl ) : Redirect

Checks if such redirect doesn't exists yet and creates new redirect entity.

DefaultRedirectService ( IUnitOfWork unitOfWork, IUrlService urlService, IRepository repository ) : System

Initializes a new instance of the DefaultRedirectService class.

DeleteRedirect ( System.Guid id, int version ) : bool
GetAllRedirects ( ) : IList

Gets the list with all redirects.

GetPageRedirect ( string pageUrl, System.Guid id = null ) : Redirect

Gets redirect, if such redirect exists.

GetRedirect ( string url ) : string

Gets the redirect for given url.

SaveRedirect ( ViewModels model, bool createIfNotExists = false ) : Redirect
ValidateForCircularLoop ( string pageUrl, string redirectUrl, System.Guid id = null ) : void

Validates urls: checks if the the circular loop exists.

ValidateRedirectExists ( string pageUrl, System.Guid id = null ) : void

Checks, if such redirect exists.

비공개 메소드들

메소드 설명
RecursiveCircularLoop ( IList redirects, string redirectUrl, List checkedIds, string startPageUrl, string startRedirectUrl ) : void

Recursive method checks for circular loops in redirects list.

메소드 상세

CreateRedirectEntity() 공개 메소드

Checks if such redirect doesn't exists yet and creates new redirect entity.
public CreateRedirectEntity ( string pageUrl, string redirectUrl ) : Redirect
pageUrl string The page URL.
redirectUrl string The redirect URL.
리턴 Redirect

DefaultRedirectService() 공개 메소드

Initializes a new instance of the DefaultRedirectService class.
public DefaultRedirectService ( IUnitOfWork unitOfWork, IUrlService urlService, IRepository repository ) : System
unitOfWork IUnitOfWork The unit of work.
urlService IUrlService The URL service.
repository IRepository The repository.
리턴 System

DeleteRedirect() 공개 메소드

public DeleteRedirect ( System.Guid id, int version ) : bool
id System.Guid
version int
리턴 bool

GetAllRedirects() 공개 메소드

Gets the list with all redirects.
public GetAllRedirects ( ) : IList
리턴 IList

GetPageRedirect() 공개 메소드

Gets redirect, if such redirect exists.
public GetPageRedirect ( string pageUrl, System.Guid id = null ) : Redirect
pageUrl string The page URL.
id System.Guid The redirect id.
리턴 Redirect

GetRedirect() 공개 메소드

Gets the redirect for given url.
public GetRedirect ( string url ) : string
url string The URL.
리턴 string

SaveRedirect() 공개 메소드

public SaveRedirect ( ViewModels model, bool createIfNotExists = false ) : Redirect
model ViewModels
createIfNotExists bool
리턴 Redirect

ValidateForCircularLoop() 공개 메소드

Validates urls: checks if the the circular loop exists.
public ValidateForCircularLoop ( string pageUrl, string redirectUrl, System.Guid id = null ) : void
pageUrl string The page URL.
redirectUrl string The redirect URL.
id System.Guid The id.
리턴 void

ValidateRedirectExists() 공개 메소드

Checks, if such redirect exists.
public ValidateRedirectExists ( string pageUrl, System.Guid id = null ) : void
pageUrl string The page URL.
id System.Guid The redirect id.
리턴 void