-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Description
This PR will remove some public extension methods from the Umbraco code base when Umbraco 17 is released.
When removed, clearly none will be used by Umbraco itself, but there may be some, though likely not many, implementations that have made use them. If that's the case, you'll get a compile error on upgrading to Umbraco 17.
Version
Umbraco 17
Previous behavior
Specific public extension methods are available (though obsoleted from 15.3).
New behavior
Specific public extension methods will not be available.
Type of breaking change
- Binary incompatible: Existing binaries may encounter a breaking change in behavior, such as failure to load/execute or different run-time behavior.
- Source incompatible: Source code may encounter a breaking change in behavior when targeting the new runtime/component/SDK, such as compile errors or different run-time behavior.
Reason for change
To ease maintenance efforts we prefer to remove code that we are both no longer using in the product and that offer little value to implementors.
Recommended action
In the, likely rare, cases of using the extension methods, re-implement them within your own project. Some are rather legacy and as such there are better options available now in the C# language itself. If you want to retain them you of course are welcome to find them in the v15/dev branch of the Umbraco code base and copy them into your own solution.
Affected APIs
The following extension methods will be removed:
GetAssemblyFileavailable as an extension method ofAssembly.ToSingleItemCollectionavailable as an extension method ofICollection.- All extension methods available on
DataTable. RetryUntilSuccessOrTimeoutandRetryUntilSuccessOrMaxAttemptsavailable as extension methods on delegates.ToQueryStringavailable as an extension method ofIDictionary.HasFlagAnyavailable as an extension method on enums.- Expression extensions for boolean logic.
Deconstructavailable as an extension method ofKeyValuePair.AsEnumerable,ContainsKeyandGetValueavailable as extension methods onNameValueCollection.SafeCast,ToDictionaryandDisposeIfDisposableavailable as extension methods ofobject.SanitizeThreadCultureavailable as an extension method ofThread.