Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V14: Deleted code marked as obsolete for V14 #15998

Merged
merged 30 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
9f6254d
Obsoletions related to Delivery API
elit0451 Apr 4, 2024
f05fe4a
Fix TypeLoader and TypeFinder tests
elit0451 Apr 4, 2024
f8f19d0
Remove obsolete and default implementations of IFileSource and IFileT…
elit0451 Apr 4, 2024
201318e
More Delivery API related obsoletions
elit0451 Apr 4, 2024
05f6d86
VariationContextAccessor related
elit0451 Apr 4, 2024
77b4417
ValueFactories obsoletion and fix references
elit0451 Apr 4, 2024
6d78569
ValueSetBuilders obsoletions
elit0451 Apr 4, 2024
ab7c665
ValueConverters obsoletions
elit0451 Apr 4, 2024
c761a6a
Other obsolete ctors and methods
elit0451 Apr 4, 2024
99602c8
Forgotten VariationContextAccessor obsoletion
elit0451 Apr 4, 2024
5f5ef73
More obsoletions
elit0451 Apr 4, 2024
910ae7e
XPath related obsoletions
elit0451 Apr 5, 2024
39c486e
Revert XmlHelper changes
elit0451 Apr 5, 2024
778ff25
Delete RenamedRootNavigator and its tests
elit0451 Apr 5, 2024
29b935b
Fix test
elit0451 Apr 5, 2024
2d5f9e6
XmlHelper obsoletion
elit0451 Apr 5, 2024
e110c10
Return null instead of GetXPathValue
elit0451 Apr 5, 2024
cc765e8
Obsolete entire class instead
elit0451 Apr 5, 2024
b7689e7
Remove XPath obsoletions from IPublishedCache
elit0451 Apr 5, 2024
ae33769
Remove XPath-related if-block that is no longer needed
elit0451 Apr 5, 2024
46cd03b
Change obsolete msg for classes needed for NuCache
elit0451 Apr 5, 2024
682ae8c
Moving classes to NuCache and making them internal
elit0451 Apr 5, 2024
8e072d8
Remove more XPath-related obsoletions
elit0451 Apr 5, 2024
ef58a7b
Remove NavigableNavigator and its tests
elit0451 Apr 5, 2024
6724f7b
Cleanup
elit0451 Apr 5, 2024
69d5bd8
Remove Xpath references from tests
elit0451 Apr 5, 2024
015d4f6
Merge remote-tracking branch 'origin/v14/dev' into v14/feature/obsole…
elit0451 Apr 5, 2024
d8af831
Revert interface deletion in MediaCache
elit0451 Apr 5, 2024
a4e0b3e
Using XOR operation
elit0451 Apr 8, 2024
0d1a75a
Merge remote-tracking branch 'origin/v14/dev' into v14/feature/obsole…
elit0451 Apr 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models.DeliveryApi;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Services;

namespace Umbraco.Cms.Api.Delivery.Controllers.Content;

Expand All @@ -16,32 +13,6 @@ public class ByIdContentApiController : ContentApiItemControllerBase
{
private readonly IRequestMemberAccessService _requestMemberAccessService;

[Obsolete($"Please use the constructor that does not accept {nameof(IPublicAccessService)}. Will be removed in V14.")]
public ByIdContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
IPublicAccessService publicAccessService)
: this(
apiPublishedContentCache,
apiContentResponseBuilder,
StaticServiceProvider.Instance.GetRequiredService<IRequestMemberAccessService>())
{
}

[Obsolete($"Please use the constructor that does not accept {nameof(IPublicAccessService)}. Will be removed in V14.")]
public ByIdContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
IPublicAccessService publicAccessService,
IRequestMemberAccessService requestMemberAccessService)
: this(
apiPublishedContentCache,
apiContentResponseBuilder,
requestMemberAccessService)
{
}

[ActivatorUtilitiesConstructor]
public ByIdContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models.DeliveryApi;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Services;
using Umbraco.Extensions;

