Esempio n. 1
0
 public MyBlobsController(IPermissionService permissionService, IBlobService blobService, IBlobSetService blobSetService, IEventService eventService)
 {
     this.permissionService = permissionService;
     this.blobService       = blobService;
     this.blobSetService    = blobSetService;
     this.eventService      = eventService;
 }
Esempio n. 2
0
 public KeyRotationSampleController(ICosmosDbService cosmosDbService, IBlobService blobService, IKeyRotation keyRotation, ILogger <KeyRotationSampleController> logger)
 {
     this.cosmosDbService = cosmosDbService;
     this.blobService     = blobService;
     this.keyRotation     = keyRotation;
     this.logger          = logger;
 }
Esempio n. 3
0
 public VisualizationService(IBaseRepository baseRepository, IMapper mapper, IBlobService blobService, IHubContext <PushingHub> hubContext)
 {
     _hubContext     = hubContext;
     _blobService    = blobService;
     _baseRepository = baseRepository;
     _mapper         = mapper;
 }
 public BlobManagerController(
     IHttpContextAccessor accessor,
     IAuthorizationService authorizationService,
     IBlobService blobService) : base(accessor, authorizationService)
 {
     _blobService = blobService;
 }
Esempio n. 5
0
 public HomeController(ILogger <HomeController> logger, IUserService userService, IConfiguration configuration, IBlobService blobService)
 {
     _logger          = logger;
     this.userService = userService;
     this.config      = configuration;
     this.blobService = blobService;
 }
Esempio n. 6
0
 public ImportDataMartData(IReportService reportService, IBlobService blobService, IOptions <List <DataMartSettings> > dataMartConfigs, IImportDataMartHandler importDataMartHandler, IConfigureDataModelHandler configureDataModelHandler)
 {
     _reportService             = reportService;
     _dataMartConfigs           = dataMartConfigs.Value;
     _importDataMartHandler     = importDataMartHandler;
     _configureDataModelHandler = configureDataModelHandler;
 }
Esempio n. 7
0
 public JogadorService(IJogadorRepository repository, IBlobService blobService, IQueueMessage queueService, IJogadorHistoricoRepository historicoRepository)
 {
     _repository          = repository;
     _queueService        = queueService;
     _blobService         = blobService;
     _historicoRepository = historicoRepository;
 }
Esempio n. 8
0
        public UsersController(
            ApplicationRepository appRepo,
            AdminRepository adminRepo,
            IModelMetadataProvider metadataProvider,
            ILogger <UsersController> logger,
            IOptions <GlobalOptions> options,
            IServiceProvider serviceProvider,
            IEmailSender emailSender,
            EmailTemplatesProvider emailTemplates,
            IStringLocalizer <Strings> localizer,
            ITenantIdAccessor tenantIdAccessor,
            IBlobService blobService) : base(logger, localizer)
        {
            _appRepo          = appRepo;
            _adminRepo        = adminRepo;
            _tenantIdAccessor = tenantIdAccessor;
            _blobService      = blobService;
            _metadataProvider = metadataProvider;
            _logger           = logger;
            _emailSender      = emailSender;
            _emailTemplates   = emailTemplates;
            _options          = options.Value;
            _localizer        = localizer;

            // we use this trick since this is an optional dependency, it will resolve to null if
            // the embedded identity server is not enabled
            _userManager = (UserManager <EmbeddedIdentityServerUser>)serviceProvider.GetService(typeof(UserManager <EmbeddedIdentityServerUser>));
        }
 public ConnectionController(ILogger <ConnectionController> logger, IBlobService blobService, IConfiguration configuration, IMemoryCache memoryCache)
 {
     _logger            = logger;
     this.blobService   = blobService;
     this.Configuration = configuration;
     _cache             = memoryCache;
 }
Esempio n. 10
0
 public ReportController(IReportService reportService, IUserService userService, IBlobService blobService, IBlobSetService blobSetService)
 {
     this.reportService = reportService;
     this.userService = userService;
     this.blobService = blobService;
     this.blobSetService = blobSetService;
 }
Esempio n. 11
0
        public ImagesController(IBlobService blobService, IQueueService queueService, ILogger <ImagesController> logger)
        {
            _blobService  = blobService;
            _queueService = queueService;

            _logger = logger;
        }
Esempio n. 12
0
 public ReportController()
 {
     this.reportService  = new ReportService(this.Context);
     this.userService    = new UserService(this.Context);
     this.blobService    = new BlobService(this.Context, CloudStorageAccount.Parse(ConfigReader.GetConfigValue("DataConnectionString")), ConfigReader.GetConfigValue("MainBlobContanier"));
     this.blobSetService = new BlobSetService(this.Context);
 }
