Guest User

Untitled

a guest
Jun 16th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. public ActionResult UpdateSite(string key)
  2. {
  3. if(key == KEY)
  4. {
  5. log4net.Config.XmlConfigurator.Configure();
  6. ILog log = LogManager.GetLogger("Default");
  7. string tUserName = ConfigurationManager.AppSettings["UName"];
  8. string tPassword = ConfigurationManager.AppSettings["UPassword"];
  9.  
  10. ApiService apiSvc = new ApiService(tUserName, tPassword, new InterpreterFactory(),
  11. log);
  12. ControlPanel controller = new ControlPanel(Service, apiSvc, new DefaultAppStatusService(), log);
  13.  
  14. CaptureResults results = controller.Capture();
  15. controller.EnrichData(results, new EnrichmentFactory(log));
  16.  
  17. var newData = controller.PersistData(results);
  18. controller.ReplyWithNewData(newData);
  19. }
  20. return View();
  21. }
Add Comment
Please, Sign In to add comment