Beispiel #1
0
        protected void AddTelemetryEvents(GeneratorConfig config, GenerationSubscriptionManager manager)
        {
            var sender = new TelemetryMarkerSender(config.ApiConnectionConfig.EndpointSettings.TelemetryMarkerUrl);

            manager.Add(
                async(s, e) => await sender.SendHttpMark(GetArgs("BeforeGeneration", e.GenerationSettings)),
                async(s, e) => await sender.SendHttpMark(GetArgs("Generation", e.GenerationSettings)),
                async(s, e) => await sender.SendHttpMark(("EventType", "null"))
                );
        }
Beispiel #2
0
        // inject into search settings batches start time and end time
        // GenerationSettings.StartTime -> ISearchUtilizer.SearchPattern.CreatedDate.Injected.Value
        //public bool AddBatchTimeToSearches { get; set; }

        public GenerationSubscriptionManager GetSubscriptionManager(GeneratorConfig config)
        {
            if (config == null)
            {
                throw new ArgumentNullException(nameof(config));
            }

            var manager = new GenerationSubscriptionManager();

            if (AddTelemetryMarkers)
            {
                AddTelemetryEvents(config, manager);
            }
            return(manager);
        }