Esempio n. 13
0
 public PostService(
     IPostRepository postRepository, IBlobService blobService, IQueueMessage queueService)
 {
     _postRepository = postRepository;
     _blobService    = blobService;
     _queueService   = queueService;
 }
Esempio n. 14
0
 public ReportController(IReportService reportService, IUserService userService, IBlobService blobService, IBlobSetService blobSetService)
 {
     this.reportService  = reportService;
     this.userService    = userService;
     this.blobService    = blobService;
     this.blobSetService = blobSetService;
 }
 public PostController(
     IPostService postService,
     IBlobService blobService)
 {
     _postService = postService;
     _blobService = blobService;
 }
Esempio n. 16
0
 public VideoService(IRepository <AnimalVideo> videoRepository, IBlobService blobService,
                     IRepository <Animal> animalRepository)
 {
     _videoRepository  = videoRepository;
     _blobService      = blobService;
     _animalRepository = animalRepository;
 }
        public void UnitTestDoWork_With_Now_Not_In_The_Scheduled_Time()
        {
            MockRepository mockRepository     = new MockRepository();
            const string   StorageAccountName = "storageAccountName";
            const string   BlobContainerName  = "blobContainerName";

            // Set start time to 1 hour before now.
            TimeSpan dailyStartTime = (DateTime.Now - DateTime.Today).Add(this.oneHour);

            // Set end time to 1 hour after now.
            TimeSpan  dailyEndTime             = (DateTime.Now - DateTime.Today).Add(this.oneHour);
            const int PollingIntervalInMinutes = 60;

            // Arrange
            IBlobService mockBlobService = mockRepository.StrictMock <IBlobService>();

            // Act
            mockRepository.ReplayAll();
            BlobContainerDeleteForecastWorker blobContainerDeleteForecastWorker = new BlobContainerDeleteForecastWorker(
                mockBlobService,
                StorageAccountName,
                new[] { BlobContainerName },
                new[] { new ScheduleDay {
                            DayOfWeek = DateTime.Now.DayOfWeek, EndTime = dailyEndTime, StartTime = dailyStartTime
                        } },
                PollingIntervalInMinutes);

            blobContainerDeleteForecastWorker.DoWork();

            // Assert
            mockRepository.VerifyAll();
        }
Esempio n. 18
0
        private static async Task RunBlob(IBlobService blobService)
        {
            using (var content = typeof(Program).Assembly.GetManifestResourceStream("ExampleClient.coffee.jpg"))
            {
                var etag = await blobService.UploadAsync(content, 82825, "image/jpeg");

                using (var returnContent = await blobService.GetAsync(etag, "attachment; filename=my-coffee.jpg"))
                {
                    content.Seek(0, SeekOrigin.Begin);

                    int len;
                    var readBuf = new byte[8192];
                    var compBuf = new byte[readBuf.Length];
                    while ((len = content.Read(readBuf, 0, readBuf.Length)) > 0)
                    {
                        if (len != returnContent.Read(compBuf, 0, len))
                        {
                            throw new Exception("Invalid content, lengths are different");
                        }

                        for (var i = 0; i < len; i++)
                        {
                            if (readBuf[i] != compBuf[i])
                            {
                                throw new Exception("Invalid content, not same results");
                            }
                        }
                    }
                }
            }
        }
Esempio n. 19
0
 public PoliceController(IPolicePresentation policePresentation, IMapper mapper, IUserService userService, IBlobService blobService)
 {
     _policePresentation = policePresentation;
     _mapper             = mapper;
     _userService        = userService;
     _blobService        = blobService;
 }
Esempio n. 20
0
 public PostController(IPostRepo postRepo, IUserRepo userRepo, ICommentRepo commentRepo, IBlobService blobService)
 {
     _postRepo    = postRepo;
     _userRepo    = userRepo;
     _commentRepo = commentRepo;
     _blobService = blobService;
 }
Esempio n. 21
0
 public NewFacilityFunction(IFacilityRepository facilityRepository, IDateTimeService dateTimeService, IBlobService blobService, IImageProcessor imageProcessor)
 {
     _facilityRepository = facilityRepository;
     _dateTimeService    = dateTimeService;
     _blobService        = blobService;
     _imageProcessor     = imageProcessor;
 }
Esempio n. 22
0
 public MyBlobsController(IPermissionService permissionService, IBlobService blobService, IBlobSetService blobSetService, IEventService eventService)
 {
     this.permissionService = permissionService;
     this.blobService = blobService;
     this.blobSetService = blobSetService;
     this.eventService = eventService;
 }
