Interface IRedirectUrlService
Namespace:System.Dynamic.ExpandoObject
Assembly:Umbraco.Core.dll
Syntax
public interface IRedirectUrlService : IService
Methods
Delete(Guid)
Deletes a redirect url.
Declaration
void Delete(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | The redirect url identifier. |
Delete(IRedirectUrl)
Deletes a redirect url.
Declaration
void Delete(IRedirectUrl redirectUrl)
Parameters
Type | Name | Description |
---|---|---|
IRedirectUrl | redirectUrl | The redirect url to delete. |
DeleteAll()
Deletes all redirect urls.
Declaration
void DeleteAll()
DeleteContentRedirectUrls(Guid)
Deletes all redirect urls for a given content.
Declaration
void DeleteContentRedirectUrls(Guid contentKey)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | contentKey | The content unique key. |
GetAllRedirectUrls(Int32, Int64, Int32, out Int64)
Gets all redirect urls below a given content item.
Declaration
IEnumerable<IRedirectUrl> GetAllRedirectUrls(int rootContentId, long pageIndex, int pageSize, out long total)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rootContentId | The content unique identifier. |
System.Int64 | pageIndex | The page index. |
System.Int32 | pageSize | The page size. |
System.Int64 | total | The total count of redirect urls. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IRedirectUrl> | The redirect urls. |
GetAllRedirectUrls(Int64, Int32, out Int64)
Gets all redirect urls.
Declaration
IEnumerable<IRedirectUrl> GetAllRedirectUrls(long pageIndex, int pageSize, out long total)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | pageIndex | The page index. |
System.Int32 | pageSize | The page size. |
System.Int64 | total | The total count of redirect urls. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IRedirectUrl> | The redirect urls. |
GetContentRedirectUrls(Guid)
Gets all redirect urls for a content item.
Declaration
IEnumerable<IRedirectUrl> GetContentRedirectUrls(Guid contentKey)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | contentKey | The content unique key. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IRedirectUrl> | All redirect urls for the content item. |
GetMostRecentRedirectUrl(String)
Gets the most recent redirect urls corresponding to an Umbraco redirect url route.
Declaration
IRedirectUrl GetMostRecentRedirectUrl(string url)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | The Umbraco redirect url route. |
Returns
Type | Description |
---|---|
IRedirectUrl | The most recent redirect urls corresponding to the route. |
Register(String, Guid)
Registers a redirect url.
Declaration
void Register(string url, Guid contentKey)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | The Umbraco url route. |
System.Guid | contentKey | The content unique key. |
Remarks
Is a proper Umbraco route eg /path/to/foo or 123/path/tofoo.
SearchRedirectUrls(String, Int64, Int32, out Int64)
Searches for all redirect urls that contain a given search term in their URL property.
Declaration
IEnumerable<IRedirectUrl> SearchRedirectUrls(string searchTerm, long pageIndex, int pageSize, out long total)
Parameters
Type | Name | Description |
---|---|---|
System.String | searchTerm | The term to search for. |
System.Int64 | pageIndex | The page index. |
System.Int32 | pageSize | The page size. |
System.Int64 | total | The total count of redirect urls. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IRedirectUrl> | The redirect urls. |