also Mark Seemann's comment which seems to allude to use of the strategy pattern in place of an "evil" enum:
but I would change the Channel type to an abstract type that has a GetProductCode method that takes an IProduct as input. Then you could have two concrete implementations (RetailChannel and TradeChannel) the implement that method differently.
No comments:
Post a Comment