Beispiel #1
0
 public VocabularyScheduledJob(ReferenceConverter referenceConverter, IContentLoader contentLoader, IBlobRepository blobRepository, ISentencezer sentencezer)
 {
     _referenceConverter = referenceConverter;
     _contentLoader      = contentLoader;
     _blobRepository     = blobRepository;
     _sentencezer        = sentencezer;
 }
Beispiel #2
0
        public DogController(IRepository<DogProfile> dogRepo,
                                IRepository<User> userRepo,
                                IRepository<DogMedicalRecord> recordRepo,
                                IRepository<DogNote> dogNoteRepo,
                                IRepository<NoteType> noteTypeRepo,
                                IBlobRepository blobRepo, IRepository<DogEvent> dogEventRepo, IRepository<EventType> dogEventTypeRepo, IRepository<DogSkill> dogSkillRepo)
        {
            if (dogRepo == null)
                throw new ArgumentNullException("dogRepo");
            _dogRepo = dogRepo;

            if (userRepo == null)
                throw new ArgumentNullException("userRepo");
            _userRepo = userRepo;

            if (recordRepo == null)
                throw new ArgumentNullException("recordRepo");
            _recordRepo = recordRepo;

            if (dogNoteRepo == null)
                throw new ArgumentNullException("dogNoteRepo");
            _dogNoteRepo = dogNoteRepo;

            if (noteTypeRepo == null)
                throw new ArgumentNullException("noteTypeRepo");
            _noteTypeRepo = noteTypeRepo;

            if (blobRepo == null)
                throw new ArgumentNullException("blobRepo");
            _blobRepo = blobRepo;
            _dogEventRepo = dogEventRepo;
            _dogEventTypeRepo = dogEventTypeRepo;
            _dogSkillRepo = dogSkillRepo;
        }
Beispiel #3
0
 public AzureService(IConfiguration configuration, IBlobRepository blobRepository, ILogger<AzureService> logger)
 {
     _blobRepository = blobRepository;
     _outputDirectory = configuration.GetSection("OutputDirectory").Value;
     _inputDirectory = configuration.GetSection("InputDirectory").Value;
     _logger = logger;
 }
Beispiel #4
0
        public DogController(IRepository <DogProfile> dogRepo,
                             IRepository <DogImage> dogImageRepo,
                             IRepository <User> userRepo,
                             IBlobRepository blobRepo)
        {
            if (dogRepo == null)
            {
                throw new ArgumentNullException("dogRepo");
            }
            _dogRepo = dogRepo;

            if (dogImageRepo == null)
            {
                throw new ArgumentNullException("dogImageRepo");
            }
            _dogImageRepo = dogImageRepo;

            if (userRepo == null)
            {
                throw new ArgumentNullException("userRepo");
            }
            _userRepo = userRepo;

            if (blobRepo == null)
            {
                throw new ArgumentNullException("blobRepo");
            }
            _blobRepo = blobRepo;
        }
        public MedicalRecordsController(IRepository <DogProfile> dogProfileRepo,
                                        IRepository <DogMedicalRecord> dogMedicalRecordsRepo,
                                        IRepository <DogMedicalRecordImage> dogMedicalRecordImageRepo,
                                        IBlobRepository blobRepo)
        {
            if (dogProfileRepo == null)
            {
                throw new ArgumentNullException("dogProfileRepo");
            }
            _dogProfileRepo = dogProfileRepo;

            if (dogMedicalRecordsRepo == null)
            {
                throw new ArgumentNullException("dogMedicalRecordsRepo");
            }
            _dogMedicalRecordsRepo = dogMedicalRecordsRepo;

            if (dogMedicalRecordImageRepo == null)
            {
                throw new ArgumentNullException("dogMedicalRecordImageRepo");
            }
            _dogMedicalRecordImageRepo = dogMedicalRecordImageRepo;

            if (blobRepo == null)
            {
                throw new ArgumentNullException("blobRepo");
            }
            _blobRepo = blobRepo;
        }
