Ejemplo n.º 1
0
        //get all the game user spectete
        //syncronized due to for
        public List <IGame> GetSpectetorGamesByUserName(IUser user)
        {
            lock (padlock)
            {
                List <IGame> toReturn = null;
                try
                {
                    int userId = user.Id();
                    toReturn = proxyDB.GetUserSpectetorsGameResult(userId);
                    return(toReturn);
                }
                catch (Exception e)
                {
                    ErrorLog log = new ErrorLog("Error: while trying get user spectetor games - username: " + user.MemberName());
                    logControl.AddErrorLog(log);
                    return(toReturn);
                }

                return(toReturn);
            }
        }