Merged
Conversation
4c56873 to
550da59
Compare
zengin
reviewed
Dec 1, 2020
9c353d3 to
51e546c
Compare
nikithauc
reviewed
Dec 2, 2020
...pewriter.Test/TestDataJava/com/microsoft/graph/requests/extensions/UserReferenceRequest.java
Outdated
Show resolved
Hide resolved
nikithauc
reviewed
Dec 2, 2020
...pewriter.Test/TestDataJava/com/microsoft/graph/requests/extensions/UserReferenceRequest.java
Outdated
Show resolved
Hide resolved
09dcf6a to
c886969
Compare
nikithauc
reviewed
Dec 2, 2020
...writer.Test/TestDataJava/com/microsoft/graph/requests/extensions/GroupCollectionRequest.java
Show resolved
Hide resolved
zengin
approved these changes
Dec 3, 2020
Comment on lines
+195
to
+202
| var entityContainerProperties = m.EntityContainer.Properties.Where(propertiesFilter); | ||
| var namespaceProperties = m.Namespaces | ||
| .SelectMany(x => x.Classes) | ||
| .SelectMany(x => x.Properties.Where(propertiesFilter)); | ||
| return m.EntityContainer.Properties.OfType<OdcmSingleton>() | ||
| .SelectMany(x => x.Projection.Type.AsOdcmClass().Properties.Where(propertiesFilter)) | ||
| .Union(entityContainerProperties.Any() ? entityContainerProperties : new List<OdcmProperty>()) | ||
| .Union(namespaceProperties.Any() ? namespaceProperties : new List<OdcmProperty>()); |
Contributor
There was a problem hiding this comment.
not blocking, but I wonder what you think about this in terms of reading the logic faster:
Suggested change
| var entityContainerProperties = m.EntityContainer.Properties.Where(propertiesFilter); | |
| var namespaceProperties = m.Namespaces | |
| .SelectMany(x => x.Classes) | |
| .SelectMany(x => x.Properties.Where(propertiesFilter)); | |
| return m.EntityContainer.Properties.OfType<OdcmSingleton>() | |
| .SelectMany(x => x.Projection.Type.AsOdcmClass().Properties.Where(propertiesFilter)) | |
| .Union(entityContainerProperties.Any() ? entityContainerProperties : new List<OdcmProperty>()) | |
| .Union(namespaceProperties.Any() ? namespaceProperties : new List<OdcmProperty>()); | |
| return m.EntityContainer.Properties | |
| .Union(m.Namespaces.SelectMany(x => x.Classes) | |
| .SelectMany(x => x.Properties)) | |
| .Union(m.EntityContainer.Properties.OfType<OdcmSingleton>() | |
| .SelectMany(x => x.Projection.Type.AsOdcmClass().Properties)) | |
| .Where(propertiesFilter); |
Member
Author
There was a problem hiding this comment.
thanks for the suggestion. After going back and forth I forgot to take a step back on this one.
I just pushed a new commit improving upon your suggestion, let me know what you think
MIchaelMainer
approved these changes
Dec 4, 2020
zengin
approved these changes
Dec 4, 2020
This file contains hidden or 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
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.
updates & related to:
microsoftgraph/msgraph-sdk-java#576