//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using System.Collections;
using CommunityServer;
using CommunityServer.Components;

namespace CommunityServer {
    /// <summary>
    /// Summary description for Polls.
    /// </summary>
    public class Polls {

        public static PollSummary GetPoll(Post post) {

            // Create Instance of the IDataProvider
            CommonDataProvider dp = CommonDataProvider.Instance();

            // Get the current user
            return dp.GetPoll(new PollSummary(post));

        }

        public static void Vote (int postID, int userID, string selection) {

            // Create Instance of the IDataProvider
            CommonDataProvider dp = CommonDataProvider.Instance();

            // Log the vote
            dp.Vote(postID, userID, selection);
        }
    }
}
