Exemple #1
0
        private IAuthor GetCreateAuthor(string author)
        {
            IAuthor iauth;
            var     names = author.Split(' ');
            var     last  = names[names.Length - 1];
            var     first = (names.Length > 1) ? names[0] : null;

            if (_authorsCache.TryGetValue(first + last, out iauth))
            {
                return(iauth);
            }
            iauth = _session.NewAuthor(first, last);
            _authorsCache.Add(first + last, iauth);
            return(iauth);
        }