-
Notifications
You must be signed in to change notification settings - Fork 7
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
Chore(revit): Refactor material cache to ToHost ToSpeckle singletons #262
Merged
oguzhankoral
merged 6 commits into
dev
from
oguzhan/cnx-511-refactor-the-mega-singleton-in-revit
Sep 25, 2024
Merged
Chore(revit): Refactor material cache to ToHost ToSpeckle singletons #262
oguzhankoral
merged 6 commits into
dev
from
oguzhan/cnx-511-refactor-the-mega-singleton-in-revit
Sep 25, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #262 +/- ##
========================================
- Coverage 8.46% 8.46% -0.01%
========================================
Files 229 231 +2
Lines 4546 4548 +2
Branches 553 550 -3
========================================
Hits 385 385
- Misses 4144 4146 +2
Partials 17 17 ☔ View full report in Codecov by Sentry. |
clairekuang
reviewed
Sep 23, 2024
Converters/Revit/Speckle.Converters.RevitShared/Helpers/RevitToSpeckleCacheSingleton.cs
Outdated
Show resolved
Hide resolved
…or-the-mega-singleton-in-revit # Conflicts: # Connectors/Revit/Speckle.Connectors.RevitShared/Operations/Receive/RevitHostObjectBuilder.cs # Connectors/Revit/Speckle.Connectors.RevitShared/Operations/Send/RevitRootObjectBuilder.cs # Converters/Revit/Speckle.Converters.RevitShared/ToSpeckle/Raw/MaterialConversionToSpeckle.cs
didimitrie
approved these changes
Sep 25, 2024
oguzhankoral
deleted the
oguzhan/cnx-511-refactor-the-mega-singleton-in-revit
branch
September 25, 2024 14:27
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We have now 2 singleton classes ^_____^
I couldn't go further to simplify it more, obviously Revit is different. Materials need to go back and forth between connector and converter.
PS: Refactored (splitted)
MaterialConversionToSpeckle
class into 2. Because it used in 2 different places and one of the return value was always useless, there was unnecessary conversion always.@adamhathcock not sure is there a way to register an instance in
RevitHostObjectBuilder
that will be used only in that function (also in converter) then it will disposed instead using singleton and clearing the dictionary. Let me know if you have elegant way.