< Summary

Class:Azure.Messaging.EventGrid.EventGridConsumerOptions
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Customization\EventGridConsumerOptions.cs
Covered lines:1
Uncovered lines:1
Coverable lines:2
Total lines:27
Line coverage:50% (1 of 2)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_DataSerializer()-100%100%
get_CustomEventTypeMappings()-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Customization\EventGridConsumerOptions.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5using System.Collections.Generic;
 6using Azure.Core;
 7using Azure.Core.Serialization;
 8
 9namespace Azure.Messaging.EventGrid
 10{
 11    /// <summary>
 12    /// Options for configuring deserialization in EventGridConsumer.
 13    /// </summary>
 14    public class EventGridConsumerOptions
 15    {
 16        /// <summary>
 17        /// Serializer used to decode custom payloads from JSON.
 18        /// </summary>
 4819        public ObjectSerializer DataSerializer { get; set; } = new JsonObjectSerializer();
 20
 21        /// <summary>
 22        /// Contains the mappings for custom event types. For example,
 23        /// "Contoso.Items.ItemReceived" mapping to type ContosoItemReceivedEventData.
 24        /// </summary>
 025        public IDictionary<string, Type> CustomEventTypeMappings { get; private set; } = new Dictionary<string, Type>();
 26    }
 27}