Пример #1
0
        public async Task Should_batch_events()
        {
            var events = CreateEvents(10);
            await _client.Send(events, 3);

            Assert.Equal(4, _handler.Calls);
        }
Пример #2
0
        static async Task Main(string[] args)
        {
            Console.WriteLine("Start");
            var url = "your send grid url";
            var key = "yourkey";

            var data = new String('a', 100);

            var client = new EventGridClient(new Uri(url), key);
            await client.Send(new Event {
                Subject   = "/foo",
                EventType = "super-event",
                Data      = data
            });
        }