Esempio n. 23
0
 public AnimalImageService(IRepository <Image> imageRepository, IBlobService blobService,
                           IRepository <Animal> animalRepository)
 {
     _imageRepository  = imageRepository;
     _blobService      = blobService;
     _animalRepository = animalRepository;
 }
Esempio n. 24
0
 public FileService(
     IRestService rest,
     IBlobService blob)
 {
     _rest = rest;
     _blob = blob;
 }
Esempio n. 25
0
 public MyBlobsController()
 {
     this.permissionService = new PermissionService(this.Context);
     this.blobService = new BlobService(this.Context, CloudStorageAccount.Parse(ConfigReader.GetConfigValue("DataConnectionString")), ConfigReader.GetConfigValue("MainBlobContanier"));
     this.blobSetService = new BlobSetService(this.Context);
     this.eventService = new EventService(this.Context);
 }
Esempio n. 26
0
 public TimeSeriesService(
     IRestService rest,
     IBlobService blob)
 {
     _rest = rest;
     _blob = blob;
 }
Esempio n. 27
0
 public CustomerProfileController(IUserService userService, IBlobService blobService, IContainerNameService containerNameService, IFaceRecognitionService faceRecognitionService)
 {
     this.userService            = userService;
     this.blobService            = blobService;
     this.containerNameService   = containerNameService;
     this.faceRecognitionService = faceRecognitionService;
 }
 public MediaController(IMapper mapper, IBlobManager blobManager, IBlobService blobService, IEquipmentBlobManager equipmentBlobManager)
 {
     __Mapper               = mapper ?? throw new ArgumentNullException(nameof(mapper));
     __BlobManager          = blobManager ?? throw new ArgumentNullException(nameof(blobManager));
     __BlobService          = blobService ?? throw new ArgumentNullException(nameof(blobService));
     __EquipmentBlobManager = equipmentBlobManager ?? throw new ArgumentNullException(nameof(equipmentBlobManager));
 }
Esempio n. 29
0
 public ReportController()
 {
     this.reportService = new ReportService(this.Context);
     this.userService = new UserService(this.Context);
     this.blobService = new BlobService(this.Context, CloudStorageAccount.Parse(ConfigReader.GetConfigValue("DataConnectionString")), ConfigReader.GetConfigValue("MainBlobContanier"));
     this.blobSetService = new BlobSetService(this.Context);
 }
Esempio n. 30
0
 public PolicePresentation(
     IPoliceRepository policeRepo,
     ICitizenRepository citizenRepo,
     IPoliceAcademyRepository policeAcademyRepo,
     IUserService userService,
     IViolationsRepository violationsRepository,
     IPoliceCallRepository policeCallRepo,
     IQuestionsRepository questionsRepo,
     IAnswerRepository answerRepo,
     IShiftRepository shiftRepo,
     IMapper mapper,
     IBlobService blobService
     )
 {
     _policeRepo           = policeRepo;
     _citizenRepo          = citizenRepo;
     _policeAcademyRepo    = policeAcademyRepo;
     _userService          = userService;
     _violationsRepository = violationsRepository;
     _policeCallRepo       = policeCallRepo;
     _questionsRepo        = questionsRepo;
     _answerRepo           = answerRepo;
     _mapper      = mapper;
     _blobService = blobService;
     _shiftRepo   = shiftRepo;
 }
Esempio n. 31
0
 public MyBlobsController()
 {
     this.permissionService = new PermissionService(this.Context);
     this.blobService       = new BlobService(this.Context, CloudStorageAccount.Parse(ConfigReader.GetConfigValue("DataConnectionString")), ConfigReader.GetConfigValue("MainBlobContanier"));
     this.blobSetService    = new BlobSetService(this.Context);
     this.eventService      = new EventService(this.Context);
 }
Esempio n. 32
0
 public BlobController(IBlobService blobService, IBlobSetService blobSetService, IRoleService roleService, IUserService userService, IPermissionService permissionService)
 {
     this.blobService = blobService;
     this.blobSetService = blobSetService;
     this.roleService = roleService;
     this.userService = userService;
     this.permissionService = permissionService;
 }
Esempio n. 33
0
 public PackagesController(IPackageBuilder packageBuilder,
     IPackageService packageService,
     IBlobService blobService)
 {
     this.packageBuilder = packageBuilder;
     this.packageService = packageService;
     this.blobService = blobService;
 }
Esempio n. 34
0
 public FileService(IBlobService blobService, DbContext unitOfWork, ICurrentUser currentUser)
 {
     _blobService = blobService;
     _unitOfWork = unitOfWork;
     _nodeRepository = unitOfWork.Set<Node>();
     _currentUser = currentUser;
     _modelState = new ModelState();
 }
