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;
 }
Esempio n. 3
0
 public TableTennisMatchInfo(MatchInfoTypeEnum matchInfoType) : base(matchInfoType)
 {
 }
Esempio n. 4
0
 protected MatchInfoBase(MatchInfoTypeEnum matchInfoType)
 {
     MatchInfoType = matchInfoType;
 }