-
Notifications
You must be signed in to change notification settings - Fork 304
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
Add extensions for Part class and associated classes #255
Add extensions for Part class and associated classes #255
Conversation
@@ -286,6 +286,8 @@ public virtual void RegisterExtensions(IExtensionManager manager) | |||
manager.Register(nameof(SolidSolidCutUtils.GetSolidsBeingCut), _ => SolidSolidCutUtils.GetSolidsBeingCut(_element)); | |||
manager.Register(nameof(SolidSolidCutUtils.IsAllowedForSolidCut), _ => SolidSolidCutUtils.IsAllowedForSolidCut(_element)); | |||
manager.Register(nameof(SolidSolidCutUtils.IsElementFromAppropriateContext), _ => SolidSolidCutUtils.IsElementFromAppropriateContext(_element)); | |||
manager.Register(nameof(PartUtils.AreElementsValidForCreateParts), context => Variants.Single(PartUtils.AreElementsValidForCreateParts(context, [_element.Id]))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove Variants.Single from extensions. Return object as it is. Variants.Single required only for resolver
manager.Register(nameof(PartUtils.GetChainLengthToOriginal), _ => Variants.Single(PartUtils.GetChainLengthToOriginal(part))); | ||
manager.Register(nameof(PartUtils.GetMergedParts), context => | ||
{ | ||
if (PartUtils.IsMergedPart(part)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this check. Better to show exception message instead of empty object
# Conflicts: # source/RevitLookup/Core/ComponentModel/Descriptors/ElementDescriptor.cs
Summary of the Pull Request
I added support to some methods of PartUtils class. Most of them are extension of Part, one is of Element ans one more is of PartMaker
Description:
Quality Checklist