< Summary

Class:Microsoft.Azure.Batch.TaskSchedulingPolicy
Assembly:Microsoft.Azure.Batch
File(s):C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\Generated\TaskSchedulingPolicy.cs
Covered lines:14
Uncovered lines:2
Coverable lines:16
Total lines:93
Line coverage:87.5% (14 of 16)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
.ctor(...)-100%100%
get_ComputeNodeFillType()-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%
Microsoft.Azure.Batch.ITransportObjectProvider<Microsoft.Azure.Batch.Protocol.Models.TaskSchedulingPolicy>.GetTransportObject()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\Generated\TaskSchedulingPolicy.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    /// A scheduling policy for a compute node.
 22    /// </summary>
 23    public partial class TaskSchedulingPolicy : ITransportObjectProvider<Models.TaskSchedulingPolicy>, IPropertyMetadata
 24    {
 25        #region Constructors
 26        /// <summary>
 27        /// Initializes a new instance of the <see cref="TaskSchedulingPolicy"/> class.
 28        /// </summary>
 29        /// <param name='computeNodeFillType'>The fill type of scheduling policy.</param>
 26630        public TaskSchedulingPolicy(
 26631            Common.ComputeNodeFillType computeNodeFillType)
 32        {
 26633            this.ComputeNodeFillType = computeNodeFillType;
 26634        }
 35
 58036        internal TaskSchedulingPolicy(Models.TaskSchedulingPolicy protocolObject)
 37        {
 58038            this.ComputeNodeFillType = UtilitiesInternal.MapEnum<Models.ComputeNodeFillType, Common.ComputeNodeFillType>
 58039        }
 40
 41        #endregion Constructors
 42
 43        #region TaskSchedulingPolicy
 44
 45        /// <summary>
 46        /// Gets the fill type of scheduling policy.
 47        /// </summary>
 48        /// <remarks>
 49        /// If not specified, the default is <see cref="Common.ComputeNodeFillType.Spread"/>.
 50        /// </remarks>
 111151        public Common.ComputeNodeFillType ComputeNodeFillType { get; }
 52
 53        #endregion // TaskSchedulingPolicy
 54
 55        #region IPropertyMetadata
 56
 57        bool IModifiable.HasBeenModified
 58        {
 59            //This class is compile time readonly so it cannot have been modified
 060            get { return false; }
 61        }
 62
 63        bool IReadOnly.IsReadOnly
 64        {
 065            get { return true; }
 66            set
 67            {
 68                // This class is compile time readonly already
 49469            }
 70        }
 71
 72        #endregion // IPropertyMetadata
 73
 74        #region Internal/private methods
 75
 76        /// <summary>
 77        /// Return a protocol object of the requested type.
 78        /// </summary>
 79        /// <returns>The protocol object of the requested type.</returns>
 80        Models.TaskSchedulingPolicy ITransportObjectProvider<Models.TaskSchedulingPolicy>.GetTransportObject()
 81        {
 26582            Models.TaskSchedulingPolicy result = new Models.TaskSchedulingPolicy()
 26583            {
 26584                NodeFillType = UtilitiesInternal.MapEnum<Common.ComputeNodeFillType, Models.ComputeNodeFillType>(this.Co
 26585            };
 86
 26587            return result;
 88        }
 89
 90
 91        #endregion // Internal/private methods
 92    }
 93}