Пример #1
0
        public Task <Player []> GetAllWithTag(TagType tag)
        {
            Type enumType    = tag.GetType( );
            bool isEnumValid = Enum.IsDefined(enumType, tag);

            if (!isEnumValid)
            {
                throw new Exception("Not Valid Enum");
            }
            return(repo.GetPlayersWithTag(tag));
        }