示例#1
0
 public TwitterStreamService(ITweetService tweetService, IEmojiService emojiService, IHashTagService hashTagService, IUrlsService urlsService)
 {
     _tweetService   = tweetService ?? throw new ArgumentNullException(nameof(tweetService));
     _emojiService   = emojiService ?? throw new ArgumentNullException(nameof(emojiService));
     _hashTagService = hashTagService ?? throw new ArgumentNullException(nameof(hashTagService));
     _urlsService    = urlsService ?? throw new ArgumentNullException(nameof(urlsService));
 }
示例#2
0
        public Application(
            IValuesService <Make> makesService,
            IValuesService <Model> modelsService,
            IValuesService <Category> categoriesService,
            IValuesService <Location> locationsService,
            IValuesService <Currency> currenciesService,
            IValuesService <Transmission> transmissionsService,
            IValuesService <Fuel> fuelsService,
            IValuesService <Color> colorsService,
            ILotsService <Car> carsService,
            IUrlsService <Image> imagesService,
            IBaseService <Bid> bidsService
            )
        {
            Console.WriteLine("Loading database objects to memory...");

            this.ServicesDispatcher = new ServicesDispatcher()
                                      .InjectService <Make>(makesService)
                                      //.InjectService<Model>(modelsService)
                                      .InjectService <Category>(categoriesService)
                                      .InjectService <Location>(locationsService)
                                      .InjectService <Currency>(currenciesService)
                                      .InjectService <Transmission>(transmissionsService)
                                      .InjectService <Fuel>(fuelsService)
                                      .InjectService <Color>(colorsService)
                                      .InjectService <Car>(carsService);

            this.carsService   = carsService;
            this.makesService  = makesService;
            this.modelsService = modelsService;
            this.imagesService = imagesService;
            this.bidsService   = bidsService;
        }
示例#3
0
 public TweetService(ITweetRepository tweetRepository, IEmojiService emojiService, IHashTagService hashTagService, IUrlsService urlsService, IMediaService mediaService)
 {
     _emojiService    = emojiService ?? throw new ArgumentNullException(nameof(emojiService));
     _tweetRepository = tweetRepository ?? throw new ArgumentNullException(nameof(tweetRepository));
     _hashTagService  = hashTagService ?? throw new ArgumentNullException(nameof(hashTagService));
     _urlsService     = urlsService ?? throw new ArgumentNullException(nameof(urlsService));
     _mediaService    = mediaService ?? throw new ArgumentNullException(nameof(mediaService));
 }