< Summary

Class:Azure.AI.TextAnalytics.Models.LanguageBatchInput
Assembly:Azure.AI.TextAnalytics
File(s):C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\LanguageBatchInput.cs
C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\LanguageBatchInput.Serialization.cs
Covered lines:13
Uncovered lines:1
Coverable lines:14
Total lines:60
Line coverage:92.8% (13 of 14)
Covered branches:3
Total branches:4
Branch coverage:75% (3 of 4)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-80%50%
get_Documents()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\LanguageBatchInput.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.AI.TextAnalytics.Models
 13{
 14    /// <summary> The LanguageBatchInput. </summary>
 15    internal partial class LanguageBatchInput
 16    {
 17        /// <summary> Initializes a new instance of LanguageBatchInput. </summary>
 18        /// <param name="documents"> . </param>
 19        /// <exception cref="ArgumentNullException"> <paramref name="documents"/> is null. </exception>
 5220        public LanguageBatchInput(IEnumerable<LanguageInput> documents)
 21        {
 5222            if (documents == null)
 23            {
 024                throw new ArgumentNullException(nameof(documents));
 25            }
 26
 5227            Documents = documents.ToList();
 5228        }
 29
 7230        public IList<LanguageInput> Documents { get; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\LanguageBatchInput.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.AI.TextAnalytics.Models
 12{
 13    internal partial class LanguageBatchInput : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 5217            writer.WriteStartObject();
 5218            writer.WritePropertyName("documents");
 5219            writer.WriteStartArray();
 29620            foreach (var item in Documents)
 21            {
 9622                writer.WriteObjectValue(item);
 23            }
 5224            writer.WriteEndArray();
 5225            writer.WriteEndObject();
 5226        }
 27    }
 28}