< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
get_ActionType()-0%100%
get_AdditionalProperties()-0%100%
GetEnumerator()-0%100%
System.Collections.IEnumerable.GetEnumerator()-0%100%
TryGetValue(...)-0%100%
ContainsKey(...)-0%100%
get_Keys()-0%100%
get_Values()-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.get_Count()-0%100%
Add(...)-0%100%
Remove(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.get_IsReadOnly()-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Add(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Remove(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Contains(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.CopyTo(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Clear()-0%100%
get_Item(...)-0%100%
set_Item(...)-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\IndexAction.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;
 9using System.Collections.Generic;
 10using Azure.Core;
 11
 12namespace Azure.Search.Documents.Models
 13{
 14    /// <summary> Represents an index action that operates on a document. </summary>
 15    internal partial class IndexAction : IDictionary<string, object>
 16    {
 17        /// <summary> Initializes a new instance of IndexAction. </summary>
 018        public IndexAction()
 19        {
 020            AdditionalProperties = new ChangeTrackingDictionary<string, object>();
 021        }
 22
 23        /// <summary> The operation to perform on a document in an indexing batch. </summary>
 024        public IndexActionType? ActionType { get; set; }
 025        internal IDictionary<string, object> AdditionalProperties { get; }
 26        /// <inheritdoc />
 027        public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => AdditionalProperties.GetEnumerator();
 28        /// <inheritdoc />
 029        IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator();
 30        /// <inheritdoc />
 031        public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value);
 32        /// <inheritdoc />
 033        public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key);
 34        /// <inheritdoc />
 035        public ICollection<string> Keys => AdditionalProperties.Keys;
 36        /// <inheritdoc />
 037        public ICollection<object> Values => AdditionalProperties.Values;
 38        /// <inheritdoc />
 039        int ICollection<KeyValuePair<string, object>>.Count => AdditionalProperties.Count;
 40        /// <inheritdoc />
 041        public void Add(string key, object value) => AdditionalProperties.Add(key, value);
 42        /// <inheritdoc />
 043        public bool Remove(string key) => AdditionalProperties.Remove(key);
 44        /// <inheritdoc />
 045        bool ICollection<KeyValuePair<string, object>>.IsReadOnly => AdditionalProperties.IsReadOnly;
 46        /// <inheritdoc />
 047        void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> value) => AdditionalProperties.A
 48        /// <inheritdoc />
 049        bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> value) => AdditionalPropertie
 50        /// <inheritdoc />
 051        bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> value) => AdditionalPropert
 52        /// <inheritdoc />
 053        void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] destination, int offset) =>
 54        /// <inheritdoc />
 055        void ICollection<KeyValuePair<string, object>>.Clear() => AdditionalProperties.Clear();
 56        /// <inheritdoc />
 57        public object this[string key]
 58        {
 059            get => AdditionalProperties[key];
 060            set => AdditionalProperties[key] = value;
 61        }
 62    }
 63}

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\IndexAction.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 IndexAction : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Optional.IsDefined(ActionType))
 19            {
 020                writer.WritePropertyName("@search.action");
 021                writer.WriteStringValue(ActionType.Value.ToSerialString());
 22            }
 023            foreach (var item in AdditionalProperties)
 24            {
 025                writer.WritePropertyName(item.Key);
 026                writer.WriteObjectValue(item.Value);
 27            }
 028            writer.WriteEndObject();
 029        }
 30    }
 31}