コード例 #1
0
 public PictureService(
     IAsyncRepository <Picture> pictureRepository,
     Cloudinary cloudinary,
     CloudinaryOptions cloudinaryOptions)
 {
     _pictureRepository = pictureRepository;
     _cloudinary        = cloudinary;
     _cloudinaryOptions = cloudinaryOptions;
 }
コード例 #2
0
        public CloudinaryService(IOptions <CloudinaryOptions> options)
        {
            this.options = options.Value;

            var account = new Account(
                this.options.CloudName,
                this.options.ApiKey,
                this.options.ApiSecret);

            this.cloudinary = new CloudinaryDotNet.Cloudinary(account);
        }
コード例 #3
0
        public PictureService(AuctionSystemDbContext context, IOptions <CloudinaryOptions> options)
            : base(context)
        {
            this.options = options.Value;

            var account = new Account(
                this.options.CloudName,
                this.options.ApiKey,
                this.options.ApiSecret);

            this.cloudinary = new Cloudinary(account);
        }
コード例 #4
0
        public SlotService(
            IAsyncRepository <Picture> pictureRepository,
            IOptions <CloudinaryOptions> cloudinaryOptions)
        {
            _pictureRepository = pictureRepository;
            _cloudinaryOptions = cloudinaryOptions.Value;

            var account = new Account(
                _cloudinaryOptions.CloudName,
                _cloudinaryOptions.ApiKey,
                _cloudinaryOptions.ApiSecret);

            _cloudinary = new Cloudinary(account);
        }
コード例 #5
0
        public PictureService(IOptions <CloudinaryOptions> options, ApplicationDbContext dbContext,
                              IMapper mapper)
        {
            this._dbContext = dbContext;
            this._mapper    = mapper;

            this.options = options.Value;

            var account = new Account(
                this.options.CloudName,
                this.options.ApiKey,
                this.options.ApiSecret);

            this.cloudinary = new CloudinaryDotNet.Cloudinary(account);
        }
コード例 #6
0
        public CreatePictureCommandHandler(
            IAuctionSystemDbContext context,
            ICurrentUserService currentUserService,
            IMapper mapper,
            IOptions<CloudinaryOptions> options)
        {
            this.context = context;
            this.currentUserService = currentUserService;
            this.mapper = mapper;
            this.options = options.Value;

            var account = new Account(
                this.options.CloudName,
                this.options.ApiKey,
                this.options.ApiSecret);

            this.cloudinary = new Cloudinary(account);
        }
コード例 #7
0
 public PlanetCollageController(IOptions <CloudinaryOptions> cloudinaryOptions)
 {
     CloudinaryOptions = cloudinaryOptions.Value;
 }