< Summary

Class:Azure.Core.GeoJson.GeoPointCollection
Assembly:Azure.Core.Experimental
File(s):C:\Git\azure-sdk-for-net\sdk\core\Azure.Core.Experimental\src\Spatial\GeoPointCollection.cs
Covered lines:5
Uncovered lines:6
Coverable lines:11
Total lines:59
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_Points()-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\GeoPointCollection.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.Drawing;
 7using System.Linq;
 8
 9namespace Azure.Core.GeoJson
 10{
 11    /// <summary>
 12    /// Represents a geometry that is composed of multiple <see cref="GeoPoint"/>.
 13    /// </summary>
 14    public sealed class GeoPointCollection : GeoObject, IReadOnlyList<GeoPoint>
 15    {
 16        /// <summary>
 17        /// Initializes new instance of <see cref="GeoPointCollection"/>.
 18        /// </summary>
 19        /// <param name="points">The collection of inner points.</param>
 020        public GeoPointCollection(IEnumerable<GeoPoint> points): this(points, null, DefaultProperties)
 21        {
 022        }
 23
 24        /// <summary>
 25        /// Initializes new instance of <see cref="GeoPointCollection"/>.
 26        /// </summary>
 27        /// <param name="points">The collection of inner points.</param>
 28        /// <param name="boundingBox">The <see cref="GeoBoundingBox"/> to use.</param>
 29        /// <param name="additionalProperties">The set of additional properties associated with the <see cref="GeoObject
 1630        public GeoPointCollection(IEnumerable<GeoPoint> points, GeoBoundingBox? boundingBox, IReadOnlyDictionary<string,
 31        {
 1632            Argument.AssertNotNull(points, nameof(points));
 33
 1634            Points = points.ToArray();
 1635        }
 36
 37        /// <summary>
 38        ///
 39        /// </summary>
 2440        internal IReadOnlyList<GeoPoint> Points { get; }
 41
 42        /// <inheritdoc />
 43        public IEnumerator<GeoPoint> GetEnumerator()
 44        {
 045            return Points.GetEnumerator();
 46        }
 47
 48        IEnumerator IEnumerable.GetEnumerator()
 49        {
 050            return GetEnumerator();
 51        }
 52
 53        /// <inheritdoc />
 054        public int Count => Points.Count;
 55
 56        /// <inheritdoc />
 057        public GeoPoint this[int index] => Points[index];
 58    }
 59}