Beispiel #6
0
 public BlobStore(IBlobRepository blobRepository, IBlobEntityResolver blobEntityResolver,
                  IOptions <DigniteBlobOptions> options)
 {
     _blobRepository     = blobRepository;
     _blobEntityResolver = blobEntityResolver;
     _options            = options;
 }
        public MedicalRecordsController(IRepository<DogProfile> dogProfileRepo,
                                        IRepository<DogMedicalRecord> dogMedicalRecordsRepo,
                                        IRepository<DogMedicalRecordImage> dogMedicalRecordImageRepo,
                                        IRepository<MedicalRecordType> medicalRecordTypesRepo,
                                        IBlobRepository blobRepo)
        {
            if (dogProfileRepo == null)
                throw new ArgumentNullException("dogProfileRepo");
            _dogProfileRepo = dogProfileRepo;

            if (dogMedicalRecordsRepo == null)
                throw new ArgumentNullException("dogMedicalRecordsRepo");
            _dogMedicalRecordsRepo = dogMedicalRecordsRepo;

            if (dogMedicalRecordImageRepo == null)
                throw new ArgumentNullException("dogMedicalRecordImageRepo");
            _dogMedicalRecordImageRepo = dogMedicalRecordImageRepo;

            if (medicalRecordTypesRepo == null)
                throw new ArgumentNullException("medicalRecordTypesRepo");
            _medicalRecordTypesRepo = medicalRecordTypesRepo;

            if (blobRepo == null)
                throw new ArgumentNullException("blobRepo");
            _blobRepo = blobRepo;
        }
Beispiel #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Functions"/> class.
 /// </summary>
 /// <param name="userAuthenticationService">The user authentication service to use to identify the calling user.</param>
 /// <param name="blobRepository">The blob respository to use for storing audio files.</param>
 public Functions(
     IUserAuthenticationService userAuthenticationService,
     IBlobRepository blobRepository)
 {
     this.UserAuthenticationService = userAuthenticationService;
     this.BlobRepository            = blobRepository;
 }
Beispiel #9
0
 public SearchFactory(IBlobRepository blobRepository, IVocabulary vocabulary, IDocumentStorage documentStorage, ITokinizer tokinizer)
 {
     _blobRepository  = blobRepository;
     _vocabulary      = vocabulary;
     _documentStorage = documentStorage;
     _tokinizer       = tokinizer;
 }
Beispiel #10
0
        public CloudLock(string lockName)
        {
            IKernel kernel = ServiceLocator.Current.GetInstance <IKernel>();

            BlobRepository = kernel.Get <IBlobRepository <CloudLockBlobData> >();
            Blob           = EnsureBlobExists(lockName);

            try
            {
                leaseId            = Blob.AcquireLease(TimeSpan.FromSeconds(30), Guid.NewGuid().ToString());
                LeaseRenewalThread = new Thread(() =>
                {
                    try
                    {
                        while (true)
                        {
                            Thread.Sleep(TimeSpan.FromSeconds(30));
                            Blob.ReleaseLease(new AccessCondition()
                            {
                                LeaseId = leaseId
                            });
                        }
                    }
                    catch (ThreadAbortException)
                    {
                    }
                });
                LeaseRenewalThread.Start();
            }
            catch (StorageException)
            {
                leaseId = null;
            }
        }
 public ResourceService(IRepository <Resource> resourceRepository, IUnitOfWork unitOfWork, IBlobRepository <ResourceReference> blobRepository)
 {
     _resourceRepository        = resourceRepository;
     _unitOfWork                = unitOfWork;
     _blobRepository            = blobRepository;
     userManagementMicroservice = new UserManagementMicroservice();
 }
Beispiel #12
0
 public FilesController(
     IQueryableRepository <Entities.FileInfo> filesRepository,
     IBlobRepository blobRepository)
 {
     this.filesRepository = filesRepository;
     this.blobRepository  = blobRepository;
 }
Beispiel #13
0
 public AttachmentService(IGenericRepository<Attachment> attachmentRepository,
     IDocumentQuery<Attachment> documentQuery,
        IBlobRepository<Attachment> blobRepository)
 {
     _attachmentRepository = attachmentRepository;
     _documentQuery = documentQuery;
     _blobRepository = blobRepository;
 }
Beispiel #14
0
 public PhotoService(ITableRepository tableRepository,
                     IBlobRepository blobRepository,
                     IVisionService visionService)
 {
     _tableRepository = tableRepository;
     _blobRepository  = blobRepository;
     _visionService   = visionService;
 }
