コード例 #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="flickrSearchService"></param>
 /// <param name="flickrDownloadService"></param>
 public FlickrSearchController(IFlickrSearchService flickrSearchService,
                               IFlickrDownloadService flickrDownloadService, ILogger <FlickrSearchController> logger)
 {
     _trace = Trace.Current.Child();
     _flickrSearchService   = flickrSearchService ?? throw new ArgumentNullException(nameof(flickrSearchService));
     _flickrDownloadService = flickrDownloadService ?? throw new ArgumentNullException(nameof(flickrDownloadService));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
コード例 #2
0
        ///  <summary>
        ///
        ///  </summary>
        ///  <param name="imageGalleryCommandService"></param>
        /// <param name="flickrDownloadService"></param>
        /// <param name="flickrSearchService"></param>
        ///  <param name="tokenProvider"></param>
        ///  <param name="settings"></param>
        //public ImageGalleryCommandController(IImageGalleryCommandService imageGalleryCommandService, IFlickrDownloadService flickrDownloadService, IFlickrSearchService flickrSearchService,
        //    ITokenProvider tokenProvider, IOptionsSnapshot<ApplicationOptions> settings)
        //{
        //    this._tokenProvider = tokenProvider ?? throw new ArgumentNullException(nameof(tokenProvider));
        //    this._flickrSearchService = flickrSearchService ?? throw new ArgumentNullException(nameof(flickrSearchService));
        //    this._flickrDownloadService = flickrDownloadService ?? throw new ArgumentNullException(nameof(flickrDownloadService));
        //    this._imageGalleryCommandService = imageGalleryCommandService ?? throw new ArgumentNullException(nameof(imageGalleryCommandService));
        //    _settings = settings.Value.ImagegalleryApiConfiguration;
        //}

        public ImageGalleryCommandController(IFlickrDownloadService flickrDownloadService, IFlickrSearchService flickrSearchService,
                                             ITokenProvider tokenProvider, IOptionsSnapshot <ApplicationOptions> settings, ILogger <ImageGalleryCommandController> logger)
        {
            this._flickrSearchService   = flickrSearchService ?? throw new ArgumentNullException(nameof(flickrSearchService));
            this._flickrDownloadService = flickrDownloadService ?? throw new ArgumentNullException(nameof(flickrDownloadService));
            //this._imageGalleryCommandService = imageGalleryCommandService ?? throw new ArgumentNullException(nameof(imageGalleryCommandService));
            this._tokenProvider = tokenProvider ?? throw new ArgumentNullException(nameof(tokenProvider));
            _settings           = settings.Value.ImagegalleryApiConfiguration;
            _logger             = logger ?? throw new ArgumentNullException(nameof(logger));
        }
コード例 #3
0
 public ImageGalleryService(IFlickrDownloadService flickrDownloadService, IFlickrSearchService flickrSearchService, ILogger <ImageGalleryService> logger)
 {
     this._flickrSearchService   = flickrSearchService;
     this._flickrDownloadService = flickrDownloadService;
     this._logger = logger;
 }
コード例 #4
0
 public SearchServiceTest(FlickrFixture fixture, ITestOutputHelper output)
 {
     this._flickr = fixture.Flickr;
     this._flickrSearchService = fixture.SearchService;
     this._output = output;
 }
コード例 #5
0
 public FlickrSearchController(IFlickrSearchService flickrService)
 {
     _flickrService = flickrService;
 }