ReadOnlyCollection <string> GetUserNames(Guid migrationSourceId)
        {
            lock (m_userNamesLock)
            {
                if (m_cqSessions.ContainsKey(migrationSourceId))
                {
                    return(new List <string>().AsReadOnly());
                }

                if (null == m_userNames && null != m_cqSessions[migrationSourceId])
                {
                    m_userNames = new List <string>();

                    object[] userNameObjs = CQWrapper.GetAllUsers(m_cqSessions[migrationSourceId], (int)CQConstants.ExtendedNameOption._NAME_EXTEND_WHEN_NEEDED);

                    foreach (object userNameObj in userNameObjs)
                    {
                        string userName = (string)userNameObj;
                        m_userNames.Add(userName);
                    }
                }

                return(m_userNames.AsReadOnly());
            }
        }