Skip to content

Inheritance update#134

Open
CodeAnimal wants to merge 2 commits intoandrewdavey:masterfrom
CodeAnimal:inheritance-update
Open

Inheritance update#134
CodeAnimal wants to merge 2 commits intoandrewdavey:masterfrom
CodeAnimal:inheritance-update

Conversation

@CodeAnimal
Copy link

Update the accessibility levels of the EmailParser and EmailViewRenderer classes to be virtual, to aid in creating custom implementations that tweak the function of the default EmailParser and EmailViewRenderer implementations.

Also update the Email.ImageEmbedder field to be protected internal to allow make implementing customer IEmailParsers and IEmailViewRenderers a little easier, as it needs access to the ImageEmbedder field to get the embedded images, this way now we can create a customer EmailBase class that inherits the Email class that exposes the ImageEmbedder field internally.

When implementing a custom EmailParser or EmailViewRenderer it is often useful to be able to derive the class to tweak the default implementation, and being able to override the interface methods on the base class allows this to be done effectively.
…nternal.

Change the accessibility level to protected internal to make implementing custom IEmailParser and IEmailViewRenderer implementations easier, as access to the ImageEmbedder field is needed to render embedded images.

An alternative could be to set the level to public, allowing implementing customer renders even easier.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant