Esempio n. 1
0
        public IEnumerable <string> GetSiteNames(string connectionString)
        {
            var manager = new SiteFactoryManager(connectionString);
            var list    = manager.SearchAllEntities().ToList();

            return(SiteBuilder.NewSiteBuilder()
                   .BuildAll(list));
        }
Esempio n. 2
0
        public ISite LoadSite(string connectionString, string name, IAlarmClock alarmClock)
        {
            var siteManager = new SiteFactoryManager(connectionString);
            var siteEntity  = siteManager.SearchEntity(name) ?? throw new InexistentNameException(name);
            var site        = SiteBuilder.NewSiteBuilder()
                              .SetConnectionString(connectionString)
                              .SetAlarmClock(alarmClock)
                              .SetEntity(siteEntity)
                              .Build();

            return(site);
        }