-
-
Notifications
You must be signed in to change notification settings - Fork 13
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 T Create(Guid) to ILcmFactory<T> #313
base: master
Are you sure you want to change the base?
Conversation
implement via code generation remove ICmPicture Create method
Is this a real use case we want to support? I can't imagine a case where you want to create an unowned object with a guid that you don't know... |
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.
So after looking at this and seeing that you only had to remove one I realized the more common pattern for this is the create which takes a Guid and an owner. It also you might something like that in practice. See the FactoryAdditions for LexRefTypeFactory for an example.
Reviewed 8 of 8 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @hahn-kev)
Well I didn't support it originally (I threw as well), but the tests for ICmPicture had an explicit test for passing in an empty GUID. So in order to not break existing code I kept that test passing. |
Right now to make a given object with a specific GUID you need to use a specialized factory method, this PR adds a low lever API to make any object with a predefined GUID.
There was a conflict with ICmPictureFactory because it declared it's own version with the same signature which I then had to remove from the actual CmPictureFactory.
This change is