< Summary

Class:Microsoft.Azure.Batch.Protocol.Models.Page`1
Assembly:Microsoft.Azure.Batch
File(s):C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\GeneratedProtocol\Models\Page.cs
Covered lines:3
Uncovered lines:1
Coverable lines:4
Total lines:53
Line coverage:75% (3 of 4)
Covered branches:1
Total branches:2
Branch coverage:50% (1 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_NextPageLink()-100%100%
get_Items()-100%100%
GetEnumerator()-100%50%
System.Collections.IEnumerable.GetEnumerator()-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\GeneratedProtocol\Models\Page.cs

#LineLine coverage
 1// <auto-generated>
 2// Copyright (c) Microsoft Corporation. All rights reserved.
 3// Licensed under the MIT License. See License.txt in the project root for
 4// license information.
 5//
 6// Code generated by Microsoft (R) AutoRest Code Generator.
 7// Changes may cause incorrect behavior and will be lost if the code is
 8// regenerated.
 9// </auto-generated>
 10
 11namespace Microsoft.Azure.Batch.Protocol.Models
 12{
 13    using Microsoft.Rest;
 14    using Microsoft.Rest.Azure;
 15    using Newtonsoft.Json;
 16    using System.Collections;
 17    using System.Collections.Generic;
 18
 19    /// <summary>
 20    /// Defines a page in Azure responses.
 21    /// </summary>
 22    /// <typeparam name="T">Type of the page content items</typeparam>
 23    [JsonObject]
 24    public class Page<T> : IPage<T>
 25    {
 26         /// <summary>
 27         /// Gets the link to the next page.
 28         /// </summary>
 29         [JsonProperty("odata.nextLink")]
 630         public string NextPageLink { get; private set; }
 31
 32         [JsonProperty("value")]
 1633         private IList<T> Items{ get; set; }
 34
 35         /// <summary>
 36         /// Returns an enumerator that iterates through the collection.
 37         /// </summary>
 38         /// <returns>A an enumerator that can be used to iterate through the collection.</returns>
 39         public IEnumerator<T> GetEnumerator()
 40         {
 441              return Items == null ? System.Linq.Enumerable.Empty<T>().GetEnumerator() : Items.GetEnumerator();
 42         }
 43
 44         /// <summary>
 45         /// Returns an enumerator that iterates through the collection.
 46         /// </summary>
 47         /// <returns>A an enumerator that can be used to iterate through the collection.</returns>
 48         IEnumerator IEnumerable.GetEnumerator()
 49         {
 050             return GetEnumerator();
 51         }
 52    }
 53}