Example #1
0
        public IDuck Create(FlyType fly, QuackType quack, SwimType swim)
        {
            IFlying   flying   = _fly.Create(fly);
            IQuacking quacking = _quack.Create(quack);
            ISwimming swimming = _swim.Create(swim);

            return(new UniversalDuck(flying, quacking, swimming));
        }
Example #2
0
        public ISwimming Create(SwimType swim)
        {
            switch (swim)
            {
            case SwimType.Swim:
                return(new Swim());

            case SwimType.NotSwim:
                return(new NotSwim());

            case SwimType.RoboSwim:
                return(new RoboSwim());

            case SwimType.Default:
                throw new ArgumentNullException();

            default:
                throw new ArgumentNullException();
            }
        }
Example #3
0
 public Discipline(int baselength, SwimType swimType)
 {
     this.Factor     = 1;
     this.BaseLength = baselength;
     this.SwimType   = swimType;
 }
Example #4
0
        private SingleRecordEntry CreateEmptySingleRecordEntry(Sex s, CourseType c, AgeGroup g, int length, SwimType swimType)
        {
            var entry = new SingleRecordEntry()
            {
                Club       = "",
                Name       = "",
                Surname    = "",
                Agegroup   = g,
                Date       = "",
                sex        = s,
                CourseType = c,
                Time       = new TimeSpan(0, 0, 0, 0, 0 * 10),
                Discipline = new Discipline(length, swimType)
            };

            return(entry);
        }