ServiceManager/NetSuiteServiceManager.cs
/// <summary>Logout from the specified session.</summary>
/// <param name="session">The active session.</param>
Logout from the specified session.
Logout from the specified session .
public override void CloseSession(IUserSession session)
        {
            var userSession = session as UserSession;
            if (null == userSession)
                return;
            var serviceProxy = userSession.ServiceProxy;
            if (serviceProxy == null && userSession.SessionId == null)
                throw new NsException("You have already logged out of this session");
            else if (serviceProxy == null)
                serviceProxy = CreateProxyWithSessionId(userSession.SessionId);
            ExecuteLogout(serviceProxy, _log);
            if (userSession.SessionId == _virtualSessionId)
                this.ServiceProxy = this.ServiceProxy.Clone(); 
            userSession.ServiceProxy = null;
            if (userSession.UserId != null)
                _log.Info("User " + userSession.UserId.internalId + "logged out");
        }
public override void CloseSession ( IUserSession session ) { var userSession = session as UserSession ; if ( null == userSession ) return ; var serviceProxy = userSession . ServiceProxy ; if ( serviceProxy == null && userSession . SessionId == null ) throw new NsException ( " " ) ; else if ( serviceProxy == null ) serviceProxy = CreateProxyWithSessionId ( userSession . SessionId ) ; ExecuteLogout ( serviceProxy , _log ) ; if ( userSession . SessionId == _virtualSessionId ) this . ServiceProxy = this . ServiceProxy . Clone ( ) ; userSession . ServiceProxy = null ; if ( userSession . UserId != null ) _log . Info ( " " + userSession . UserId . internalId + " " ) ; }
Logout from the specified session.
Logout from the specified session .
// start using a fresh proxy.
session
IUserSession
The active session.
The active session .