Exemplo n.º 1
0
 public AlgorithmsModule(IAlgorithmManager algorithmManager)
     : base("/algorithms")
 {
     Get["/"] = _ =>
     {
         // return our view
         return(View["algorithms", new AlgorithmsModel
                     {
                         Algorithms = algorithmManager.GetAllAsReadOnly()
                     }]);
     };
 }
Exemplo n.º 2
0
 public AlgorithmsModule(IAlgorithmManager algorithmManager)
     : base("/algorithms")
 {
     Get["/"] = _ =>
     {
         // return our view
         return View["algorithms", new AlgorithmsModel
         {
             Algorithms = algorithmManager.GetAllAsReadOnly()
         }];
     };
 }
Exemplo n.º 3
0
        public IndexModule(IStatisticsManager statisticsManager, IPoolManager poolManager, IAlgorithmManager algorithmManager)
        {
            Get["/"] = _ =>
            {
                // include common data required by layout.
                ViewBag.Header = "Welcome";

                // return our view
                return(View["index", new IndexModel
                            {
                                Pools = poolManager.GetAllAsReadOnly(),
                                Algorithms = algorithmManager.GetAllAsReadOnly(),
                                Statistics = statisticsManager
                            }]);
            };
        }
Exemplo n.º 4
0
        public IndexModule(IStatisticsManager statisticsManager, IPoolManager poolManager, IAlgorithmManager algorithmManager)
        {
            Get["/"] = _ =>
            {
                // include common data required by layout.
                ViewBag.Header = "Welcome";

                // return our view
                return View["index", new IndexModel
                {
                    Pools = poolManager.GetAllAsReadOnly(),
                    Algorithms = algorithmManager.GetAllAsReadOnly(),
                    Statistics = statisticsManager
                }];
            };
        }