コード例 #1
0
        /// <summary>
        /// Creates a new scoreboard session and returns a reference to the caller, so they can add to the session.
        /// </summary>
        /// <returns></returns>
        public MPAiSpeakScoreBoardSession NewScoreBoardSession()
        {
            MPAiSpeakScoreBoardSession session = new MPAiSpeakScoreBoardSession(DateTime.Now);

            sessions.Add(session);
            return(session);
        }
コード例 #2
0
        /// <summary>
        /// Creates a new scoreboard session based on the parameters and returns a reference to the caller, so they can add to the session.
        /// </summary>
        /// <param name="dateAndTime"></param>
        /// <param name="content"></param>
        /// <returns></returns>
        public MPAiSpeakScoreBoardSession NewScoreBoardSession(DateTime dateAndTime, List <MPAiSpeakScoreBoardItem> content)
        {
            MPAiSpeakScoreBoardSession session = new MPAiSpeakScoreBoardSession(dateAndTime, content);

            sessions.Add(session);
            return(session);
        }
コード例 #3
0
 /// <summary>
 /// Returns an int indicating the ordering of two scoreboard sessions, by date.
 /// </summary>
 /// <param name="x"></param>
 /// <param name="y"></param>
 /// <returns></returns>
 public static int ComparisionByDate(MPAiSpeakScoreBoardSession x, MPAiSpeakScoreBoardSession y)
 {
     return(DateTime.Compare(y.DateAndTime, x.DateAndTime));
 }