Inheritance: SqlRow, TwitchUserPoints
コード例 #1
0
        public static TwitchUserPoints[] GetTopUsersForChannel(TwitchChannel channel, uint count)
        {
            List <object[]> results = _table.Select(null, null, "ChannelUserId=?a", new object[] { channel.user.id }, "Points Desc", count);

            if (results != null && results.Count > 0)
            {
                TwitchUserPoints[] points = new TwitchUserPoints[results.Count];
                for (int i = 0; i < results.Count; i++)
                {
                    points[i] = new SqlTwitchUserPoints(new SqlTwitchUser((uint)results[i][0]), channel, (ulong)results[i][2], (DateTime)results[i][3]);
                }

                return(points);
            }

            return(null);
        }
コード例 #2
0
 public TwitchUserPointManager(SqlTwitchChannel channel, SqlTwitchUser user)
 {
     sqlPoints = new SqlTwitchUserPoints(user, channel);
 }
コード例 #3
0
 public TwitchUserPoints[] GetTopUsers(TwitchChannel channel, uint count)
 {
     return(SqlTwitchUserPoints.GetTopUsersForChannel(channel, count));
 }
コード例 #4
0
        public static TwitchUserPoints[] GetTopUsersForChannel(TwitchChannel channel, uint count)
        {
            List<object[]> results = _table.Select(null, null, "ChannelUserId=?a", new object[] { channel.user.id }, "Points Desc", count);

            if(results != null && results.Count > 0) {
                TwitchUserPoints[] points = new TwitchUserPoints[results.Count];
                for(int i = 0; i < results.Count; i++) {
                    points[i] = new SqlTwitchUserPoints(new SqlTwitchUser((uint)results[i][0]), channel, (ulong)results[i][2], (DateTime)results[i][3]);
                }

                return points;
            }

            return null;
        }