public LmiOrchestrationTrigger( ILogger <LmiOrchestrationTrigger> logger, IMapper mapper, IContentTypeMappingService contentTypeMappingService, ICmsApiService cmsApiService, IDocumentService <JobGroupModel> jobGroupDocumentService, IEventGridService eventGridService, EventGridClientOptions eventGridClientOptions) { this.logger = logger; this.mapper = mapper; this.jobGroupDocumentService = jobGroupDocumentService; this.cmsApiService = cmsApiService; this.jobGroupDocumentService = jobGroupDocumentService; this.eventGridService = eventGridService; this.eventGridClientOptions = eventGridClientOptions; contentTypeMappingService.AddMapping(nameof(LmiSocJobProfile), typeof(LmiSocJobProfile)); contentTypeMappingService.AddMapping(nameof(LmiSocPredicted), typeof(LmiSocPredicted)); contentTypeMappingService.AddMapping(nameof(LmiSocPredictedYear), typeof(LmiSocPredictedYear)); contentTypeMappingService.AddMapping(nameof(LmiSocBreakdown), typeof(LmiSocBreakdown)); contentTypeMappingService.AddMapping(nameof(LmiSocBreakdownYear), typeof(LmiSocBreakdownYear)); contentTypeMappingService.AddMapping(nameof(LmiSocBreakdownYearValue), typeof(LmiSocBreakdownYearValue)); //TODO: ian: need to initialize the telemetry properly Activity?activity = null; if (Activity.Current == null) { activity = new Activity(nameof(LmiWebhookHttpTrigger)).Start(); activity.SetParentId(Guid.NewGuid().ToString()); } }
public LmiOrchestrationTrigger( ILogger <LmiOrchestrationTrigger> logger, IMapper mapper, ILmiImportApiConnector lmiImportApiConnector, IDocumentService <JobGroupModel> jobGroupDocumentService, IEventGridService eventGridService, EventGridClientOptions eventGridClientOptions) { this.logger = logger; this.mapper = mapper; this.jobGroupDocumentService = jobGroupDocumentService; this.lmiImportApiConnector = lmiImportApiConnector; this.jobGroupDocumentService = jobGroupDocumentService; this.eventGridService = eventGridService; this.eventGridClientOptions = eventGridClientOptions; //TODO: ian: need to initialize the telemetry properly Activity?activity = null; if (Activity.Current == null) { activity = new Activity(nameof(LmiOrchestrationTrigger)).Start(); activity.SetParentId(Guid.NewGuid().ToString()); } }
public async Task CanPublishCloudEvent() { EventGridClientOptions options = Recording.InstrumentClientOptions(new EventGridClientOptions()); EventGridClient client = InstrumentClient( new EventGridClient( new Uri(TestEnvironment.CloudEventTopicHost), new AzureKeyCredential(TestEnvironment.CloudEventTopicKey), options)); await client.PublishCloudEventsAsync(GetCloudEventsList()); }
public async Task CanPublishEventToDomain() { EventGridClientOptions options = Recording.InstrumentClientOptions(new EventGridClientOptions()); EventGridClient client = InstrumentClient( new EventGridClient( new Uri(TestEnvironment.DomainHost), new AzureKeyCredential(TestEnvironment.DomainKey), options)); await client.PublishEventsAsync(GetEventsWithTopicsList()); }
public async Task CanPublishEventWithCustomObjectPayload() { EventGridClientOptions options = Recording.InstrumentClientOptions(new EventGridClientOptions()); EventGridClient client = InstrumentClient( new EventGridClient( new Uri(TestEnvironment.TopicHost), new AzureKeyCredential(TestEnvironment.TopicKey), options)); await client.PublishEventsAsync(GetEventsListWithCustomPayload()); }
public async Task CustomizeSerializedJSONPropertiesToCamelCase() { EventGridClientOptions options = Recording.InstrumentClientOptions(new EventGridClientOptions()); options.Serializer = new JsonObjectSerializer( new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase }); EventGridClient client = InstrumentClient( new EventGridClient( new Uri(TestEnvironment.CustomEventTopicHost), new AzureKeyCredential(TestEnvironment.CustomEventTopicKey), options)); await client.PublishCustomEventsAsync(GetCustomEventsList()); }
public LmiImportOrchestrationTrigger( ILogger <LmiImportOrchestrationTrigger> logger, IJobProfileService jobProfileService, IMapLmiToGraphService mapLmiToGraphService, ILmiSocImportService lmiSocImportService, IGraphService graphService, IEventGridService eventGridService, EventGridClientOptions eventGridClientOptions) { this.logger = logger; this.jobProfileService = jobProfileService; this.mapLmiToGraphService = mapLmiToGraphService; this.lmiSocImportService = lmiSocImportService; this.graphService = graphService; this.eventGridService = eventGridService; this.eventGridClientOptions = eventGridClientOptions; }
public WebhooksContentService( ILogger <WebhooksContentService> logger, IMapper mapper, ICmsApiService cmsApiService, IDocumentService <ContentItemModel> contentItemDocumentService, IJobGroupCacheRefreshService jobGroupCacheRefreshService, IJobGroupPublishedRefreshService jobGroupPublishedRefreshService, IEventGridService eventGridService, EventGridClientOptions eventGridClientOptions) { this.logger = logger; this.mapper = mapper; this.cmsApiService = cmsApiService; this.contentItemDocumentService = contentItemDocumentService; this.jobGroupCacheRefreshService = jobGroupCacheRefreshService; this.jobGroupPublishedRefreshService = jobGroupPublishedRefreshService; this.eventGridService = eventGridService; this.eventGridClientOptions = eventGridClientOptions; }
public LmiWebhookReceiverService( ILogger <LmiWebhookReceiverService> logger, IMapper mapper, IDocumentService <DeltaReportModel> deltaReportDocumentService, IDocumentService <DeltaReportSocModel> deltaReportSocDocumentService, IJobGroupDataService jobGroupDataService, ISocDeltaService socDeltaService, IEventGridService eventGridService, PublishedJobGroupClientOptions publishedJobGroupClientOptions, EventGridClientOptions eventGridClientOptions) { this.logger = logger; this.mapper = mapper; this.deltaReportDocumentService = deltaReportDocumentService; this.deltaReportSocDocumentService = deltaReportSocDocumentService; this.jobGroupDataService = jobGroupDataService; this.socDeltaService = socDeltaService; this.eventGridService = eventGridService; this.publishedJobGroupClientOptions = publishedJobGroupClientOptions; this.eventGridClientOptions = eventGridClientOptions; }
public EventGridService(ILogger <EventGridService> logger, IEventGridClientService eventGridClientService, EventGridClientOptions eventGridClientOptions) { this.logger = logger; this.eventGridClientService = eventGridClientService; this.eventGridClientOptions = eventGridClientOptions; }