Adding a property does not interfere with the interaction of classes with existing clients, so it really seems "the easiest."
More important, however, is the function of the new property. Is this logically part of an existing class? Change the class. If not, then the extension method may be preferable, but then the problem becomes the visibility of the extension method and the volume of its clients.
As always, complexity is the enemy. In this case, it sounds as if the singleton is a very complex solution, and the extension method is “miss” and “miss” depending on the volume and visual problems. Changing a class is the easiest and is likely to facilitate long-term maintenance.
UPDATE: note that extension methods are static, and this makes it difficult for an extension method to store data at any time since this property will be output.
SECOND UPDATE: if you have access to the source for the class, consider making it an incomplete class, and put the new property in a separate file, but part of the same partial class. This allows you to separate it from the main part of the class for maintenance purposes and will work with most ORMs. However, there is a limitation that partial class members must be in the same assembly.
source share