public T GetMatchInfoType <T>(MatchInfoTypeEnum matchInfoType) where T : MatchInfoBase { if (_matchInfoTypeLookups == null || !_matchInfoTypeLookups.ContainsKey(matchInfoType)) { throw new Exception("Match info not registered"); } return((T)Activator.CreateInstance(_matchInfoTypeLookups[matchInfoType], new object[] { matchInfoType })); }
public MatchInfoAttribute(MatchInfoTypeEnum matchInfoType) { MatchInfoType = matchInfoType; }
public TableTennisMatchInfo(MatchInfoTypeEnum matchInfoType) : base(matchInfoType) { }
protected MatchInfoBase(MatchInfoTypeEnum matchInfoType) { MatchInfoType = matchInfoType; }