예제 #1
0
 public static ClientConnection Connection(MeTLServerAddress serverAddress)
 {
     if (serverAddress.productionUri == null || serverAddress.stagingUri == null) throw new ArgumentNullException("uri", "Neither productionUri nor stagingUri may be null.");
     kernel.Unbind<MeTLServerAddress>();
     kernel.Bind<MeTLServerAddress>().To(serverAddress.GetType()).InSingletonScope();
     return kernel.Get<ClientConnection>();
 }
예제 #2
0
 public static ClientConnection Connection(MeTLServerAddress.serverMode serverMode)
 {
     kernel.Get<MeTLServerAddress>().setMode(serverMode);
     return kernel.Get<ClientConnection>();
 }
예제 #3
0
 public ClientConnection(MeTLServerAddress address)
 {
     server = address;
     Trace.TraceInformation("MeTL client connection started.  Server set to:" + server.ToString(), "Connection");
 }
 public AuthorisationProvider(IWebClientFactory factory, MeTLServerAddress server)
     : base(factory)
 {
     this.server = server;
 }