ServiceManager/NetSuiteServiceManager.cs
/// <summary>
/// Adopts a session created using the <see cref="INetSuiteServiceBase.CreateSession(NetSuiteCredential)"/>
/// method.
/// </summary>
/// <param name="session">An active session.</param>
Adopts a session created using the
method.
Adopts a session created using the method .
public void AdoptSession(IUserSession session)
        {
            var userSession = session as UserSession;
            if (null == userSession)
            {
                throw new NsException("This session was not generated by a ServiceManager and therefore, cannot be adopted.");
            }
            else
            {
                this.ServiceProxy = userSession.ServiceProxy ?? this.ServiceProxy.Clone();
                this.Credentials = userSession.Credentials;
                this._virtualSessionId = userSession.SessionId;
                this.IsSuspended = false;
            }
        }
public void AdoptSession ( IUserSession session ) { var userSession = session as UserSession ; if ( null == userSession ) { throw new NsException ( " " ) ; } else { this . ServiceProxy = userSession . ServiceProxy ?? this . ServiceProxy . Clone ( ) ; this . Credentials = userSession . Credentials ; this . _virtualSessionId = userSession . SessionId ; this . IsSuspended = false ; } }
Adopts a session created using the
method.
Adopts a session created using the method .
//else if (userSession.ServiceProxy == null) //{ //    throw new NsException("Specified session is inactive."); //}
session
IUserSession
An active session.
An active session .