< Summary

Class:Microsoft.Azure.Search.IsRetrievableAttribute
Assembly:Microsoft.Azure.Search.Service
File(s):C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Search.Service\src\Customizations\Indexes\FieldBuilder\IsRetrievableAttribute.cs
Covered lines:4
Uncovered lines:0
Coverable lines:4
Total lines:34
Line coverage:100% (4 of 4)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
get_IsRetrievable()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Search.Service\src\Customizations\Indexes\FieldBuilder\IsRetrievableAttribute.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License. See License.txt in the project root for
 3// license information.
 4
 5using System;
 6using Microsoft.Azure.Search.Models;
 7
 8namespace Microsoft.Azure.Search
 9{
 10    /// <summary>
 11    /// Indicates whether the field can be returned in a search result. This
 12    /// defaults to true, so this attribute only has any effect if you use it
 13    /// as [IsRetrievable(false)].
 14    /// </summary>
 15    [AttributeUsage(AttributeTargets.Property)]
 16    public class IsRetrievableAttribute : Attribute
 17    {
 18        /// <summary>
 19        /// Indicates that the specified value should be used for the <c cref="Field.IsRetrievable">IsRetrievable</c>
 20        /// flag of the target field.
 21        /// </summary>
 22        /// <param name="isRetrievable"><c>true</c> if the target field should be included in
 23        /// search results, <c>false</c> otherwise.</param>
 684024        public IsRetrievableAttribute(bool isRetrievable)
 25        {
 684026            IsRetrievable = isRetrievable;
 684027        }
 28
 29        /// <summary>
 30        /// <c>true</c> if the target field should be included in search results, <c>false</c> otherwise.
 31        /// </summary>
 152032        public bool IsRetrievable { get; }
 33    }
 34}

Methods/Properties

.ctor(...)
get_IsRetrievable()