< Summary

Class:Microsoft.Azure.Batch.InboundEndpoint
Assembly:Microsoft.Azure.Batch
File(s):C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\Generated\InboundEndpoint.cs
Covered lines:21
Uncovered lines:11
Coverable lines:32
Total lines:138
Line coverage:65.6% (21 of 32)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
get_BackendPort()-100%100%
get_FrontendPort()-100%100%
get_Name()-100%100%
get_Protocol()-100%100%
get_PublicFqdn()-100%100%
get_PublicIPAddress()-100%100%
Microsoft.Azure.Batch.IModifiable.get_HasBeenModified()-0%100%
Microsoft.Azure.Batch.IReadOnly.get_IsReadOnly()-0%100%
Microsoft.Azure.Batch.IReadOnly.set_IsReadOnly(...)-100%100%
ConvertFromProtocolCollection(...)-0%100%
ConvertFromProtocolCollectionAndFreeze(...)-0%100%
ConvertFromProtocolCollectionReadOnly(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\Generated\InboundEndpoint.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 license information.
 3//
 4// Code generated by Microsoft (R) AutoRest Code Generator.
 5// Changes may cause incorrect behavior and will be lost if the code is
 6// regenerated.
 7
 8//
 9// This file was autogenerated by a tool.
 10// Do not modify it.
 11//
 12
 13namespace Microsoft.Azure.Batch
 14{
 15    using Models = Microsoft.Azure.Batch.Protocol.Models;
 16    using System;
 17    using System.Collections.Generic;
 18    using System.Linq;
 19
 20    /// <summary>
 21    /// An inbound endpoint on a compute node.
 22    /// </summary>
 23    public partial class InboundEndpoint : IPropertyMetadata
 24    {
 25        #region Constructors
 26
 99327        internal InboundEndpoint(Models.InboundEndpoint protocolObject)
 28        {
 99329            this.BackendPort = protocolObject.BackendPort;
 99330            this.FrontendPort = protocolObject.FrontendPort;
 99331            this.Name = protocolObject.Name;
 99332            this.Protocol = UtilitiesInternal.MapEnum<Models.InboundEndpointProtocol, Common.InboundEndpointProtocol>(pr
 99333            this.PublicFqdn = protocolObject.PublicFQDN;
 99334            this.PublicIPAddress = protocolObject.PublicIPAddress;
 99335        }
 36
 37        #endregion Constructors
 38
 39        #region InboundEndpoint
 40
 41        /// <summary>
 42        /// Gets the backend port number of the endpoint.
 43        /// </summary>
 99144        public int BackendPort { get; }
 45
 46        /// <summary>
 47        /// Gets the public port number of the endpoint.
 48        /// </summary>
 99149        public int FrontendPort { get; }
 50
 51        /// <summary>
 52        /// Gets the name of the endpoint.
 53        /// </summary>
 99154        public string Name { get; }
 55
 56        /// <summary>
 57        /// Gets the protocol of the endpoint.
 58        /// </summary>
 99159        public Common.InboundEndpointProtocol Protocol { get; }
 60
 61        /// <summary>
 62        /// Gets the public fully qualified domain name for the compute node.
 63        /// </summary>
 99164        public string PublicFqdn { get; }
 65
 66        /// <summary>
 67        /// Gets the public IP address of the compute node.
 68        /// </summary>
 99169        public string PublicIPAddress { get; }
 70
 71        #endregion // InboundEndpoint
 72
 73        #region IPropertyMetadata
 74
 75        bool IModifiable.HasBeenModified
 76        {
 77            //This class is compile time readonly so it cannot have been modified
 078            get { return false; }
 79        }
 80
 81        bool IReadOnly.IsReadOnly
 82        {
 083            get { return true; }
 84            set
 85            {
 86                // This class is compile time readonly already
 99387            }
 88        }
 89
 90        #endregion // IPropertyMetadata
 91
 92        #region Internal/private methods
 93
 94
 95        /// <summary>
 96        /// Converts a collection of protocol layer objects to object layer collection objects.
 97        /// </summary>
 98        internal static IList<InboundEndpoint> ConvertFromProtocolCollection(IEnumerable<Models.InboundEndpoint> protoCo
 99        {
 0100            ConcurrentChangeTrackedModifiableList<InboundEndpoint> converted = UtilitiesInternal.CollectionToThreadSafeC
 0101                items: protoCollection,
 0102                objectCreationFunc: o => new InboundEndpoint(o));
 103
 0104            return converted;
 105        }
 106
 107        /// <summary>
 108        /// Converts a collection of protocol layer objects to object layer collection objects, in a frozen state.
 109        /// </summary>
 110        internal static IList<InboundEndpoint> ConvertFromProtocolCollectionAndFreeze(IEnumerable<Models.InboundEndpoint
 111        {
 0112            ConcurrentChangeTrackedModifiableList<InboundEndpoint> converted = UtilitiesInternal.CollectionToThreadSafeC
 0113                items: protoCollection,
 0114                objectCreationFunc: o => new InboundEndpoint(o).Freeze());
 115
 0116            converted = UtilitiesInternal.CreateObjectWithNullCheck(converted, o => o.Freeze());
 117
 0118            return converted;
 119        }
 120
 121        /// <summary>
 122        /// Converts a collection of protocol layer objects to object layer collection objects, with each object marked 
 123        /// and returned as a readonly collection.
 124        /// </summary>
 125        internal static IReadOnlyList<InboundEndpoint> ConvertFromProtocolCollectionReadOnly(IEnumerable<Models.InboundE
 126        {
 489127            IReadOnlyList<InboundEndpoint> converted =
 489128                UtilitiesInternal.CreateObjectWithNullCheck(
 489129                    UtilitiesInternal.CollectionToNonThreadSafeCollection(
 489130                        items: protoCollection,
 1717131                        objectCreationFunc: o => new InboundEndpoint(o).Freeze()), o => o.AsReadOnly());
 132
 489133            return converted;
 134        }
 135
 136        #endregion // Internal/private methods
 137    }
 138}