private QlikAppSession GetDefaultSession() { var session = new QlikAppSession(LocationInfo, Identifier, true); Sessions.Add(session); return(session); }
public QlikAppSession GetFreeSession() { lock (this) { var session = Sessions.Where(s => s.IsFree == true).FirstOrDefault(); if (session == null) { session = new QlikAppSession(LocationInfo, Identifier); Sessions.Add(session); } else { session.IsFree = false; } return(session); } }