jeudi 21 juillet 2016

Implementing Decorator pattern correctly

I have a class to do registry operations like: Read, Write, Search, SearchRecursively, ParseRegistryPath.

I added a decorator to Read and Write Encrypted values to Registry. In this decorator, I only have Methods Read() and Write(). I have left out other methods since they have nothing to do with encryption.

So I am wondering if this is right way of using Decorator pattern ? Do I have implement all methods again or only the ones required to like I did here ? What is the best practice ?

Aucun commentaire:

Enregistrer un commentaire