.OfType<T>() (#17639)
* Implement GetContentTypeAliasForType which will replace the need for .OfType<T>(); * Refactor EnumerateAncestorsOrSelfInternal to be generic and extracting checks * Add types to implementation referencing the old non-generic method * Using * Replace Ancestors.OfType<T> implementation * Refactor EnumerateDescendantsOrSelfInternal to be generic * Fixing references by adding IPublishedContent type param * Cleanup + removing unused method * Replace Descendants.OfType<T> implementation * Remove unnecessary enumeration * Updating Children.OfType<T>() implementation * Adding correct types * Fixing SiblingsAndSelf implementation * Refactor TryYieldSelfOfType * Remove nested checks * Add comments and retrieval of content type alias from T in the private helper methods * Simplify implementation based on review comments * Add case when you get all root keys without a type * Refactoring * Renaming + review comments * Rewrite SiblingsAndSelf --------- Co-authored-by: kjac <kja@umbraco.dk>
Umbraco CMS
Umbraco is a free and open source .NET content management system. Our mission is to help you deliver delightful digital experiences by making Umbraco friendly, simpler and social.
Learn more at umbraco.com
Looking to install Umbraco?
You can get started using the following commands on Windows, Linux and MacOS (after installing the .NET Runtime and SDK):
dotnet new install Umbraco.Templates
dotnet new umbraco --name MyProject
cd MyProject
dotnet run
Documentation
Our comprehensive documentation takes you from the fundamentals on how to start with Umbraco to deploying it to production.
Some important documentation links to get you started:
- Installing Umbraco CMS
- Getting to know Umbraco
- Tutorials for creating a basic website and customizing the editing experience
Get help
If you need a bit of feedback while building your Umbraco projects, we are chatty on Discord. Our Discord server serves both a social space but also has channels for questions and answers. Feel free to lurk or join in with your own questions. Or just post your daily Wordle score, up to you!
Looking to contribute back to Umbraco?
You came to the right place! Our GitHub repository is available for all kinds of contributions:
Umbraco is contribution-focused and community-driven. If you want to contribute back to the Umbraco source code, please check out our guide to contributing.
