Add T Create(Guid) to ILcmFactory<T>#313
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... |
jasonleenaylor
left a comment
There was a problem hiding this comment.
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. |
jasonleenaylor
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! all files reviewed, all discussions resolved (waiting on @hahn-kev)
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