Created
May 2, 2012 07:51
-
-
Save odinserj/2574877 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public DeliveryService(ModelContext context) | |
{ | |
_modelContext = context; | |
_itemSender = context.Get<EmailDeliverItemSender>(); | |
if (TestMode) | |
{ | |
_itemSender = context.Get<FileDeliveryItemSender>(); | |
} | |
} | |
// Лучше так: | |
public DeliveryService(ModelContext context, IDeliverItemSender sender) | |
{ | |
_modelContext = context; | |
_itemSender = sender; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment