< Summary

Class:Azure.Messaging.EventGrid.EventGridPublisherClientOptions
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Customization\EventGridPublisherClientOptions.cs
Covered lines:5
Uncovered lines:0
Coverable lines:5
Total lines:58
Line coverage:100% (5 of 5)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_Version()-100%100%
get_DataSerializer()-100%100%
.ctor(...)-100%100%

File(s)

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

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5using Azure.Core;
 6using Azure.Core.Serialization;
 7
 8namespace Azure.Messaging.EventGrid
 9{
 10    /// <summary>
 11    /// Options that allow to configure the management of the request sent to the service.
 12    /// </summary>
 13    public class EventGridPublisherClientOptions : ClientOptions
 14    {
 15
 16        /// <summary>
 17        /// The latest service version supported by this client library.
 18        /// </summary>
 19        internal const ServiceVersion LatestVersion = ServiceVersion.V2018_01_01;
 20
 21        /// <summary>
 22        /// The versions of the Event Grid service supported by this client library.
 23        /// </summary>
 24        public enum ServiceVersion
 25        {
 26            /// <summary>
 27            /// API version "2018-01-01"
 28            /// </summary>
 29#pragma warning disable CA1707 // Identifiers should not contain underscores
 30            V2018_01_01 = 1
 31#pragma warning restore CA1707 // Identifiers should not contain underscores
 32        }
 33
 34        /// <summary>
 35        /// Gets the <see cref="ServiceVersion"/> of the service API used when
 36        /// making requests.
 37        /// </summary>
 8438        internal ServiceVersion Version { get; }
 39
 40        /// <summary>
 41        /// Used to serialize the payloads of given events to UTF-8 encoded JSON.
 42        /// </summary>
 4843        public ObjectSerializer DataSerializer { get; set; }
 44
 45        /// <summary>
 46        /// Initializes a new instance of the <see cref="EventGridPublisherClientOptions"/>
 47        /// class.
 48        /// </summary>
 49        /// <param name="version">
 50        /// The <see cref="ServiceVersion"/> of the service API used when
 51        /// making requests.
 52        /// </param>
 4453        public EventGridPublisherClientOptions(ServiceVersion version = LatestVersion)
 54        {
 4455            Version = version;
 4456        }
 57    }
 58}