Пример #1
0
 public MarketingFirm(ISweepstakesManager sweepstakesManager)
 {
     this.sweepstakesManager = sweepstakesManager;
 }
Пример #2
0
 public void Marketingfirm(ISweepstakesManager manager)
 {
     _manager = manager;
 }
 public MarketingFirm(ISweepstakesManager manager)
 {
     this.manager = manager;
 }
Пример #4
0
 //Instantiates a MarketingFirm with the data structure of
 //passed SweepstakesManger.
 public void CreateMarketingFirm(ISweepstakesManager managerType)
 {
     myMarketingFirm = new MarketingFirm(managerType);
 }
Пример #5
0
 public void Marketing(ISweepstakesManager sweepstakesManager)
 {
     this.sweepstakesManager = sweepstakesManager;
 }
Пример #6
0
 public MarketingFirm(ISweepstakesManager managementChoice)
 {
     this.managementChoice = managementChoice;
     numberOfSweepstakes   = UserInterface.GetUserIntInput("How many Sweepstakes would you like to run?");
 }
Пример #7
0
 //Methods
 //FINISH METHOD INJECTION COMMENT BELOW FOR 5 POINTS
 public void CreateMarketingFirmWithManager(ISweepstakesManager manager) //Method injection Injecting a method that... FINISH THIS!!
 {
     MarketingFirm firm1 = new MarketingFirm(manager);
 }
Пример #8
0
 public MarketingFirm(ISweepstakesManager iSweepstakesManager)
 {
     this.iSweepstakesManager = iSweepstakesManager;
 }
Пример #9
0
 //Constructor
 public MarketingFirm(ISweepstakesManager manager) //dependancy injection in order to filter managers choice of ordering sweepstakes, either stack(push, pop) or queue(onqueue, dequeue)
 {
     _manager = manager;
 }
Пример #10
0
 public void CreateMarketingFirmWithManager() //In this method, Dependency Injection is used to take the creation of a SweepstakesManager out of MarketingFirm or Simulation and have its own Factory. This loosens the tight coupling which would've happened.
 {
     ISweepstakesManager manager       = SweepstakesManagerFactory.CreateSweepstakesManager();
     MarketingFirm       marketingFirm = new MarketingFirm(manager);
 }
Пример #11
0
 public MarketingFirm(ISweepstakesManager sweepstakesManager)
 {
     //Dependacy starts in the constructor by saying we need a class that is a ISweepstakesManager
     //to be instasiated
     manager = sweepstakesManager;
 }
Пример #12
0
 public MarketingFirm(ISweepstakesManager sweepstakesManager)
 {
     marketingFirmName       = "";
     this.sweepstakesManager = sweepstakesManager;
 }
 //constructor injection
 public MarketingFirm(ISweepstakesManager managementSystem)
 {
     this.managementSystem = managementSystem;
 }
Пример #14
0
 public MarketingFirm(ISweepstakesManager manager)
 {
     this.manager = manager;
     //This dependency injection (DI) uses constructor injection.
 }