namespace Umbraco.Cms.Api.Delivery.Controllers.Content;
Expand All @@ -17,32 +14,6 @@ public class ByIdsContentApiController : ContentApiItemControllerBase
{
private readonly IRequestMemberAccessService _requestMemberAccessService;

[Obsolete($"Please use the constructor that does not accept {nameof(IPublicAccessService)}. Will be removed in V14.")]
public ByIdsContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
IPublicAccessService publicAccessService)
: this(
apiPublishedContentCache,
apiContentResponseBuilder,
StaticServiceProvider.Instance.GetRequiredService<IRequestMemberAccessService>())
{
}

[Obsolete($"Please use the constructor that does not accept {nameof(IPublicAccessService)}. Will be removed in V14.")]
public ByIdsContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
IPublicAccessService publicAccessService,
IRequestMemberAccessService requestMemberAccessService)
: this(
apiPublishedContentCache,
apiContentResponseBuilder,
requestMemberAccessService)
{
}

[ActivatorUtilitiesConstructor]
public ByIdsContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Asp.Versioning;

Check notice on line 1 in src/Umbraco.Cms.Api.Delivery/Controllers/Content/ByRouteContentApiController.cs

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (v14/dev)

✅ No longer an issue: Constructor Over-Injection

ByRouteContentApiController is no longer above the threshold for number of arguments. This constructor has too many arguments, indicating an object with low cohesion or missing function argument abstraction. Avoid adding more arguments.

Check notice on line 1 in src/Umbraco.Cms.Api.Delivery/Controllers/Content/ByRouteContentApiController.cs

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (v14/dev)

✅ No longer an issue: Constructor Over-Injection

ByRouteContentApiController is no longer above the threshold for number of arguments. This constructor has too many arguments, indicating an object with low cohesion or missing function argument abstraction. Avoid adding more arguments.
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -20,44 +20,7 @@
private readonly IRequestPreviewService _requestPreviewService;
private readonly IRequestMemberAccessService _requestMemberAccessService;
private const string PreviewContentRequestPathPrefix = $"/{Constants.DeliveryApi.Routing.PreviewContentPathPrefix}";

Check notice on line 23 in src/Umbraco.Cms.Api.Delivery/Controllers/Content/ByRouteContentApiController.cs

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (v14/dev)

ℹ Getting worse: Constructor Over-Injection

ByRouteContentApiController increases from 7 to 8 arguments, threshold = 5. This constructor has too many arguments, indicating an object with low cohesion or missing function argument abstraction. Avoid adding more arguments.
[Obsolete($"Please use the constructor that does not accept {nameof(IPublicAccessService)}. Will be removed in V14.")]
public ByRouteContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
IPublicAccessService publicAccessService,
IRequestRoutingService requestRoutingService,
IRequestRedirectService requestRedirectService,
IRequestPreviewService requestPreviewService)
: this(
apiPublishedContentCache,
apiContentResponseBuilder,
requestRoutingService,
requestRedirectService,
requestPreviewService,
StaticServiceProvider.Instance.GetRequiredService<IRequestMemberAccessService>())
{
}

[Obsolete($"Please use the constructor that does not accept {nameof(IPublicAccessService)}. Will be removed in V14.")]
public ByRouteContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
IPublicAccessService publicAccessService,
IRequestRoutingService requestRoutingService,
IRequestRedirectService requestRedirectService,
IRequestPreviewService requestPreviewService,
IRequestMemberAccessService requestMemberAccessService)
: this(
apiPublishedContentCache,
apiContentResponseBuilder,
requestRoutingService,
requestRedirectService,
requestPreviewService,
requestMemberAccessService)
{
}

[Obsolete($"Please use the constructor that accepts {nameof(IApiContentPathResolver)}. Will be removed in V15.")]
public ByRouteContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.DeliveryApi;
using Umbraco.Cms.Core.Models.PublishedContent;
Expand All @@ -21,20 +19,6 @@ public class QueryContentApiController : ContentApiControllerBase
private readonly IRequestMemberAccessService _requestMemberAccessService;
private readonly IApiContentQueryService _apiContentQueryService;

