< Summary

Class:Azure.Search.Documents.Indexes.Models.ListIndexersResult
Assembly:Azure.Search.Documents
File(s):C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\ListIndexersResult.cs
C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\ListIndexersResult.Serialization.cs
Covered lines:0
Uncovered lines:17
Coverable lines:17
Total lines:75
Line coverage:0% (0 of 17)
Covered branches:0
Total branches:8
Branch coverage:0% (0 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%100%
get_Indexers()-0%100%
DeserializeListIndexersResult(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\ListIndexersResult.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System;
 9using System.Collections.Generic;
 10using System.Linq;
 11
 12namespace Azure.Search.Documents.Indexes.Models
 13{
 14    /// <summary> Response from a List Indexers request. If successful, it includes the full definitions of all indexers
 15    internal partial class ListIndexersResult
 16    {
 17        /// <summary> Initializes a new instance of ListIndexersResult. </summary>
 18        /// <param name="indexers"> The indexers in the Search service. </param>
 19        /// <exception cref="ArgumentNullException"> <paramref name="indexers"/> is null. </exception>
 020        internal ListIndexersResult(IEnumerable<SearchIndexer> indexers)
 21        {
 022            if (indexers == null)
 23            {
 024                throw new ArgumentNullException(nameof(indexers));
 25            }
 26
 027            Indexers = indexers.ToList();
 028        }
 29
 30        /// <summary> Initializes a new instance of ListIndexersResult. </summary>
 31        /// <param name="indexers"> The indexers in the Search service. </param>
 032        internal ListIndexersResult(IReadOnlyList<SearchIndexer> indexers)
 33        {
 034            Indexers = indexers;
 035        }
 36
 37        /// <summary> The indexers in the Search service. </summary>
 038        public IReadOnlyList<SearchIndexer> Indexers { get; }
 39    }
 40}

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\ListIndexersResult.Serialization.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.Search.Documents.Indexes.Models
 13{
 14    internal partial class ListIndexersResult
 15    {
 16        internal static ListIndexersResult DeserializeListIndexersResult(JsonElement element)
 17        {
 018            IReadOnlyList<SearchIndexer> value = default;
 019            foreach (var property in element.EnumerateObject())
 20            {
 021                if (property.NameEquals("value"))
 22                {
 023                    List<SearchIndexer> array = new List<SearchIndexer>();
 024                    foreach (var item in property.Value.EnumerateArray())
 25                    {
 026                        array.Add(SearchIndexer.DeserializeSearchIndexer(item));
 27                    }
 028                    value = array;
 29                    continue;
 30                }
 31            }
 032            return new ListIndexersResult(value);
 33        }
 34    }
 35}