Adaptive.ReactiveTrader.Messaging.Abstraction.UserSessionCache.TryGetSession C# (CSharp) Method

TryGetSession() public method

public TryGetSession ( string sessionId, IUserSession &session ) : bool
sessionId string
session IUserSession
return bool
        public bool TryGetSession(string sessionId, out IUserSession session)
        {
            throw new NotImplementedException();
        }

Usage Example

        protected IRequestContext CreateRequestContext(IMessage requestMessage)
        {
            var          sessionId = requestMessage.SessionId;
            IUserSession userSession;

            if (!IsSessionRequired)
            {
                userSession = null;
            }
            else if (sessionId == null || !UserSessionCache.TryGetSession(sessionId, out userSession))
            {
                Log.Warn("Unable to find user session for ID: " + sessionId);
                return(null);
            }
            return(new RequestContext(requestMessage, userSession));
        }