xchellx Posted January 21, 2022 Posted January 21, 2022 How much parts of a plugin needs to be public? Like, what needs to be public so paint.net can see it from the assembly? As in: SaveConfigWidget: public or can be internal? SaveConfigToken: public or can be internal? IPluginSupportInfo: public or can be internal? IFileTypeFactory: public or can be internal? FileType: public or can be internal? Quote
xchellx Posted February 2, 2022 Author Posted February 2, 2022 Bump - I would really like an answer to this, as I care about the encapsulation of my classes (neatness and code organization) Quote
otuncelli Posted February 2, 2022 Posted February 2, 2022 IFileTypeFactory , FileType , IPluginSupportInfo constructors must be public, classes can be internal. But I would leave classes as public too, just to make sure Paint.NET is able to create instances of these if its plugin loading logic changes in the future for some reason. Why are we developing these plugins if Paint.NET won't be able to see them, right? 😀 I haven't used SaveConfig* classes so far but SaveConfigWidget is a user control and its instance created by you on OnCreateSaveConfigWidgetT method, not by Paint.NET. So, I assume, it can be public/private/internal. Same for SaveConfigToken, it's instance created by you on OnCreateDefaultSaveConfigTokenT, not by Paint.NET. 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.