Example #1
0
 public DvdNameContext(char strategyTypeIn)
 {
     switch (strategyTypeIn) {
        case 'C' :
      this.dvdNameStrategy = new DvdNameAllCapStrategy();
      break;
        case 'E' :
      this.dvdNameStrategy = new DvdNameTheAtEndStrategy();
      break;
        case 'S' :
      this.dvdNameStrategy = new DvdNameReplaceSpacesStrategy();
      break;
        default  :
      this.dvdNameStrategy = new DvdNameTheAtEndStrategy();
             break;
        }
 }
Example #2
0
        public DvdNameContext(char strategyTypeIn)
        {
            switch (strategyTypeIn)
            {
            case 'C':
                this.dvdNameStrategy = new DvdNameAllCapStrategy();
                break;

            case 'E':
                this.dvdNameStrategy = new DvdNameTheAtEndStrategy();
                break;

            case 'S':
                this.dvdNameStrategy = new DvdNameReplaceSpacesStrategy();
                break;

            default:
                this.dvdNameStrategy = new DvdNameTheAtEndStrategy();
                break;
            }
        }