< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
get_Actions()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\IndexBatch.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> Contains a batch of document write actions to send to the index. </summary>
 15    internal partial class IndexBatch
 16    {
 17        /// <summary> Initializes a new instance of IndexBatch. </summary>
 18        /// <param name="actions"> The actions in the batch. </param>
 19        /// <exception cref="ArgumentNullException"> <paramref name="actions"/> is null. </exception>
 020        public IndexBatch(IEnumerable<IndexAction> actions)
 21        {
 022            if (actions == null)
 23            {
 024                throw new ArgumentNullException(nameof(actions));
 25            }
 26
 027            Actions = actions.ToList();
 028        }
 29
 30        /// <summary> The actions in the batch. </summary>
 031        public IList<IndexAction> Actions { get; }
 32    }
 33}

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\IndexBatch.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.Text.Json;
 9using Azure.Core;
 10
 11namespace Azure.Search.Documents.Models
 12{
 13    internal partial class IndexBatch : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("value");
 019            writer.WriteStartArray();
 020            foreach (var item in Actions)
 21            {
 022                writer.WriteObjectValue(item);
 23            }
 024            writer.WriteEndArray();
 025            writer.WriteEndObject();
 026        }
 27    }
 28}