-
Notifications
You must be signed in to change notification settings - Fork 351
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 optional annotation location parameter to AddVocabularyAnnotation #1941
base: release-7.x
Are you sure you want to change the base?
Conversation
/// <param name="model">The model the annotation is added to.</param> | ||
/// <param name="annotation">The annotation to be added.</param> | ||
/// <param name="location">The location to add the allocation</param> | ||
public static void AddVocabularyAnnotation(this EdmModel model, IEdmVocabularyAnnotation annotation, Csdl.EdmVocabularyAnnotationSerializationLocation location) |
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.
IEdmVocabularyAnnotation annotation, Csdl.EdmVocabularyAnnotationSerializationLocation location [](start = 72, length = 95)
It's not a deal for me to add such extensions. Because, there's only two line codes .
but, i have a question here: How can handle this scenario:
annotation itself has the Location setting, and that setting is different with the "location" given?
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.
I wasn't aware the IEdmVocabularyAnnotation has a location. Will look into it.
/// <param name="model">The model the annotation is added to.</param> | ||
/// <param name="annotation">The annotation to be added.</param> | ||
/// <param name="location">The location to add the allocation</param> | ||
public static void AddVocabularyAnnotation(this EdmModel model, IEdmVocabularyAnnotation annotation, Csdl.EdmVocabularyAnnotationSerializationLocation location) |
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.
nit: It's probably be good to add the Csdl
namespace with a using
statement
public static void AddVocabularyAnnotation(this EdmModel model, IEdmVocabularyAnnotation annotation, Csdl.EdmVocabularyAnnotationSerializationLocation location) | ||
{ | ||
model.AddVocabularyAnnotation(annotation); | ||
annotation.SetSerializationLocation(model, location); |
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.
I'd love to see a unit test for this
Issues
This pull request fixes issue #xxx.
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.