[Obsolete($"Please use the constructor that accepts {nameof(IRequestMemberAccessService)}. Will be removed in V14.")]
public QueryContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilderBuilder,
IApiContentQueryService apiContentQueryService)
: this(
apiPublishedContentCache,
apiContentResponseBuilderBuilder,
apiContentQueryService,
StaticServiceProvider.Instance.GetRequiredService<IRequestMemberAccessService>())
{
}

[ActivatorUtilitiesConstructor]
public QueryContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilderBuilder,
Expand Down
18 changes: 0 additions & 18 deletions src/Umbraco.Cms.Api.Delivery/Filters/SwaggerDocumentationFilter.cs

This file was deleted.

11 changes: 0 additions & 11 deletions src/Umbraco.Cms.Api.Delivery/Services/ApiContentQueryProvider.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Examine;

Check notice on line 1 in src/Umbraco.Cms.Api.Delivery/Services/ApiContentQueryProvider.cs

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (v14/dev)

✅ No longer an issue: Excess Number of Function Arguments

ExecuteQuery is no longer above the threshold for number of arguments. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
using Examine.Search;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
Expand Down Expand Up @@ -47,18 +47,7 @@
_sortBuilder = new ApiContentQuerySortBuilder(fieldTypes, _logger);

}

Check notice on line 50 in src/Umbraco.Cms.Api.Delivery/Services/ApiContentQueryProvider.cs

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (v14/dev)

ℹ Getting worse: Excess Number of Function Arguments

ExecuteQuery increases from 7 to 8 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
[Obsolete($"Use the {nameof(ExecuteQuery)} method that accepts {nameof(ProtectedAccess)}. Will be removed in V14.")]
public PagedModel<Guid> ExecuteQuery(
SelectorOption selectorOption,
IList<FilterOption> filterOptions,
IList<SortOption> sortOptions,
string culture,
bool preview,
int skip,
int take)
=> ExecuteQuery(selectorOption, filterOptions, sortOptions, culture, ProtectedAccess.None, preview, skip, take);

/// <inheritdoc/>
public PagedModel<Guid> ExecuteQuery(
SelectorOption selectorOption,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Umbraco.Cms.Api.Delivery.Indexing.Selectors;

Check notice on line 1 in src/Umbraco.Cms.Api.Delivery/Services/ApiContentQueryService.cs

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (v14/dev)

✅ No longer an issue: Excess Number of Function Arguments

ExecuteQuery is no longer above the threshold for number of arguments. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Models;
Expand Down Expand Up @@ -36,16 +36,7 @@
_apiContentQueryProvider = apiContentQueryProvider;
_requestPreviewService = requestPreviewService;
}

Check notice on line 39 in src/Umbraco.Cms.Api.Delivery/Services/ApiContentQueryService.cs

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (v14/dev)

ℹ Getting worse: Excess Number of Function Arguments

ExecuteQuery increases from 5 to 6 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
[Obsolete($"Use the {nameof(ExecuteQuery)} method that accepts {nameof(ProtectedAccess)}. Will be removed in V14.")]
public Attempt<PagedModel<Guid>, ApiContentQueryOperationStatus> ExecuteQuery(
string? fetch,
IEnumerable<string> filters,
IEnumerable<string> sorts,
int skip,
int take)
=> ExecuteQuery(fetch, filters, sorts, ProtectedAccess.None, skip, take);

/// <inheritdoc/>
public Attempt<PagedModel<Guid>, ApiContentQueryOperationStatus> ExecuteQuery(
string? fetch,
Expand Down
5 changes: 0 additions & 5 deletions src/Umbraco.Core/Composing/TypeFinder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Concurrent;

Check notice on line 1 in src/Umbraco.Core/Composing/TypeFinder.cs

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (v14/dev)

ℹ Getting worse: Overall Code Complexity

The mean cyclomatic complexity increases from 5.38 to 5.67, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.
using System.Reflection;
using System.Security;
using System.Text;
Expand Down Expand Up @@ -49,11 +49,6 @@
private string[]? _assembliesAcceptingLoadExceptions;
private volatile HashSet<Assembly>? _localFilteredAssemblyCache;

[Obsolete("Please use the constructor taking all parameters. This constructor will be removed in V14.")]
public TypeFinder(ILogger<TypeFinder> logger, IAssemblyProvider assemblyProvider, ITypeFinderConfig? typeFinderConfig = null)
: this(logger, assemblyProvider, null, typeFinderConfig)
{ }

public TypeFinder(ILogger<TypeFinder> logger, IAssemblyProvider assemblyProvider, string[]? additionalExlusionAssemblies, ITypeFinderConfig? typeFinderConfig = null)
{
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
Expand Down
15 changes: 1 addition & 14 deletions src/Umbraco.Core/Configuration/Models/ContentErrorPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ public class ContentErrorPage : ValidatableEntryBase
/// </summary>
public Guid ContentKey { get; set; }

/// <summary>
/// Gets or sets a value for the content XPath.
/// </summary>

[Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public string? ContentXPath { get; set; }

/// <summary>
/// Gets a value indicating whether the <see cref="ContentId" /> field is populated.
/// </summary>
Expand All @@ -38,12 +31,6 @@ public class ContentErrorPage : ValidatableEntryBase
/// </summary>
public bool HasContentKey => ContentKey != Guid.Empty;

/// <summary>
/// Gets a value indicating whether the <see cref="ContentXPath" /> field is populated.
/// </summary>
[Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public bool HasContentXPath => !string.IsNullOrEmpty(ContentXPath);

/// <summary>
/// Gets or sets a value for the content culture.
/// </summary>
Expand All @@ -52,5 +39,5 @@ public class ContentErrorPage : ValidatableEntryBase

internal override bool IsValid() =>
base.IsValid() &&
(HasContentId ? 1 : 0) + (HasContentKey ? 1 : 0) + (HasContentXPath ? 1 : 0) == 1;
(HasContentId ^ HasContentKey);
}
3 changes: 0 additions & 3 deletions src/Umbraco.Core/DeliveryApi/IApiContentQueryService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ namespace Umbraco.Cms.Core.DeliveryApi;
/// </summary>
public interface IApiContentQueryService
{
[Obsolete($"Use the {nameof(ExecuteQuery)} method that accepts {nameof(ProtectedAccess)}. Will be removed in V14.")]
Attempt<PagedModel<Guid>, ApiContentQueryOperationStatus> ExecuteQuery(string? fetch, IEnumerable<string> filters, IEnumerable<string> sorts, int skip, int take);

/// <summary>
/// Returns an attempt with a collection of item ids that passed the search criteria as a paged model.
/// </summary>
Expand Down
4 changes: 0 additions & 4 deletions src/Umbraco.Core/DeliveryApi/NoopApiContentQueryService.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
using Umbraco.Cms.Core.Models;

Check notice on line 1 in src/Umbraco.Core/DeliveryApi/NoopApiContentQueryService.cs

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (v14/dev)

✅ No longer an issue: Excess Number of Function Arguments

ExecuteQuery is no longer above the threshold for number of arguments. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
using Umbraco.Cms.Core.Models.DeliveryApi;
using Umbraco.Cms.Core.Services.OperationStatus;

namespace Umbraco.Cms.Core.DeliveryApi;

public sealed class NoopApiContentQueryService : IApiContentQueryService
{

Check notice on line 8 in src/Umbraco.Core/DeliveryApi/NoopApiContentQueryService.cs

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (v14/dev)

ℹ Getting worse: Excess Number of Function Arguments

ExecuteQuery increases from 5 to 6 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
[Obsolete($"Use the {nameof(ExecuteQuery)} method that accepts {nameof(ProtectedAccess)}. Will be removed in V14.")]
public Attempt<PagedModel<Guid>, ApiContentQueryOperationStatus> ExecuteQuery(string? fetch, IEnumerable<string> filters, IEnumerable<string> sorts, int skip, int take)
=> Attempt.SucceedWithStatus(ApiContentQueryOperationStatus.Success, new PagedModel<Guid>());

/// <inheritdoc />
public Attempt<PagedModel<Guid>, ApiContentQueryOperationStatus> ExecuteQuery(string? fetch, IEnumerable<string> filters, IEnumerable<string> sorts, ProtectedAccess protectedAccess, int skip, int take)
=> Attempt.SucceedWithStatus(ApiContentQueryOperationStatus.Success, new PagedModel<Guid>());
Expand Down
32 changes: 2 additions & 30 deletions src/Umbraco.Core/Deploy/IFileSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,38 +77,13 @@ public interface IFileSource
/// </returns>
Task<long> GetFileLengthAsync(StringUdi udi, CancellationToken token);

// TODO (V14): Remove obsolete methods and default implementations for GetFiles and GetFilesAsync overloads.

/// <summary>
/// Gets files and store them using a file store.
/// </summary>
/// <param name="udis">The UDIs of the files to get.</param>
/// <param name="fileTypes">A collection of file types which can store the files.</param>
[Obsolete("Please use the method overload taking all parameters. This method overload will be removed in Umbraco 14.")]
void GetFiles(IEnumerable<StringUdi> udis, IFileTypeCollection fileTypes);

/// <summary>
/// Gets files and store them using a file store.
/// </summary>
/// <param name="udis">The UDIs of the files to get.</param>
/// <param name="continueOnFileNotFound">A flag indicating whether to continue if a file isn't found or to stop and throw a FileNotFoundException.</param>
/// <param name="fileTypes">A collection of file types which can store the files.</param>
void GetFiles(IEnumerable<StringUdi> udis, bool continueOnFileNotFound, IFileTypeCollection fileTypes)
#pragma warning disable CS0618 // Type or member is obsolete
=> GetFiles(udis, fileTypes);
#pragma warning restore CS0618 // Type or member is obsolete

/// <summary>
/// Gets files and store them using a file store.
/// </summary>
/// <param name="udis">The UDIs of the files to get.</param>
/// <param name="fileTypes">A collection of file types which can store the files.</param>
/// <param name="token">A cancellation token.</param>
/// <returns>
/// The task object representing the asynchronous operation.
/// </returns>
[Obsolete("Please use the method overload taking all parameters. This method overload will be removed in Umbraco 14.")]
Task GetFilesAsync(IEnumerable<StringUdi> udis, IFileTypeCollection fileTypes, CancellationToken token);
void GetFiles(IEnumerable<StringUdi> udis, bool continueOnFileNotFound, IFileTypeCollection fileTypes);

/// <summary>
/// Gets files and store them using a file store.
Expand All @@ -120,8 +95,5 @@ void GetFiles(IEnumerable<StringUdi> udis, bool continueOnFileNotFound, IFileTyp
/// <returns>
/// The task object representing the asynchronous operation.
/// </returns>
Task GetFilesAsync(IEnumerable<StringUdi> udis, IFileTypeCollection fileTypes, bool continueOnFileNotFound, CancellationToken token)
#pragma warning disable CS0618 // Type or member is obsolete
=> GetFilesAsync(udis, fileTypes, token);
#pragma warning restore CS0618 // Type or member is obsolete
Task GetFilesAsync(IEnumerable<StringUdi> udis, IFileTypeCollection fileTypes, bool continueOnFileNotFound, CancellationToken token);
}
15 changes: 2 additions & 13 deletions src/Umbraco.Core/Deploy/IFileTypeCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,7 @@ public interface IFileTypeCollection
/// <returns>
/// <c>true</c> if the file type associated with the specified entity type was found; otherwise, <c>false</c>.
/// </returns>
bool TryGetValue(string entityType, [NotNullWhen(true)] out IFileType? fileType)
{
// TODO (V14): Remove default implementation
if (Contains(entityType))
{
fileType = this[entityType];
return true;
}

fileType = null;
return false;
}
bool TryGetValue(string entityType, [NotNullWhen(true)] out IFileType? fileType);

/// <summary>
/// Determines whether this collection contains a file type for the specified entity type.
Expand All @@ -55,5 +44,5 @@ bool TryGetValue(string entityType, [NotNullWhen(true)] out IFileType? fileType)
/// <returns>
/// The entity types.
/// </returns>
ICollection<string> GetEntityTypes() => Array.Empty<string>(); // TODO (V14): Remove default implementation
ICollection<string> GetEntityTypes();
}
Loading
Loading