Microsoft.Protocols.TestSuites.MS_OXORULE.MS_OXORULEAdapter.Connect C# (CSharp) Method

Connect() public method

Create RPC connection.
public Connect ( ConnectionType connectionType, string userName, string userESSDN, string userPassword ) : bool
connectionType ConnectionType The type of connection.
userName string A string value indicates the domain account name that connects to server.
userESSDN string A string that identifies user who is making the EcDoConnectEx call
userPassword string A string value indicates the password of the user which is used.
return bool
        public bool Connect(ConnectionType connectionType, string userName, string userESSDN, string userPassword)
        {
            if (this.isConnected == true)
            {
                bool isDisconnect = this.oxcropsClient.Disconnect();
                Site.Assert.IsTrue(isDisconnect, "The RPC connection should be disconnected!");
            }

            this.isConnected = this.oxcropsClient.Connect(this.server, connectionType, userESSDN, this.domain, userName, userPassword);
            return this.isConnected;
        }