コード例 #1
0
        /// <summary>
        /// Retrieves a <see cref="IReggieSession"/>.
        /// </summary>
        /// <returns>Instance of <see cref="IReggieSession"/></returns>
        public ReggieSession Retrieve()
        {
            string file = m_fileAdapter.OpenFileOpenDialogBox(ReggieExtension, ReggieFilter);

            if (string.IsNullOrWhiteSpace(file))
            {
                return(null);
            }

            var sessions = m_fileAdapter.DeserializeXmlFile <ReggieSession>(file);

            if (sessions.Count() > 0)
            {
                return(sessions[0]);
            }

            return(null);
        }