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)); }
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(); } }
public Discipline(int baselength, SwimType swimType) { this.Factor = 1; this.BaseLength = baselength; this.SwimType = swimType; }
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); }