public static KeystoneManagerWSDL GetKeystoneManagerWSDL(string projectName, string username, string password) { switch (KeystoneManagerWSDL.ParseProjectName(projectName)) { case Projects.CAxMan: default: return(new AuthentificationWSDL.CMAuth.KeystoneManagerWSDL_CM(username, password, projectName)); } }
/// <summary> /// Connects the specified keystone. /// </summary> /// <param name="keystone">The keystone.</param> internal void connect(KeystoneManagerWSDL keystone) { this.AttemptCounter = 0; KsmConnection.km = keystone; if (this.thLoop == null || !this.thLoop.IsAlive) { startMonitoring(); } else { KsmConnection.isRunning = true; } }
/// <summary> /// Initializes a new instance of the <see cref="KsmConnection"/> class. /// </summary> /// <param name="ksm">The KSM.</param> /// <param name="stayConnected">if set to <c>true</c> [stay connected].</param> public KsmConnection(KeystoneManagerWSDL ksm, bool stayConnected = false) : this(ksm.Project) { if (!ksm.IsServerAvailable) { this.ConnectionStatus = Status.ServerUnavailable; } else { this.ConnectionStatus = Status.ConnectionPending; this.connect(ksm); if (stayConnected) { this.startMonitoring(); } } }
/// <summary> /// Starts the manager. /// </summary> /// <param name="ksm">The KSM.</param> /// <param name="stayConnected">if set to <c>true</c> [stay connected].</param> static public void StartManager(KeystoneManagerWSDL ksm, bool stayConnected = false) { ConnectionManager.Dispose(); ConnectionManager.instance = new ConnectionManager.KsmConnection(ksm, stayConnected); }