Microsoft.Protocols.TestSuites.Common.OxcropsClient.RpcConnect C# (CSharp) Method

RpcConnect() private method

Internal use connect to the server for RPC calling. This method is defined as a direct way to connect to server with specific parameters.
private RpcConnect ( string server, string userDN, string domain, string userName, string password, string rpcProxyOptions ) : bool
server string Server to connect.
userDN string UserDN used to connect server
domain string Domain name
userName string User name used to logon
password string User Password
rpcProxyOptions string Rpc proxy parameter
return bool
        private bool RpcConnect(string server, string userDN, string domain, string userName, string password, string rpcProxyOptions)
        {
            string userSpn = Regex.Replace(this.MapiContext.SpnFormat, @"\[ServerName\]", this.originalServerName, RegexOptions.IgnoreCase);
            this.cxh = this.rpcAdapter.Connect(server, domain, userName, userDN, password, userSpn, this.MapiContext, rpcProxyOptions);

            if (this.cxh != IntPtr.Zero)
            {
                this.IsConnected = true;
                return true;
            }
            else
            {
                return false;
            }
        }
    }