Esempio n. 35
0
 public EventPlanningController(IMLService mLService, IServiceService serviceService, IEventService eventService, IServicePackageService servicePackageService, IBlobService blobService)
 {
     this.mLService             = mLService;
     this.serviceService        = serviceService;
     this.eventService          = eventService;
     this.servicePackageService = servicePackageService;
     this.blobService           = blobService;
 }
Esempio n. 36
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IdentifyFaceHttpTrigger"/> class.
 /// </summary>
 /// <param name="settings"><see cref="AppSettings"/> instance.</param>
 /// <param name="blob"><see cref="IBlobService"/> instance.</param>
 /// <param name="face"><see cref="IFaceService"/> instance.</param>
 /// <param name="handler"><see cref="IEmbeddedRequestHandler"/> instance.</param>
 /// <param name="logger"><see cref="ILogger{IdentifyFaceHttpTrigger}"/> instance.</param>
 public IdentifyFaceHttpTrigger(AppSettings settings, IBlobService blob, IFaceService face, IEmbeddedRequestHandler handler, ILogger <IdentifyFaceHttpTrigger> logger)
 {
     this._settings = settings ?? throw new ArgumentNullException(nameof(settings));
     this._blob     = blob ?? throw new ArgumentNullException(nameof(blob));
     this._face     = face ?? throw new ArgumentNullException(nameof(face));
     this._handler  = handler ?? throw new ArgumentNullException(nameof(handler));
     this._logger   = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Esempio n. 37
0
 /// <summary>
 /// Initializes a new instance of the CommunityController class.
 /// </summary>
 /// <param name="communityService">Instance of community Service</param>
 /// <param name="profileService">Instance of profile Service</param>
 public CommunityController(ICommunityService communityService, IProfileService profileService, INotificationService queueService, IBlobService blobService, IContentService contentService)
     : base(profileService)
 {
     _communityService = communityService;
     _notificationService = queueService;
     _blobService = blobService;
     _contentService = contentService;
 }
Esempio n. 38
0
 public ContainerController(
     ILogger <ContainerController> logger,
     IBlobService blobService
     )
 {
     _logger     = logger;
     _blobServie = blobService;
 }
Esempio n. 39
0
 public UploadController(
     IProductService productService,
     IBlobService blobService,
     IZipService zipService)
 {
     this.productService = productService;
     this.blobService = blobService;
     this.zipService = zipService;
 }
Esempio n. 40
0
 public AccountContext(
     IDbContext dbContext,
     IEmailService mailService,
     AccountManager accoutnManager,
     IBlobService blobService,
     IJobManager jobManager)
 {
     this.dbContext = dbContext;
     this.accountManager = accoutnManager;
     this.blobService = blobService;
     this.jobManager = jobManager;
     this.mailService = mailService;
 }
 public BlobContainerDeleteForecastWorker(
     IBlobService blobService,
     string storageAccountName,
     string[] containerNames,
     ScheduleDay[] scheduleDays,
     int pollingIntervalInMinutes)
     : base(GetWorkerId(storageAccountName))
 {
     this.blobService = blobService;
     this.storageAccountName = storageAccountName;
     this.containerNames = containerNames;
     this.scheduleDays = scheduleDays;
     this.pollingIntervalInMinutes = pollingIntervalInMinutes;
 }
Esempio n. 42
0
 public ManagementController(IBlobService blobService, IBlobSetService blobSetService, IInvitationService invitationService)
 {
     this.blobService = blobService;
     this.blobSetService = blobSetService;
     this.invitationService = invitationService;
 }
Esempio n. 43
0
 public ManagementController()
 {
     this.blobService = new BlobService(this.Context, CloudStorageAccount.Parse(ConfigReader.GetConfigValue("DataConnectionString")), ConfigReader.GetConfigValue("MainBlobContanier"));
     this.blobSetService = new BlobSetService(this.Context);
     this.invitationService = new InvitationService(this.Context);
 }
Esempio n. 44
0
 private static BlobController GetBlobController(IBlobService service)
 {
     return new BlobController(service, new MockBlobSetService(), null, null, null);
 }
Esempio n. 45
0
 public StorageRepository(IBlobService blobService)
 {
     this.blobService = blobService;
 }
Esempio n. 46
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FileController"/> class.
 /// </summary>
 /// <param name="blobService">Instance of a blob service</param>
 public FileController(IBlobService blobService)
 {
     _blobService = blobService;
 }
 /// <summary>
 /// default controller
 /// </summary>
 public TestController(IMongoService mongo, IBlobService blob, ITestService test)
 {
     mongoService = mongo;
     blobService = blob;
     testservice = test;
 }