Exemplo n.º 1
0
 /// <summary>
 /// Create a new meet.
 /// </summary>
 /// <param name="name">
 /// The name of the meet.
 /// </param>
 /// <param name="host">
 /// The <see cref="Team"/> that hosts the meet.
 /// </param>
 /// <exception cref="ArgumentNullException">
 /// Thrown if name is null.
 /// </exception>
 protected Meet(string name, Team host)
     : this()
 {
     Name = name;
     Host = host;
     MeetInstances = new HashSet<MeetInstance>();
 }
Exemplo n.º 2
0
 static Data()
 {
     // Conferences
     Nwc = new Conference("Northwest Conference", "NWC");
     Sciac = new Conference("Southern California Intercollegiate Athletic Conference", "SCIAC");
     Scac = new Conference("Southern Collegiate Athletic Conference", "SCAC");
     Pac12 = new Conference("Pacific 12", "PAC-12");
     Conferences = new List<Conference> { Nwc, Sciac, Scac, Pac12 };
     // Teams
     LewisAndClark = new Team("Lewis & Clark") { Conference = Nwc };
     Willamette = new Team("Willamette") { Conference = Nwc };
     PugetSound = new Team("Puget Sound") { Conference = Nwc };
     ClaremontMuddScripps = new Team("Claremont-Mudd-Scripps") { Conference = Sciac };
     Pomona = new Team("Pomona-Pitzer") { Conference = Sciac };
     ColoradoCollege = new Team("Colorado") { Conference = Scac };
     Chapman = new Team("Chapman");
     Whitman = new Team("Whitman") { Conference = Nwc };
     UniversityOfWashington = new Team("Washington") { Conference = Pac12 };
     PacificLutheran = new Team("Pacific Lutheran") { Conference = Nwc };
     Teams = new List<Team> { LewisAndClark, Willamette, PugetSound, ClaremontMuddScripps, Pomona, ColoradoCollege, Chapman, Whitman, UniversityOfWashington, PacificLutheran, };
     // States
     California = new State("CA", "California");
     Colorado = new State("CO", "Colorado");
     Oregon = new State("OR", "Oregon");
     Washington = new State("WA", "Washington");
     States = new List<State> { California, Colorado, Oregon, Washington };
     // Cities
     Estacada = new City("Estacada", Oregon);
     Seattle = new City("Seattle", Washington);
     Claremont = new City("Claremont", California);
     WallaWalla = new City("Walla Walla", Washington);
     Chino = new City("Chino", California);
     Salem = new City("Salem", Oregon);
     Tacoma = new City("Tacoma", Washington);
     Portland = new City("Portland", Oregon);
     Cities = new List<City> { Estacada, Seattle, Claremont, WallaWalla, Chino, Salem, Tacoma, Portland };
     // Venues
     McIver = new Venue("Milo McIver State Park", Estacada);
     BushPark = new Venue("Bush Pasture Park", Salem);
     VeteransGolfCourse = new Venue("Veteran's Memorial Golf Course", WallaWalla);
     PomonaCampus = new Venue("Pomona College Campus", Claremont);
     LincolnPark = new Venue("Lincoln Park", Seattle);
     PradoPark = new Venue("Prado Park", Chino);
     PluGolfCourse = new Venue("PLU Golf Course", Tacoma);
     FortSteilacoom = new Venue("Fort Steilacoom Park", Tacoma);
     Venues = new List<Venue> { McIver, BushPark, VeteransGolfCourse, PomonaCampus, LincolnPark, PradoPark, PluGolfCourse, FortSteilacoom };
     // Runners
     Karl = new Runner("Dickman", "Karl", Gender.Male) { EnrollmentYear = 2006 };
     Hannah = new Runner("Palmer", "Hannah", Gender.Female) { EnrollmentYear = 2006 };
     Richie = new Runner("LeDonne", "Richie", Gender.Male) { EnrollmentYear = 2007 };
     Keith = new Runner("Woodard", "Keith", Gender.Male) { EnrollmentYear = 1969 };
     Leo = new Runner("Castillo", "Leo", Gender.Male) { EnrollmentYear = 2012 };
     Francis = new Runner("Reynolds", "Francis", Gender.Male) { EnrollmentYear = 2010 };
     Florian = new Runner("Scheulen", "Florian", Gender.Male) { EnrollmentYear = 2010 };
     Jackson = new Runner("Brainerd", "Jackson", Gender.Male) { EnrollmentYear = 2012 };
     Runners = new List<Runner> { Karl, Hannah, Richie, Keith, Leo, Francis, Florian, Jackson };
     // Affiliations
     IEnumerable<Runner> runners = new List<Runner> { Florian, Karl, Francis, Richie, Leo, Jackson };
     IEnumerable<Team> teams = new List<Team> { ClaremontMuddScripps, LewisAndClark, PugetSound, LewisAndClark, Willamette, ColoradoCollege };
     IEnumerable<int> years = new List<int> { 2005, 2006, 2006, 2007, 2008, 2008 };
     IEnumerableExtensions.ForEachEqual(runners, teams, years, (runner, team, year) =>
     {
         for(int i = 0; i < 4; i++)
         {
             runner.Affiliations[year + i] = team;
         }
     });
     foreach(int year in new List<int> { 2006, 2008, 2009, 2010 })
     {
         Hannah.Affiliations[year] = LewisAndClark;
     }
     // Meets
     LCInvite = new Meet("Lewis & Clark Invitational");
     CharlesBowles = new Meet("Charles Bowles Invitational");
     NwcChampionships = new Meet("Northwest Conference Championship");
     SciacMultiDuals = new Meet("SCIAC Multi-Duals");
     Sundodger = new Meet("Sundodger Invitational");
     Regionals = new Meet("NCAA West Region Championship");
     PluInvite = new Meet("Pacific Lutheran Invitational");
     Meets = new List<Meet> { LCInvite, CharlesBowles, NwcChampionships, SciacMultiDuals, Sundodger, Regionals, PluInvite };
     // Meet instances
     LCInvite09 = new MeetInstance(LCInvite, new DateTime(2009, 9, 12), McIver) { Host = LewisAndClark };
     LCInvite10 = new MeetInstance(LCInvite, new DateTime(2010, 9, 27), McIver) { Host = LewisAndClark };
     CharlesBowles09 = new MeetInstance(CharlesBowles, new DateTime(2009, 10, 3), BushPark) { Host = Willamette };
     NwcChampionships10 = new MeetInstance(NwcChampionships, new DateTime(2010, 10, 30), FortSteilacoom) { Host = PugetSound };
     NwcChampionships09 = new MeetInstance(NwcChampionships, new DateTime(2009, 10, 31), McIver) { Host = LewisAndClark };
     NwcChampionships08 = new MeetInstance(NwcChampionships, new DateTime(2008, 11, 1), VeteransGolfCourse) { Host = Whitman };
     PluInvite10 = new MeetInstance(PluInvite, new DateTime(2010, 10, 16), PluGolfCourse) { Host = PacificLutheran };
     SciacMultiDuals09 = new MeetInstance(SciacMultiDuals, new DateTime(2009, 10, 17), PradoPark) { Host = ClaremontMuddScripps };
     Sundodger09 = new MeetInstance(Sundodger, new DateTime(2009, 9, 19), LincolnPark) { Host = UniversityOfWashington };
     Regionals08 = new MeetInstance(Regionals, new DateTime(2009, 11, 15), BushPark) { Host = Willamette };
     Regionals09 = new MeetInstance(Regionals, new DateTime(2009, 11, 14), PomonaCampus) { Host = Pomona };
     MeetInstances = new List<MeetInstance> { LCInvite09, LCInvite10, CharlesBowles09, NwcChampionships10, NwcChampionships09, NwcChampionships08, PluInvite10, SciacMultiDuals09, Sundodger09, Regionals08,
     Regionals09 };
     // Races
     Races = new Dictionary<MeetInstance, Gender, Race>();
     foreach(MeetInstance meetInstance in MeetInstances)
     {
         int womensDistance = meetInstance.Meet == CharlesBowles ? 5000 : 6000;
         Races[meetInstance, Gender.Male] = new Race(meetInstance, Gender.Male, 8000);
         Races[meetInstance, Gender.Female] = new Race(meetInstance, Gender.Female, womensDistance);
     }
     // Performances
     KarlAtSundodger = new Performance(Karl, Races[Sundodger09, Gender.Male], 24 * 60 + 55);
     KarlAtWillamette = new Performance(Karl, Races[CharlesBowles09, Gender.Male], 24 * 60 + 44);
     HannahsPerformance = new Performance(Hannah, Races[Regionals08, Gender.Female], 22 * 60 + 3);
     FrancisPerformance = new Performance(Francis, Races[NwcChampionships08, Gender.Male], 24 * 60 + 30);
     Performances = new List<Performance> { KarlAtSundodger, KarlAtWillamette, HannahsPerformance, FrancisPerformance };
 }