I have a Windows service, that take a document(xml,csv...) and turns it in to a serializable class. This is more or less standard for our customers. The issue is that as more and more customers are added, more and more needs small variations to the data. As of know this is handlede in a customer validation region, and a whole lot if it statements like
if(customer.Equals("Customer1"))
{
object.field = "Custom1Data"
}
if(customer.Equals("Customer2"))
{
object.field = "CustomData"
}
And so on.
This is ugly and kind of hard to maintain. Can anybody sugest a strategy, to keep the code clean, and more maintainable?
Aucun commentaire:
Enregistrer un commentaire