Beispiel #15
0
 public DogController(IRepository <DogProfile> dogRepo,
                      IRepository <DogImage> dogImageRepo,
                      IBlobRepository blobRepo)
 {
     _dogRepo      = dogRepo;
     _dogImageRepo = dogImageRepo;
     _blobRepo     = blobRepo;
 }
Beispiel #16
0
 public DogController(IRepository<DogProfile> dogRepo,
                      IRepository<DogImage> dogImageRepo,
                      IBlobRepository blobRepo)
 {
     _dogRepo = dogRepo;
     _dogImageRepo = dogImageRepo;
     _blobRepo = blobRepo;
 }
Beispiel #17
0
        public CreateBlobContainerState(IBlobRepository blobRepository, BlobStoreConnection blobStoreConnection)
        {
            blobRepository.Verify(nameof(blobRepository)).IsNotNull();
            blobStoreConnection.Verify(nameof(blobStoreConnection)).IsNotNull();
            blobStoreConnection.ContainerName.Verify(nameof(blobStoreConnection.ContainerName)).IsNotNull();

            _blobStoreConnection = blobStoreConnection;
            _blobRepository      = blobRepository;
        }
 public InstallationPackageRepository(IKojtoCadVersionProvider versionProvider,
                                      IAppConfigurationProvider configurationProvider, IKojtoCadVersionValidator versionValidator,
                                      IBlobRepository blobRepository)
 {
     _versionProvider       = versionProvider;
     _configurationProvider = configurationProvider;
     _versionValidator      = versionValidator;
     _blobRepository        = blobRepository;
 }
        private void Upload(BlobInfo blob, string payload, IBlobRepository repository)
        {
            var uploadBuffer = Encoding.UTF8.GetBytes(payload);

            using (var uploadStream = new MemoryStream(uploadBuffer))
            {
                repository.Upload(blob, uploadStream);
            }
        }
        public BlobLeaseManager(IBlobRepository blobRepository, string leaseId)
        {
            //Requires.NotNull(blobRepository, nameof(blobRepository));
            //Requires.NotNullOrWhiteSpace(leaseId, nameof(leaseId));

            this.blobRepository  = blobRepository;
            this.leaseIdentifier = leaseId;

            this.blobRepository.CreateIfNotExistsAsync(LeaseContainerName).Wait();
        }
 public BlobsAppService(
     IBlobContainerFactory blobContainerFactory,
     IBlobContainerConfigurationProvider configurationProvider,
     IBlobRepository blobRepository
     )
 {
     _blobContainerFactory  = blobContainerFactory;
     _configurationProvider = configurationProvider;
     _blobRepository        = blobRepository;
 }
        public HomeController(IUserService userService, ITweetService tweetService, IConfiguration configuration, IBlobRepository blobRepository)
        {
            _userService    = userService ?? throw new ArgumentNullException(nameof(userService));
            _tweetService   = tweetService ?? throw new ArgumentNullException(nameof(tweetService));
            _configuration  = configuration ?? throw new ArgumentNullException(nameof(configuration));
            _blobRepository = blobRepository ?? throw new ArgumentNullException(nameof(blobRepository));

            _userFilePath  = $"{_path}{Common.Constants.Constants.UserFile}";
            _tweetFilePath = $"{_path}{Common.Constants.Constants.TweetFile}";
        }
 public BlobsController(IHttpContextAccessor ctx,
                        ISensorRepository sensors,
                        ISensorLinkRepository links,
                        IBlobRepository blobs,
                        IBlobService blobService,
                        IApiKeyRepository keys) : base(ctx, sensors, links, keys)
 {
     this.m_blobs       = blobs;
     this.m_blobService = blobService;
 }
 public DeleteBlobHandler(
     ICommandDispatcher bus,
     IMapper mapper,
     IBlobUnitOfWork blobUnitOfWork,
     IBlobRepository blobRepository,
     ILogger <DeleteBlobCommand> logger)
     : base(bus, mapper, logger)
 {
     _blobUnitOfWork = blobUnitOfWork;
     _blobRepository = blobRepository;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="EventFilesController"/> class.
 /// </summary>
 /// <param name="logger">The ILogger object which logs errors and information</param>
 /// <param name="telemetryClient">The Application Insights telemetry client</param>
 /// <param name="blobRepository">Repository for handling Azure Blob Storage operations like uploading and deleting files from blob.</param>
 /// <param name = "eventWorkflowHelper" > Helper methods for CRUD operations on event.</param>
 public EventFilesController(
     ILogger <EventFilesController> logger,
     TelemetryClient telemetryClient,
     IBlobRepository blobRepository,
     IEventWorkflowHelper eventWorkflowHelper)
     : base(telemetryClient)
 {
     this.logger              = logger;
     this.blobRepository      = blobRepository;
     this.eventWorkflowHelper = eventWorkflowHelper;
 }
Beispiel #26
0
        private static IVocabulary CreateVocabulary(IBlobRepository blobRepository)
        {
            var vocabularyItems = blobRepository.Load <List <VocabularyItem> >("Vocabulary");
            var vocabulary      = new Vocabulary();

            if (vocabularyItems != null)
            {
                vocabulary.Import(vocabularyItems);
            }
            return(vocabulary);
        }
 public EntitiesController(
     IEntitiesRepository entitiesRepository,
     EntitiesDBContext dbContext,
     IQueryableRepository <Entities.FileInfo> filesRepository,
     IBlobRepository blobRepository)
 {
     this.entitiesRepository = entitiesRepository;
     this.dbContext          = dbContext;
     this.filesRepository    = filesRepository;
     this.blobRepository     = blobRepository;
 }
 public MedicalRecordsController(IRepository <DogProfile> dogProfileRepo,
                                 IRepository <DogMedicalRecord> dogMedicalRecordsRepo,
                                 IRepository <DogMedicalRecordImage> dogMedicalRecordImageRepo,
                                 IRepository <MedicalRecordType> medicalRecordTypesRepo,
                                 IBlobRepository blobRepo)
 {
     _dogProfileRepo            = dogProfileRepo;
     _dogMedicalRecordsRepo     = dogMedicalRecordsRepo;
     _dogMedicalRecordImageRepo = dogMedicalRecordImageRepo;
     _medicalRecordTypesRepo    = medicalRecordTypesRepo;
     _blobRepo = blobRepo;
 }
Beispiel #29
0
 public NotesController(IRepository <DogNote> dogNoteRepo,
                        IRepository <NoteType> noteTypeRepo,
                        IRepository <DogNoteAttachment> dogNoteAttachmentRepo,
                        IRepository <DogProfile> dogProfileRepo,
                        IBlobRepository blobRepo)
 {
     _dogNoteRepo           = dogNoteRepo;
     _noteTypeRepo          = noteTypeRepo;
     _dogNoteAttachmentRepo = dogNoteAttachmentRepo;
     _blobRepo       = blobRepo;
     _dogProfileRepo = dogProfileRepo;
 }
Beispiel #30
0
 public NotesController(IRepository<DogNote> dogNoteRepo,
                        IRepository<NoteType> noteTypeRepo,
                        IRepository<DogNoteAttachment> dogNoteAttachmentRepo,
                        IRepository<DogProfile> dogProfileRepo,
                        IBlobRepository blobRepo)
 {
     _dogNoteRepo = dogNoteRepo;
     _noteTypeRepo = noteTypeRepo;
     _dogNoteAttachmentRepo = dogNoteAttachmentRepo;
     _blobRepo = blobRepo;
     _dogProfileRepo = dogProfileRepo;
 }
 public MedicalRecordsController(IRepository<DogProfile> dogProfileRepo,
                                 IRepository<DogMedicalRecord> dogMedicalRecordsRepo,
                                 IRepository<DogMedicalRecordImage> dogMedicalRecordImageRepo,
                                 IRepository<MedicalRecordType> medicalRecordTypesRepo,
                                 IBlobRepository blobRepo)
 {
     _dogProfileRepo = dogProfileRepo;
     _dogMedicalRecordsRepo = dogMedicalRecordsRepo;
     _dogMedicalRecordImageRepo = dogMedicalRecordImageRepo;
     _medicalRecordTypesRepo = medicalRecordTypesRepo;
     _blobRepo = blobRepo;
 }
Beispiel #32
0
 public Functions(
     IUserAuthenticationService userAuthenticationService,
     IBlobRepository blobRepository,
     IEventGridSubscriberService eventGridSubscriberService,
     IEventGridPublisherService eventGridPublisherService,
     IAudioTranscriptionService audioTranscriptionService)
 {
     this.UserAuthenticationService  = userAuthenticationService;
     this.BlobRepository             = blobRepository;
     this.EventGridPublisherService  = eventGridPublisherService;
     this.EventGridSubscriberService = eventGridSubscriberService;
     this.AudioTranscriptionService  = audioTranscriptionService;
 }
Beispiel #33
0
        /// <summary>
        /// Storage back up
        /// </summary>
        /// <param name="config"></param>
        /// <param name="logger"></param>
        public RestoreBackupWorker(IConfigurationRoot config,
                                   ILogger <RestoreBackupWorker> logger,
                                   IStorageRepository storageRepository,
                                   IBlobRepository blobRepository)
        {
            _logger = logger;

            _config = config;

            _storageRepository = storageRepository;

            _blobRepository = blobRepository;
        }
Beispiel #34
0
        /// <summary>
        /// Storage back up
        /// </summary>
        /// <param name="logger"></param>
        public StorageBackupWorker(
            ILogger <StorageBackupWorker> logger,
            IStorageQueueRepository queueRepository,
            ILogTableRepository logRepository,
            IBlobRepository blobRepository)
        {
            _logger = logger;

            _queueRepository = queueRepository;

            _logRepository = logRepository;

            _blobRepository = blobRepository;
        }
Beispiel #35
0
 public GitService(
     IdeContext context,
     IGitRepository gitRepository,
     IBlobRepository blobRepository,
     ILogger <GitService> logger,
     IConfiguration configuration,
     IProjectStructureService projectStructureService)
 {
     _logger                  = logger;
     _context                 = context;
     _configuration           = configuration;
     _gitRepository           = gitRepository;
     _blobRepository          = blobRepository;
     _projectStructureService = projectStructureService;
 }
        private string Download(string id, IBlobRepository repository)
        {
            var blob = repository.GetById(id);

            if (blob != null && blob.Size > 0)
            {
                var downloadBuffer = new byte[blob.Size];
                using (var downloadStream = new MemoryStream(downloadBuffer))
                {
                    repository.Download(blob, downloadStream);
                }
                return(Encoding.UTF8.GetString(downloadBuffer));
            }
            return(string.Empty);
        }
Beispiel #37
0
        public DogController(IRepository<DogProfile> dogRepo,
                             IRepository<DogImage> dogImageRepo,
                             IBlobRepository blobRepo)
        {
            if (dogRepo == null)
                throw new ArgumentNullException("dogRepo");
            _dogRepo = dogRepo;

            if (dogImageRepo == null)
                throw new ArgumentNullException("dogImageRepo");
            _dogImageRepo = dogImageRepo;

            if (blobRepo == null)
                throw new ArgumentNullException("blobRepo");
            _blobRepo = blobRepo;
        }
        public NotesController(IRepository<DogNote> dogNoteRepo,
                               IRepository<NoteType> noteTypeRepo,
                               IRepository<DogNoteAttachment> dogNoteAttachmentRepo,
                               IRepository<DogProfile> dogProfileRepo,
                               IBlobRepository blobRepo)
        {
            if (dogNoteRepo == null)
                throw new ArgumentNullException("dogNoteRepo");
            _dogNoteRepo = dogNoteRepo;

            if (noteTypeRepo == null)
                throw new ArgumentNullException("noteTypeRepo");
            _noteTypeRepo = noteTypeRepo;

            if (dogNoteAttachmentRepo == null)
                throw new ArgumentNullException("dogNoteAttachmentRepo");
            _dogNoteAttachmentRepo = dogNoteAttachmentRepo;

            if (blobRepo == null)
                throw new ArgumentNullException("blobRepo");
            _blobRepo = blobRepo;

            _dogProfileRepo = dogProfileRepo;
        }
 public Operations(IBlobRepository BlobRepository, IAzureCache AzureCache)
 {
     _blobRepository = BlobRepository;
     _azureCache = AzureCache;
 }