예제 #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;
        }
 }
예제 #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;
            }
        }