Esempio n. 1
0
        public FindAnimatedByPage(IMongoQueryable <AnimatedImage> animatedImages, IFolderFromURL folderFromURL, BlobName.IFormatter formatter)
        {
            _AnimatedImages = animatedImages ?? throw new ArgumentNullException(nameof(animatedImages));

            _FolderFromURL = folderFromURL ?? throw new ArgumentNullException(nameof(folderFromURL));
            _Formatter     = formatter ?? throw new ArgumentNullException(nameof(formatter));
        }
Esempio n. 2
0
        public NotTwittedAnimated(IMongoCollection <AnimatedImage> animatedImages, IRandomSelector randomSelector, int topQueryCount, IFolderFromURL folderFromURL, BlobName.IFormatter formatter)
        {
            _AnimatedImages = animatedImages ?? throw new ArgumentNullException(nameof(animatedImages));
            _RandomSelector = randomSelector ?? throw new ArgumentNullException(nameof(randomSelector));

            if (topQueryCount <= 0)
            {
                throw new ArgumentException("topQueryCount повинно бути більше ніж 0", nameof(topQueryCount));
            }

            _TopQueryCount = topQueryCount;

            _FolderFromURL = folderFromURL ?? throw new ArgumentNullException(nameof(folderFromURL));
            _Formatter     = formatter ?? throw new ArgumentNullException(nameof(formatter));
        }