< Summary

Class:Azure.AI.FormRecognizer.Training.TrainingFileFilter
Assembly:Azure.AI.FormRecognizer
File(s):C:\Git\azure-sdk-for-net\sdk\formrecognizer\Azure.AI.FormRecognizer\src\Generated\Models\TrainingFileFilter.Serialization.cs
C:\Git\azure-sdk-for-net\sdk\formrecognizer\Azure.AI.FormRecognizer\src\TrainingFileFilter.cs
Covered lines:13
Uncovered lines:0
Coverable lines:13
Total lines:67
Line coverage:100% (13 of 13)
Covered branches:4
Total branches:4
Branch coverage:100% (4 of 4)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\formrecognizer\Azure.AI.FormRecognizer\src\Generated\Models\TrainingFileFilter.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.FormRecognizer.Training
 12{
 13    public partial class TrainingFileFilter : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 817            writer.WriteStartObject();
 818            if (Optional.IsDefined(Prefix))
 19            {
 820                writer.WritePropertyName("prefix");
 821                writer.WriteStringValue(Prefix);
 22            }
 823            if (Optional.IsDefined(IncludeSubfolders))
 24            {
 825                writer.WritePropertyName("includeSubFolders");
 826                writer.WriteBooleanValue(IncludeSubfolders);
 27            }
 828            writer.WriteEndObject();
 829        }
 30    }
 31}

C:\Git\azure-sdk-for-net\sdk\formrecognizer\Azure.AI.FormRecognizer\src\TrainingFileFilter.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using Azure.Core;
 5
 6namespace Azure.AI.FormRecognizer.Training
 7{
 8    /// <summary>
 9    /// Used by the <see cref="FormTrainingClient"/> to filter the documents by name in the
 10    /// source path provided for training.
 11    /// </summary>
 12    [CodeGenModel("TrainSourceFilter")]
 13    public partial class TrainingFileFilter
 14    {
 15        /// <summary>
 16        /// Initializes a new instance of the <see cref="TrainingFileFilter"/> class.
 17        /// </summary>
 818        public TrainingFileFilter()
 19        {
 820        }
 21
 22        /// <summary>
 23        /// A case-sensitive prefix string to filter documents in the source path for training. For example,
 24        /// you may use the prefix to restrict subfolders for training.
 25        /// </summary>
 3226        public string Prefix { get; set; } = string.Empty;
 27
 28        /// <summary>
 29        /// A flag to indicate whether subfolders within the set of prefix folders should be included
 30        /// when searching for content to be preprocessed.
 31        /// </summary>
 32        [CodeGenMember("IncludeSubFolders")]
 2433        public bool IncludeSubfolders { get; set; } = false;
 34
 35    }
 36}