static AbstractTest() { var kernel = new StandardKernel(); try { AnAuctionSiteFactory = LoadSiteFactoryFromModule(); } catch (Exception e) { Console.WriteLine(e); } }
#pragma warning disable CS0246 // Il nome di tipo o di spazio dei nomi 'ISiteFactory' non è stato trovato. Probabilmente manca una direttiva using o un riferimento all'assembly. public static ISiteFactory LoadSiteFactoryFromModule() { #pragma warning restore CS0246 // Il nome di tipo o di spazio dei nomi 'ISiteFactory' non è stato trovato. Probabilmente manca una direttiva using o un riferimento all'assembly. var kernel = new StandardKernel(); ISiteFactory result = null; try { kernel.Load(Configuration.ImplementationAssembly); result = kernel.Get <ISiteFactory>(); } catch (Exception e) { Console.WriteLine(e); } return(result); }
public static ISiteFactory LoadSiteFactoryFromModule() { var kernel = new StandardKernel(); ISiteFactory result = null; try { kernel.Load(Configuration.ImplementationAssembly); result = kernel.Get <ISiteFactory>(); } catch (Exception e) { Console.WriteLine(e); } return(result); }
static async Task Start(string item, ISiteFactory factory, List <ThomannItemModel> list, Action <ThomannItemModel> a) { await Task.Run(() => { var model = new ThomannItemModel() { Prices = new Dictionary <string, string>() }; model.Url = factory.CreateSwedishSite().ScrapeUrl(item); if (!string.IsNullOrEmpty(model.Url)) { model.Prices.Add("SEK", factory.CreateSwedishSite().ScrapeSwedishInfo(model.Url)); model.Prices.Add("DKK", factory.CreateDanishSite().ScrapeDanishInfo(model.Url.Replace("/se/", "/dk/"))); model.Prices.Add("NOK", factory.CreateNorwegianSite().ScrapeNorwegianInfo(model.Url.Replace("/se/", "/de/"))); model.Prices.Add("EUR", factory.CreateGermanSite().ScrapeGermanInfo(model.Url.Replace("/se/", "/de/"))); a(model); list.Add(model); } }); }
public void InitSiteFactory() { siteFactory = this.GetSiteFactory(); connectionString = this.GetConnectionString(); siteFactory.Setup(connectionString); }
public Overview(ISiteFactory siteFactory) { this.siteFactory = new SiteFactory(); }
public SiteCreatedHandler(IVmsLogger <SiteCreatedHandler> logger, ISiteFactory factory, ISiteRepository siteRepository) { _logger = logger; _factory = factory; _siteRepository = siteRepository; }
public SiteService(IAppUnitOfWork uow, ISiteFactory siteFactory) { _uow = uow; _siteFactory = siteFactory; }
public SiteManager(ISiteFactory siteFactory, ISiteStorage siteStorage) { this.siteFactory = siteFactory; this.siteStorage = siteStorage; siteStorage.AddPullCompleteEventListener(UpdateSites); }