Merge remote-tracking branch 'origin/release/12.3.4' into v12/dev
# Conflicts: # version.json
This commit is contained in:
@@ -2,19 +2,32 @@ namespace Umbraco.Cms.Core.Models.DeliveryApi;
|
||||
|
||||
public sealed class ApiLink
|
||||
{
|
||||
[Obsolete("Please use the overload that accepts a query string. Will be removed in V14.")]
|
||||
public static ApiLink Content(string title, string? target, Guid destinationId, string destinationType, IApiContentRoute route)
|
||||
=> new(LinkType.Content, null, title, target, destinationId, destinationType, route);
|
||||
=> Content(title, queryString: null, target, destinationId, destinationType, route);
|
||||
|
||||
public static ApiLink Content(string title, string? queryString, string? target, Guid destinationId, string destinationType, IApiContentRoute route)
|
||||
=> new(LinkType.Content, url: null, queryString, title, target, destinationId, destinationType, route);
|
||||
|
||||
[Obsolete("Please use the overload that accepts a query string. Will be removed in V14.")]
|
||||
public static ApiLink Media(string title, string url, string? target, Guid destinationId, string destinationType)
|
||||
=> new(LinkType.Media, url, title, target, destinationId, destinationType, null);
|
||||
=> Media(title, url, queryString: null, target, destinationId, destinationType);
|
||||
|
||||
public static ApiLink Media(string title, string url, string? queryString, string? target, Guid destinationId, string destinationType)
|
||||
=> new(LinkType.Media, url, queryString, title, target, destinationId, destinationType, route: null);
|
||||
|
||||
[Obsolete("Please use the overload that accepts a query string. Will be removed in V14.")]
|
||||
public static ApiLink External(string? title, string url, string? target)
|
||||
=> new(LinkType.External, url, title, target, null, null, null);
|
||||
=> External(title, url, queryString: null, target);
|
||||
|
||||
private ApiLink(LinkType linkType, string? url, string? title, string? target, Guid? destinationId, string? destinationType, IApiContentRoute? route)
|
||||
public static ApiLink External(string? title, string url, string? queryString, string? target)
|
||||
=> new(LinkType.External, url, queryString, title, target, null, null, null);
|
||||
|
||||
private ApiLink(LinkType linkType, string? url, string? queryString, string? title, string? target, Guid? destinationId, string? destinationType, IApiContentRoute? route)
|
||||
{
|
||||
LinkType = linkType;
|
||||
Url = url;
|
||||
QueryString = queryString;
|
||||
Title = title;
|
||||
Target = target;
|
||||
DestinationId = destinationId;
|
||||
@@ -24,6 +37,8 @@ public sealed class ApiLink
|
||||
|
||||
public string? Url { get; }
|
||||
|
||||
public string? QueryString { get; }
|
||||
|
||||
public string? Title { get; }
|
||||
|
||||
public string? Target { get; }
|
||||
|
||||
Reference in New Issue
Block a user