Beispiel #1
0
        private AccountDomainObject CreateAccount(AccountName accountName, IEnumerable <Profile> profiles)
        {
            var profileDomainObjects = profiles.Select(p => _profileFactory.Create(p, accountName)).ToList();
            var profileCollection    = new ProfileCollection(accountName, profileDomainObjects)
            {
                EventAggregator   = _eventAggregator,
                ProfileRepository = _profileRepository
            };

            return(new AccountDomainObject(accountName, profileCollection));
        }
Beispiel #2
0
        public IVertex Parse(Uri userLink)
        {
            var profile = _profileFactory.Create(userLink);

            if (InCache(profile.Id, out IVertex vertex))
            {
                return(vertex);
            }

            //Wait before processing
            _pause.Pause();
            //Parse root
            var enumerableLinks = _hyperLinkParser.ParseUser(profile);
            //Parse root children
            var degrees = enumerableLinks.Select(link => _profileFactory.Create(new Uri(link)));

            vertex = _vertexFactory.Create(profile, degrees);
            _cache.Save(vertex);

            return(vertex);
        }