Exemplo n.º 1
0
 public StatisticsController(IStatisticsDao statsDao)
 {
     if (statsDao == null)
     {
         throw new ArgumentNullException("statsDao");
     }
     _statsDao = statsDao;
 }
Exemplo n.º 2
0
 public LoginController(IUsersDao usersDao, IStatisticsDao statsDao)
 {
     if (usersDao == null)
     {
         throw new ArgumentNullException("usersDao");
     }
     _usersDao = usersDao;
     _statsDao = statsDao;
 }
Exemplo n.º 3
0
 public HomeController(ICassandraInfo cassandraInfo, IStatisticsDao statsDao)
 {
     if (cassandraInfo == null)
     {
         throw new ArgumentNullException("cassandraInfo");
     }
     if (statsDao == null)
     {
         throw new ArgumentNullException("statsDao");
     }
     _cassandraInfo = cassandraInfo;
     _statsDao      = statsDao;
 }
Exemplo n.º 4
0
 public PlaylistsController(IPlaylistsDao playlistsDao, IStatisticsDao statsDao)
 {
     if (playlistsDao == null)
     {
         throw new ArgumentNullException("playlistsDao");
     }
     if (statsDao == null)
     {
         throw new ArgumentNullException("statsDao");
     }
     _playlistsDao = playlistsDao;
     _statsDao     = statsDao;
 }
Exemplo n.º 5
0
        public static bool Register(IProvider provider)
        {
            bool retval = false;
            if (provider != null)
            {
                object o = null;
                if (provider.GetItem(typeof(IStatisticsDao), out o))
                {
                    _statisticsDao = o as IStatisticsDao;
                    if (_statisticsDao != null)
                        retval = true;
                }

                if (!retval)
                {
                    Trace.WriteLine("StatisticsRegistry.Register(" + provider + "): no daos found");
                }
            }
            else
                Trace.WriteLine("StatisticsRegistry.Register(" + provider + "): provider was null");
            return retval;
        }