Пример #1
0
        public async Task <IEnumerable <WeatherForecast> > Get(CancellationToken cancellationToken)
        {
            var a3IncomingLead = new A3IncomingLead
            {
                FirstName    = "Fred",
                LastName     = "Bloggs",
                EmailAddress = "*****@*****.**",
                ZipCode      = 12345,
                PhoneNumber  = "202-555-4567",
            };

            await _capPublisher.PublishAsync("a3-local-consumer", a3IncomingLead, cancellationToken : cancellationToken);

            var rng = new Random();

            return(Enumerable.Range(1, 5).Select(index => new WeatherForecast
            {
                Date = DateTime.Now.AddDays(index),
                TemperatureC = rng.Next(-20, 55),
                Summary = Summaries[rng.Next(Summaries.Length)]
            })
                   .ToArray());
        }
Пример #2
0
 public async Task ReceiveMessage(A3IncomingLead incomingLeadEvent, CancellationToken cancellationToken = default)
 {
 }