How to upgrade component to Umbraco 10/13?

Hi

I have a couple of classes using the ContentService and Content publishedeventArgs, inheriting IComponent in a very old site.

What is the correct way to upgrade this class/method to the appropriate Umbraco 10 or 13 way?

Thanks

Given that IComponent still exists in v10/13, I am unsure how to help. I will encourage you to add more information to your question so people can help you better, here’s a guide to help you improve the question: