示例#1
0
 static private void RegisterFlexKidsConnection(Container container)
 {
     if (ConfigurationManager.AppSettings["IFlexKidsConnection"] != null &&
         ConfigurationManager.AppSettings["IFlexKidsConnection"] == "FixedFlexKidsConnection.FixedFlexKidsConnection")
     {
         container.Register <IFlexKidsConnection, FixedFlexKidsConnection.FixedFlexKidsConnection>();
     }
     else
     {
         var h      = ConfigurationManager.AppSettings["FlexKidsHost"];
         var u      = ConfigurationManager.AppSettings["FlexKidsUsername"];
         var p      = ConfigurationManager.AppSettings["FlexKidsPassword"];
         var config = new FlexKidsCookieConfig(
             h,
             u,
             p);
         container.RegisterSingle(config);
         container.Register <IWeb, WebClientAdapter>();
         container.Register <IFlexKidsConnection, FlexKidsCookieWebClient>();
     }
 }
示例#2
0
 public void Setup()
 {
     config = new FlexKidsCookieConfig("https://abc.local/", "user", "pass");
 }