< Summary

Class:Azure.Core.GeoJson.GeoLineCollection
Assembly:Azure.Core.Experimental
File(s):C:\Git\azure-sdk-for-net\sdk\core\Azure.Core.Experimental\src\Spatial\GeoLineCollection.cs
Covered lines:5
Uncovered lines:6
Coverable lines:11
Total lines:58
Line coverage:45.4% (5 of 11)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%100%
.ctor(...)-100%100%
get_Lines()-100%100%
GetEnumerator()-0%100%
System.Collections.IEnumerable.GetEnumerator()-0%100%
get_Count()-0%100%
get_Item(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\core\Azure.Core.Experimental\src\Spatial\GeoLineCollection.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System.Collections;
 5using System.Collections.Generic;
 6using System.Linq;
 7
 8namespace Azure.Core.GeoJson
 9{
 10    /// <summary>
 11    /// Represents a geometry that is composed of multiple <see cref="GeoLine"/>.
 12    /// </summary>
 13    public sealed class GeoLineCollection : GeoObject, IReadOnlyList<GeoLine>
 14    {
 15        /// <summary>
 16        /// Initializes new instance of <see cref="GeoLineCollection"/>.
 17        /// </summary>
 18        /// <param name="lines">The collection of inner lines.</param>
 019        public GeoLineCollection(IEnumerable<GeoLine> lines): this(lines, null, DefaultProperties)
 20        {
 021        }
 22
 23        /// <summary>
 24        /// Initializes new instance of <see cref="GeoLineCollection"/>.
 25        /// </summary>
 26        /// <param name="lines">The collection of inner lines.</param>
 27        /// <param name="boundingBox">The <see cref="GeoBoundingBox"/> to use.</param>
 28        /// <param name="additionalProperties">The set of additional properties associated with the <see cref="GeoObject
 1629        public GeoLineCollection(IEnumerable<GeoLine> lines, GeoBoundingBox? boundingBox, IReadOnlyDictionary<string, ob
 30        {
 1631            Argument.AssertNotNull(lines, nameof(lines));
 32
 1633            Lines = lines.ToArray();
 1634        }
 35
 36        /// <summary>
 37        ///
 38        /// </summary>
 2439        internal IReadOnlyList<GeoLine> Lines { get; }
 40
 41        /// <inheritdoc />
 42        public IEnumerator<GeoLine> GetEnumerator()
 43        {
 044            return Lines.GetEnumerator();
 45        }
 46
 47        IEnumerator IEnumerable.GetEnumerator()
 48        {
 049            return GetEnumerator();
 50        }
 51
 52        /// <inheritdoc />
 053        public int Count => Lines.Count;
 54
 55        /// <inheritdoc />
 056        public GeoLine this[int index] => Lines[index];
 57    }
 58}