예제 #1
0
 public Team()
 {
     FlippingContainer.Instance.ComposeParts(this);
     _contest   = new ReferenceHolder <IContest, Guid>(ContestRepository);
     _matchList = new Lazy <IList <IMatch> >(() => MatchRepository.Find(_ => _.Team1Id == Id)
                                             .Union(MatchRepository.Find(_ => _.Team2Id == Id))
                                             .ToList());
     _memberList = new Lazy <IList <IRelationship <ITeam, IPerson> > >(() => TeamPersonRelationshipRepository.Find(_ => _.FirstItemInvolveId == Id).ToList());
     _gameStepTeamRelationshipList = new Lazy <IList <IRelationship <ITeam, IGameStep> > >(() => TeamGameStepRelationshipRepository.Find(_ => _.FirstItemInvolveId == Id).ToList());
     _phaseTeamRelationshipList    = new Lazy <IList <IRelationship <ITeam, IPhase> > >(() => TeamPhaseRelationshipRepository.Find(_ => _.SecondItemInvolveId == Id).ToList());
 }
예제 #2
0
 public Person()
 {
     FlippingContainer.Instance.ComposeParts(this);
     _teamList = new Lazy <IList <IRelationship <ITeam, IPerson> > >(() => TeamPersonRelationshipRepository.Find(_ => _.SecondItemInvolveId == Id).ToList());
 }