Ejemplo n.º 1
0
        /// <summary>
        ///     Connects to the server using the given parameters and returns an interface to the connection.
        ///     Will raise if the server is not running.
        /// </summary>
        /// <param name='sessionInfo'>A <see cref="SessionInfo"/> object describing session configuration information for the connection request.</param>
        /// <returns>An <see cref="IServerSession"/> interface to the open session.</returns>
        public IServerSession Connect(SessionInfo sessionInfo)
        {
            if ((sessionInfo.HostName == null) || (sessionInfo.HostName == ""))
            {
                sessionInfo.HostName = _hostName;
            }
            sessionInfo.CatalogCacheName = _internalServer.Name;
            IRemoteServerSession session = _serverConnection.Connect(sessionInfo);

            return(new LocalSession(this, sessionInfo, session));
        }