Closed ewisted closed 4 years ago
Hi @ewisted great catch!. It isn't because of any particular reasons that WMI objects weren't taken into accout for conversion. Just it was a functionality that wasn't implemented. You can send the PR so I can build a ner version. Thanks!
Hey @nicoriff thanks for the quick reply. I've submitted the fix in Added testing and logic for recursively adding WMI objects as properties #18. Let me know if any changes need to be made.
Love the project btw. I was running into issues trying to run WMI queries asynchronously on multiple threads, but it works flawlessly with ORMi.
Thanks!. Just merged the PR you sent me. I'm glad you find ORMi useful and you are welcome to contribute whenever you want.
I ran across this exception when trying to query for a WMI object with other WMI objects as properties. The specific instance is Win32_UserProfile.
As you can see in the docs, it has properties of
Win32_FolderRedirectionHealth
. My first thought was to treat it like you would serializing an object from JSON, where you have the properties as follows-And for the properties model, it would look like this-
Using this data model and passing
UserProfile
as a type parameter toQueryAsync
results in the following exception-I've already forked the repo and fixed this with a little recursion, but I was wondering if this is a known issue or a design choice that this functionality was left out? Or is there a better way built in to handle this that I don't know about?