コード例 #1
0
 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));
     }
 }
コード例 #2
0
            /// <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;
                }
            }
コード例 #3
0
            /// <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();
                    }
                }
            }
コード例 #4
0
 /// <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);
 }