-
Notifications
You must be signed in to change notification settings - Fork 352
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
Enable skip writing default vocabulary annotation #2202
Conversation
bf416d3
to
d1a3188
Compare
This version always omits writing the value in xml if it matches the default. I'm concerned about this design for several reasons:
|
/// </summary> | ||
/// <param name="term">The given term.</param> | ||
/// <returns>Null or the build Edm value expression.</returns> | ||
public static IEdmExpression GetDefaultValueExpression(this IEdmTerm term) |
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.
src/Microsoft.OData.Edm/Csdl/Semantics/CsdlSemanticsVocabularyAnnotation.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.OData.Edm/Csdl/Serialization/EdmModelCsdlSchemaXmlWriter.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.OData.Edm/Vocabularies/Annotations/EdmVocabularyAnnotation.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.OData.Edm/Vocabularies/Annotations/EdmVocabularyAnnotation.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.OData.Edm/Vocabularies/Annotations/IEdmTermExtensions.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.OData.Edm/Vocabularies/Annotations/IEdmTermExtensions.cs
Outdated
Show resolved
Hide resolved
"</edmx:DataServices>" + | ||
"</edmx:Edmx>"; | ||
// Parse into CSDL | ||
var model = CsdlReader.Parse(XElement.Parse(csdl).CreateReader()); |
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.
The XmlReader
returned by CreateReader
implements IDisposable
and should be wrapped in a using
block
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.
This feedback also applies to other new tests
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
Merged at 0fc80da |
This PR is the continue of the PR #2173
Description
Briefly describe the changes of this pull request.
Checklist (Uncheck if it is not completed)
Additional work necessary
If documentation update is needed, please add "Docs Needed" label to the issue and provide details about the required document change in the issue.