Jump to content

How much of a plugin must be public?


Recommended Posts

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?

Link to comment
Share on other sites

  • 2 weeks later...

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.

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...