< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-100%100%
get_Results()-100%100%
DeserializeIndexDocumentsResult(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\IndexDocumentsResult.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.Models
 13{
 14    /// <summary> Response containing the status of operations for all documents in the indexing request. </summary>
 15    public partial class IndexDocumentsResult
 16    {
 17        /// <summary> Initializes a new instance of IndexDocumentsResult. </summary>
 18        /// <param name="results"> The list of status information for each document in the indexing request. </param>
 19        /// <exception cref="ArgumentNullException"> <paramref name="results"/> is null. </exception>
 020        internal IndexDocumentsResult(IEnumerable<IndexingResult> results)
 21        {
 022            if (results == null)
 23            {
 024                throw new ArgumentNullException(nameof(results));
 25            }
 26
 027            Results = results.ToList();
 028        }
 29
 30        /// <summary> Initializes a new instance of IndexDocumentsResult. </summary>
 31        /// <param name="results"> The list of status information for each document in the indexing request. </param>
 9332        internal IndexDocumentsResult(IReadOnlyList<IndexingResult> results)
 33        {
 9334            Results = results;
 9335        }
 36
 37        /// <summary> The list of status information for each document in the indexing request. </summary>
 8038        public IReadOnlyList<IndexingResult> Results { get; }
 39    }
 40}

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\IndexDocumentsResult.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.Models
 13{
 14    public partial class IndexDocumentsResult
 15    {
 16        internal static IndexDocumentsResult DeserializeIndexDocumentsResult(JsonElement element)
 17        {
 9318            IReadOnlyList<IndexingResult> value = default;
 37219            foreach (var property in element.EnumerateObject())
 20            {
 9321                if (property.NameEquals("value"))
 22                {
 9323                    List<IndexingResult> array = new List<IndexingResult>();
 3354824                    foreach (var item in property.Value.EnumerateArray())
 25                    {
 1668126                        array.Add(IndexingResult.DeserializeIndexingResult(item));
 27                    }
 9328                    value = array;
 29                    continue;
 30                }
 31            }
 9332            return new IndexDocumentsResult(value);
 33        }
 34    }
 35}