Interface IRedirectUrlRepository
Defines the IRedirectUrl repository.
Namespace: Umbraco.Cms.Core.Persistence.Repositories
Assembly: Umbraco.Core.dll
Syntax
public interface IRedirectUrlRepository : IReadWriteQueryRepository<Guid, IRedirectUrl>, IReadRepository<Guid, IRedirectUrl>, IWriteRepository<IRedirectUrl>, IQueryRepository<IRedirectUrl>, IRepository
Methods
View SourceDelete(Guid)
Deletes a redirect URL.
Declaration
void Delete(Guid id)
Parameters
Type | Name | Description |
---|---|---|
Guid | id | The redirect URL identifier. |
DeleteAll()
Deletes all redirect URLs.
Declaration
void DeleteAll()
DeleteContentUrls(Guid)
Deletes all redirect URLs for a given content.
Declaration
void DeleteContentUrls(Guid contentKey)
Parameters
Type | Name | Description |
---|---|---|
Guid | contentKey | The content unique key. |
Get(String, Guid, String)
Gets a redirect URL.
Declaration
IRedirectUrl Get(string url, Guid contentKey, string culture)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | The Umbraco redirect URL route. |
Guid | contentKey | The content unique key. |
System.String | culture | The culture. |
Returns
Type | Description |
---|---|
IRedirectUrl |
GetAllUrls(Int32, Int64, Int32, out Int64)
Gets all redirect URLs below a given content item.
Declaration
IEnumerable<IRedirectUrl> GetAllUrls(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 |
---|---|
IEnumerable<IRedirectUrl> | The redirect URLs. |
GetAllUrls(Int64, Int32, out Int64)
Gets all redirect URLs.
Declaration
IEnumerable<IRedirectUrl> GetAllUrls(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 |
---|---|
IEnumerable<IRedirectUrl> | The redirect URLs. |
GetContentUrls(Guid)
Gets all redirect URLs for a content item.
Declaration
IEnumerable<IRedirectUrl> GetContentUrls(Guid contentKey)
Parameters
Type | Name | Description |
---|---|---|
Guid | contentKey | The content unique key. |
Returns
Type | Description |
---|---|
IEnumerable<IRedirectUrl> | All redirect URLs for the content item. |
GetMostRecentUrl(String)
Gets the most recent redirect URL corresponding to an Umbraco redirect URL route.
Declaration
IRedirectUrl GetMostRecentUrl(string url)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | The Umbraco redirect URL route. |
Returns
Type | Description |
---|---|
IRedirectUrl | The most recent redirect URL corresponding to the route. |
GetMostRecentUrl(String, String)
Gets the most recent redirect URL corresponding to an Umbraco redirect URL route.
Declaration
IRedirectUrl GetMostRecentUrl(string url, string culture)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | The Umbraco redirect URL route. |
System.String | culture | The culture the domain is associated with |
Returns
Type | Description |
---|---|
IRedirectUrl | The most recent redirect URL corresponding to the route. |
GetMostRecentUrlAsync(String)
Gets the most recent redirect URL corresponding to an Umbraco redirect URL route.
Declaration
virtual Task<IRedirectUrl> GetMostRecentUrlAsync(string url)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | The Umbraco redirect URL route. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IRedirectUrl> | The most recent redirect URL corresponding to the route. |
GetMostRecentUrlAsync(String, String)
Gets the most recent redirect URL corresponding to an Umbraco redirect URL route.
Declaration
virtual Task<IRedirectUrl> GetMostRecentUrlAsync(string url, string culture)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | The Umbraco redirect URL route. |
System.String | culture | The culture the domain is associated with |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IRedirectUrl> | The most recent redirect URL corresponding to the route. |
SearchUrls(String, Int64, Int32, out Int64)
Searches for all redirect URLs that contain a given search term in their URL property.
Declaration
IEnumerable<IRedirectUrl> SearchUrls(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 |
---|---|
IEnumerable<IRedirectUrl> | The redirect URLs. |