Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello
I have a WindowsService that sends sms .
This service can send six type of message .
For example can send sms when the temperature of a sensor is increased
of the humidity of a sensor is increased.
but one of my customer wants only temperature or one of the other my customer wants all of them .
I want to solve it by one Design Pattern .
What Design Pattern can be good for me ?
pleas help me.
Posted
Comments
BillWoodruff 2-Oct-14 5:17am    
You got a solid answer to your question from Sinisa. I am curious to ask you why you are required to approach this in a "formal" way by implementing a DesignPattern. While a DesignPattern implementation may be just what is needed here because of issues of future extensbility, maintenance, compatibility with the way other code is written, etc., the nature of this problem does lend itself to a very simple code solution.

1 solution

Try decorator.[^]

For each client add (decorate) only functionality that he needs / wants
 
Share this answer
 
Comments
CPallini 2-Oct-14 4:47am    
5.
BillWoodruff 2-Oct-14 5:11am    
+5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900