affederaffe / Tmds.DBus.SourceGenerator

A roslyn source generator for creating proxies targeting the Tmds.DBus.Protocol API
MIT License
7 stars 5 forks source link

Connection property is null despite successful connection #20

Closed jmacato closed 3 months ago

jmacato commented 3 months ago

Just noticed on the latest commit that Connection prop is always null. Maybe we missed setting it somewhere?

affederaffe commented 3 months ago

For handlers, Connection is an abstract property. Did you implement it correctly?

jmacato commented 3 months ago

Ahh do i need to manually pass it? Thought IMethodHandler does that for us

Yep need to manually pass it, though i wonder if we should make it automatic perhaps?

affederaffe commented 3 months ago

I mean you have to pass the Connection instance somewhere, the alternative would be to require it in the constructor. Though in my opinion, it's better to have it as an abstract property as we very likely need the property in our code anyway.

jmacato commented 3 months ago

@affederaffe makes sense, we can consider this issue fixed :pray: