/// <summary>
 /// Initializes a new instance of the <see cref="AmsV2CallbackFunction"/> class.
 /// </summary>
 /// <param name="logger">logger.</param>
 /// <param name="publisher">publisher.</param>
 public AmsV2CallbackFunction(
     IObjectLogger <MediaInfoFunctionalTest> logger,
     IEventGridPublisher publisher)
 {
     _logger    = logger;
     _publisher = publisher;
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EventGridDispatcher"/> class.
 /// </summary>
 /// <param name="logger">logger.</param>
 /// <param name="eventGridHandlers">eventGridHandlers.</param>
 public EventGridDispatcher(
     IObjectLogger <EventGridDispatcher> logger,
     IEnumerable <IEventGridHandler> eventGridHandlers)
 {
     _logger            = logger;
     _eventGridHandlers = eventGridHandlers;
 }
 public EventGridPublisherTests()
 {
     _settingsProvider        = Mock.Of <ISettingsProvider>();
     _logger                  = Mock.Of <IObjectLogger <EventGridPublisher> >();
     _eventGridClientProvider = Mock.Of <IEventGridClientProvider>();
     _eventGridPublisher      = new EventGridPublisher(_logger, _settingsProvider, _eventGridClientProvider);
 }
 public ThreadProcessor(
     IRepository <Post> postRepository,
     IRepository <Comment> commentRepository,
     ISocialGist socialgist,
     ILog log,
     IObjectLogger objectLogger,
     IDocumentProcessor[] documentProcessors,
     IDocumentFilter[] documentFilters,
     IDocumentAggregator[] documentAggregators,
     ITelemetryClient telemetryClient,
     Func <ResponsePost, Post> postFactory,
     Func <ResponseComment, Comment> commentFactory
     )
 {
     this.postRepository    = postRepository;
     this.commentRepository = commentRepository;
     this.socialgist        = socialgist;
     this.log = log;
     this.documentProcessors  = documentProcessors;
     this.documentAggregators = documentAggregators;
     this.objectLogger        = objectLogger;
     this.telemetryClient     = telemetryClient;
     this.postFactory         = postFactory;
     this.commentFactory      = commentFactory;
     this.documentFilters     = documentFilters;
 }
Beispiel #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MediaServicesV3EncoderStatusHandlerTests"/> class.
 /// </summary>
 public MediaServicesV3EncoderStatusHandlerTests()
 {
     this.logger             = Mock.Of <IObjectLogger <MediaServicesV3EncoderStatusHandler> >();
     this.eventGridPublisher = Mock.Of <IEventGridPublisher>();
     this.storageService     = Mock.Of <IStorageService>();
     this.handler            = new MediaServicesV3EncoderStatusHandler(this.logger, this.eventGridPublisher, this.storageService);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="MediaInfoFunctionalTest"/> class.
 /// </summary>
 /// <param name="mediaInfoProvider">The media information provider.</param>
 /// <param name="logger">The logger.</param>
 public MediaInfoFunctionalTest(
     IMediaInfoProvider mediaInfoProvider,
     IObjectLogger <MediaInfoFunctionalTest> logger)
 {
     _mediaInfoProvider = mediaInfoProvider;
     _logger            = logger;
 }
 public AuthorizeFilterAttribute(IConfigurationManager configurationManager,
                                 IJwtRequestInfo jwtRequestInfo, IObjectLogger logger)
 {
     _configurationManager = configurationManager;
     _logger         = logger;
     _jwtRequestInfo = jwtRequestInfo;
 }
Beispiel #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MediaServicesV3BaseService"/> class.
 /// </summary>
 /// <param name="mediaServicesV3SdkWrapper">Media Services V3 Wrapper object.</param>
 /// <param name="log">Logger.</param>
 public MediaServicesV3BaseService(
     IMediaServicesV3SdkWrapper mediaServicesV3SdkWrapper,
     IObjectLogger <MediaServicesV3BaseService> log)
 {
     Log = log;
     MediaServicesV3SdkWrapper = mediaServicesV3SdkWrapper;
 }
Beispiel #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EventGridFunction"/> class.
 /// </summary>
 /// <param name="logger">The logger.</param>
 /// <param name="eventDispatcher">The event dispatcher.</param>
 public EventGridFunction(
     IObjectLogger <EventGridFunction> logger,
     IEventGridDispatcher eventDispatcher)
 {
     _logger          = logger;
     _eventDispatcher = eventDispatcher;
 }
Beispiel #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MediaServicesLocatorDeleteHandlerTests"/> class.
 /// </summary>
 public MediaServicesLocatorDeleteHandlerTests()
 {
     logger             = Mock.Of <IObjectLogger <MediaServicesLocatorDeleteHandler> >();
     eventGridPublisher = Mock.Of <IEventGridPublisher>();
     mediaServicesV3PublicationService = Mock.Of <IMediaServicesV3PublicationService>();
     handler = new MediaServicesLocatorDeleteHandler(logger, eventGridPublisher, mediaServicesV3PublicationService);
 }
 public EventGridDispatcherTests()
 {
     _logger              = Mock.Of <IObjectLogger <EventGridDispatcher> >();
     _eventGridHandler    = Mock.Of <IEventGridHandler>();
     _eventGridDispatcher = new EventGridDispatcher(_logger, new List <IEventGridHandler> {
         _eventGridHandler
     });
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="MediaServicesV3Encoder"/> class.
 /// </summary>
 /// <param name="log">IObjectLogger log.</param>
 /// <param name="storageService">IStorageService.</param>
 /// <param name="amsV3Service">IMediaServicesOperationsService provider.</param>
 public MediaServicesV3Encoder(IObjectLogger <MediaServicesV3Encoder> log,
                               IStorageService storageService,
                               IMediaServicesV3EncodeService amsV3Service)
 {
     _log            = log;
     _storageService = storageService;
     _amsV3Service   = amsV3Service;
 }
 public BlobContainerClientProviderTests()
 {
     _settingsProvider            = Mock.Of <ISettingsProvider>();
     _logger                      = Mock.Of <IObjectLogger <BlobContainerClientProvider> >();
     _identity                    = Mock.Of <TokenCredential>();
     _blobContainerClientCache    = new CachingService();
     _blobContainerClientProvider = new Mock <BlobContainerClientProvider>(_settingsProvider, _blobContainerClientCache, _logger, _identity).Object;
 }
Beispiel #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BlobDeleteHandler"/> class.
 /// </summary>
 /// <param name="logger">logger.</param>
 /// <param name="storageService">storageService.</param>
 /// <param name="eventPublisher">eventPublisher.</param>
 public BlobDeleteHandler(
     IObjectLogger <BlobDeleteHandler> logger,
     IStorageService storageService,
     IEventGridPublisher eventPublisher)
     : base(logger, eventPublisher, UniqueIdForHandler, EventTypesHandled)
 {
     _storageService = storageService;
 }
Beispiel #15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MediaServicesV3EncodeService"/> class.
 /// </summary>
 /// <param name="mediaServicesV3SdkWrapper">Media Services V3 Wrapper object.</param>
 /// <param name="mediaServicesV3TransformService">Media Services V3 Transform Service.</param>
 /// <param name="log">Logger.</param>
 public MediaServicesV3EncodeService(
     IMediaServicesV3TransformService mediaServicesV3TransformService,
     IMediaServicesV3SdkWrapper mediaServicesV3SdkWrapper,
     IObjectLogger <MediaServicesV3BaseService> log)
     : base(mediaServicesV3SdkWrapper, log)
 {
     _mediaServicesV3TransformService = mediaServicesV3TransformService;
 }
 public BlobDeletedHandlerTests()
 {
     _eventGridPublisher = Mock.Of <IEventGridPublisher>();
     _settingsProvider   = Mock.Of <ISettingsProvider>();
     _logger             = Mock.Of <IObjectLogger <BlobDeletedHandler> >();
     _handler            = new BlobDeletedHandler(
         _logger,
         _eventGridPublisher);
 }
 public HttpClient(
     ILog log,
     ITelemetryClient telemetryClient,
     IObjectLogger objectLogger)
 {
     this.log             = log;
     this.objectLogger    = objectLogger;
     this.telemetryClient = telemetryClient;
 }
Beispiel #18
0
        public StorageServiceTests()
        {
            _blobBaseClientProvider      = Mock.Of <IBlobBaseClientProvider>();
            _blobContainerClientProvider = Mock.Of <IBlobContainerClientProvider>();
            _azureStorageManagement      = Mock.Of <IAzureStorageManagement>();

            _logger         = Mock.Of <IObjectLogger <StorageService> >();
            _storageService = new StorageService(_blobBaseClientProvider, _blobContainerClientProvider, _azureStorageManagement, _logger);
        }
Beispiel #19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EventGridPublisher"/> class.
 /// </summary>
 /// <param name="logger">logger.</param>
 /// <param name="settingsProvider">settingsProvider.</param>
 /// <param name="eventGridClientProvider">eventGridClientProvider.</param>
 public EventGridPublisher(
     IObjectLogger <EventGridPublisher> logger,
     ISettingsProvider settingsProvider,
     IEventGridClientProvider eventGridClientProvider)
 {
     _logger                  = logger;
     _settingsProvider        = settingsProvider;
     _eventGridClientProvider = eventGridClientProvider;
 }
Beispiel #20
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MediaInfoReportService"/> class.
 /// </summary>
 /// <param name="mediaInfoProvider">mediaInfoProvider.</param>
 /// <param name="storageService">storageService.</param>
 /// <param name="logger">logger.</param>
 public MediaInfoReportService(
     IMediaInfoProvider mediaInfoProvider,
     IStorageService storageService,
     IObjectLogger <MediaInfoReportService> logger)
 {
     _mediaInfoProvider = mediaInfoProvider;
     _storageService    = storageService;
     _logger            = logger;
 }
Beispiel #21
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MediaServicesV2Encoder"/> class.
 /// </summary>
 /// <param name="log">IObjectLogger log.</param>
 /// <param name="settingsProvider">ISettingsProvider settingsProvider.</param>
 /// <param name="mediaServicesV2Service">IMediaServicesV2Service.</param>
 /// <param name="mediaServicesPreset">IMediaServicesPreset.</param>
 public MediaServicesV2Encoder(IObjectLogger <MediaServicesV2Encoder> log,
                               ISettingsProvider settingsProvider,
                               IMediaServicesV2EncodeService mediaServicesV2Service,
                               IMediaServicesPreset mediaServicesPreset)
 {
     _log = log;
     _settingsProvider       = settingsProvider;
     _mediaServicesV2Service = mediaServicesV2Service;
     _mediaServicesPreset    = mediaServicesPreset;
 }
 public MediaInfoReportServiceTests()
 {
     _mediaInfoProvider = Mock.Of <IMediaInfoProvider>();
     _storageService    = Mock.Of <IStorageService>();
     _logger            = Mock.Of <IObjectLogger <MediaInfoReportService> >();
     _service           = new MediaInfoReportService(
         _mediaInfoProvider,
         _storageService,
         _logger);
 }
Beispiel #23
0
 public MediaServicesV2RestEncodeServiceTests()
 {
     _log                        = Mock.Of <IObjectLogger <MediaServicesV2RestEncodeService> >();
     _storageService             = Mock.Of <IStorageService>();
     _mediaServicesV2RestWrapper = Mock.Of <IMediaServicesV2RestWrapper>();
     _service                    = new MediaServicesV2RestEncodeService(
         _log,
         _storageService,
         _mediaServicesV2RestWrapper);
 }
 public ContainerDeleteHandlerTests()
 {
     _eventGridPublisher = Mock.Of <IEventGridPublisher>();
     _storageService     = Mock.Of <IStorageService>();
     _logger             = Mock.Of <IObjectLogger <ContainerDeleteHandler> >();
     _handler            = new ContainerDeleteHandler(
         _logger,
         _storageService,
         _eventGridPublisher);
 }
 public BlobCopyHandlerTests()
 {
     _eventGridPublisher = Mock.Of <IEventGridPublisher>();
     _storageService     = Mock.Of <IStorageService>();
     _settingsProvider   = Mock.Of <ISettingsProvider>();
     _logger             = Mock.Of <IObjectLogger <BlobCopyHandler> >();
     _handler            = new BlobCopyHandler(
         _logger,
         _storageService,
         _eventGridPublisher);
 }
Beispiel #26
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StorageService"/> class.
 /// </summary>
 /// <param name="settingsProvider">settingsProvider.</param>
 /// <param name="blobBaseClientProvider">blobBaseClientProvider.</param>
 /// <param name="blobContainerClientProvider">blobContainerClientProvider.</param>
 /// <param name="azureStorageManagement">azureStorageManagement.</param>
 /// <param name="log">log.</param>
 public StorageService(
     IBlobBaseClientProvider blobBaseClientProvider,
     IBlobContainerClientProvider blobContainerClientProvider,
     IAzureStorageManagement azureStorageManagement,
     IObjectLogger <StorageService> log)
 {
     _blobBaseClientProvider      = blobBaseClientProvider;
     _blobContainerClientProvider = blobContainerClientProvider;
     _azureStorageManagement      = azureStorageManagement;
     _log = log;
 }
 public ChangeBlobTierHandlerTests()
 {
     JsonHelpers.SetupJsonSerialization();
     _eventGridPublisher = Mock.Of <IEventGridPublisher>();
     _storageService     = Mock.Of <IStorageService>();
     _logger             = Mock.Of <IObjectLogger <ChangeBlobTierHandler> >();
     _handler            = new ChangeBlobTierHandler(
         _logger,
         _eventGridPublisher,
         _storageService);
 }
 public EventGridHandlerBaseTests()
 {
     _eventGridPublisher = Mock.Of <IEventGridPublisher>();
     _storageService     = Mock.Of <IStorageService>();
     _settingsProvider   = Mock.Of <ISettingsProvider>();
     _logger             = Mock.Of <IObjectLogger <DummyStorageEventHandler> >();
     _handler            = new DummyStorageEventHandler(
         _logger,
         _storageService,
         _eventGridPublisher);
 }
Beispiel #29
0
 private static void HandleResponse(IObjectLogger logger, IResponse response)
 {
     if (!response.Succeeded)
     {
         logger.LogError(response);
     }
     else
     {
         logger.LogTrace(response);
     }
 }
Beispiel #30
0
 public CreateMetadataHandlerTests()
 {
     _eventGridPublisher = Mock.Of <IEventGridPublisher>();
     _storageService     = Mock.Of <IStorageService>();
     _settingsProvider   = Mock.Of <ISettingsProvider>();
     _logger             = Mock.Of <IObjectLogger <CreateMetadataHandler> >();
     _handler            = new CreateMetadataHandler(
         _logger,
         _storageService,
         _eventGridPublisher);
 }