Skip to content

Commit

Permalink
Removing GetItemDisplayUrlAsync.
Browse files Browse the repository at this point in the history
  • Loading branch information
Psichorex committed Sep 7, 2023
1 parent 7659360 commit 183b4b2
Showing 1 changed file with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,6 @@ public static string GetItemEditUrl(this IOrchardHelper orchardHelper, string co
return urlHelper.EditContentItem(contentItemId);
}

/// <summary>
/// Gets the given content item's display URL.
/// </summary>
[Obsolete($"Use {nameof(GetItemDisplayUrl)} instead as this method does not need to be async.")]
public static Task<string> GetItemDisplayUrlAsync(this IOrchardHelper orchardHelper, ContentItem contentItem) =>
Task.FromResult(orchardHelper.GetItemDisplayUrl(contentItem));

/// <summary>
/// Gets the given content item's display URL.
/// </summary>
[SuppressMessage("Design", "CA1055:URI-like return values should not be strings", Justification = "It only returns relative URL.")]
public static string GetItemDisplayUrl(this IOrchardHelper orchardHelper, ContentItem contentItem) =>
orchardHelper.GetItemDisplayUrl(contentItem?.ContentItemId);

/// <summary>
/// Gets the given content item's display URL.
/// </summary>
Expand Down

0 comments on commit 183b4b2

Please sign in to comment.