public ActionResult AddCompetitionPlayer(int competitionId, int playerId, int source, int section)
        {
            SystemMonitor.Info("Adding Player {0}, source:{1}, section:{2}", playerId, source, section);
            var manager = ServiceProvider.Get <ICompetitionsManager>();

            manager.AddPlayerToCompetition(competitionId, playerId, (CompetitionPlayerSource)source, (CompetitionSection)section);
            return(new HttpStatusCodeResult(200));
        }
        public ActionResult ReplaceCompetitionPlayer(int competitionId, int replacedPlayerId, int replacementPlayerId, CompetitionPlayerSource source, CompetitionPlayerStatus status, string reason)
        {
            SystemMonitor.Info("Replaceing {0} with {1}", replacedPlayerId, replacementPlayerId);
            var manager = ServiceProvider.Get <ICompetitionsManager>();

            manager.ReplacePlayer(competitionId, replacedPlayerId, replacementPlayerId, source, status, reason);
            return(new HttpStatusCodeResult(200));
        }
Beispiel #3
0
        public override bool OnRun(FormTesting form, int count)
        {
            SystemMonitor.Info("Start...");

            for (int i = 0; i < count; i++)
            {
                client1.CallDirectLocal <DirectCallSpeedTest_Interface>(client2.Id).Run();
                //if (client1.DirectLocalCall<DirectCallSpeedTest_Interface>(client2.Id).Run() != 12)
                //{
                //    throw new Exception("Failure");
                //}
            }

            base.SignalTestComplete();
            return(true);
        }
Beispiel #4
0
        protected void Application_Start()
        {
            SystemMonitor.Info("SAMS Application started... ");

            AreaRegistration.RegisterAllAreas();

            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            AuthConfig.RegisterAuth();

            RegisterConfigurationProvider();
            RegisterRepositories();

            SystemMonitor.Info("SAMS Application initialization completed.");
        }
Beispiel #5
0
        public override bool OnRun(FormTesting form, int count)
        {
            if (_testEventHandling)
            {
                client1.SubscribeAll <Interface1>().Event1 += new EventHandler(SuperPoolSpeedTest_Event1);
                //client1.Subscribe<Interface1>().Event1 -= new EventHandler(SuperPoolSpeedTest_Event1);
            }

            SystemMonitor.Info("Start...");

            if (Event1 != null)
            {
                Event1(this, EventArgs.Empty);
            }

            client1.Call <Interface1>(client1.Id).Prop1 = 73;

            for (int i = 0; i < count; i++)
            {
                //AA x = pool.Call<Interface1>(client1.Id).Run(2);
                //string res = pool.Call<Interface1>(client1.Id).Run(string.Empty);
                client1.Call <Interface1>(client1.Id).Run3();
                //int xa = client2.Call<Interface1>().Prop1;

                //int result = client1.CallSync<Interface1>(client1.Id, TimeSpan.FromSeconds(2)).Run2();
                //if (result != i)
                //{
                //    int h = 11;
                //}
                //x = pool.Call<Interface1>(6).Run(2);
            }

            if (_testEventHandling)
            {
                client1.SubscribeAll <Interface1>().Event1 -= new EventHandler(SuperPoolSpeedTest_Event1);
            }

            //pool._builder.Save();
            return(true);
        }