< Summary

Class:Microsoft.Azure.Batch.Schedule
Assembly:Microsoft.Azure.Batch
File(s):C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\Generated\Schedule.cs
Covered lines:48
Uncovered lines:1
Coverable lines:49
Total lines:157
Line coverage:97.9% (48 of 49)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-100%100%
.ctor()-100%100%
.ctor(...)-100%100%
get_DoNotRunAfter()-100%100%
set_DoNotRunAfter(...)-100%100%
get_DoNotRunUntil()-100%100%
set_DoNotRunUntil(...)-100%100%
get_RecurrenceInterval()-100%100%
set_RecurrenceInterval(...)-100%100%
get_StartWindow()-100%100%
set_StartWindow(...)-100%100%
Microsoft.Azure.Batch.IModifiable.get_HasBeenModified()-100%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.Schedule>.GetTransportObject()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\Generated\Schedule.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 schedule.
 22    /// </summary>
 23    public partial class Schedule : ITransportObjectProvider<Models.Schedule>, IPropertyMetadata
 24    {
 25        private class PropertyContainer : PropertyCollection
 26        {
 27            public readonly PropertyAccessor<DateTime?> DoNotRunAfterProperty;
 28            public readonly PropertyAccessor<DateTime?> DoNotRunUntilProperty;
 29            public readonly PropertyAccessor<TimeSpan?> RecurrenceIntervalProperty;
 30            public readonly PropertyAccessor<TimeSpan?> StartWindowProperty;
 31
 14732            public PropertyContainer() : base(BindingState.Unbound)
 33            {
 14734                this.DoNotRunAfterProperty = this.CreatePropertyAccessor<DateTime?>(nameof(DoNotRunAfter), BindingAccess
 14735                this.DoNotRunUntilProperty = this.CreatePropertyAccessor<DateTime?>(nameof(DoNotRunUntil), BindingAccess
 14736                this.RecurrenceIntervalProperty = this.CreatePropertyAccessor<TimeSpan?>(nameof(RecurrenceInterval), Bin
 14737                this.StartWindowProperty = this.CreatePropertyAccessor<TimeSpan?>(nameof(StartWindow), BindingAccess.Rea
 14738            }
 39
 51740            public PropertyContainer(Models.Schedule protocolObject) : base(BindingState.Bound)
 41            {
 51742                this.DoNotRunAfterProperty = this.CreatePropertyAccessor(
 51743                    protocolObject.DoNotRunAfter,
 51744                    nameof(DoNotRunAfter),
 51745                    BindingAccess.Read | BindingAccess.Write);
 51746                this.DoNotRunUntilProperty = this.CreatePropertyAccessor(
 51747                    protocolObject.DoNotRunUntil,
 51748                    nameof(DoNotRunUntil),
 51749                    BindingAccess.Read | BindingAccess.Write);
 51750                this.RecurrenceIntervalProperty = this.CreatePropertyAccessor(
 51751                    protocolObject.RecurrenceInterval,
 51752                    nameof(RecurrenceInterval),
 51753                    BindingAccess.Read | BindingAccess.Write);
 51754                this.StartWindowProperty = this.CreatePropertyAccessor(
 51755                    protocolObject.StartWindow,
 51756                    nameof(StartWindow),
 51757                    BindingAccess.Read | BindingAccess.Write);
 51758            }
 59        }
 60
 61        private readonly PropertyContainer propertyContainer;
 62
 63        #region Constructors
 64
 65        /// <summary>
 66        /// Initializes a new instance of the <see cref="Schedule"/> class.
 67        /// </summary>
 14768        public Schedule()
 69        {
 14770            this.propertyContainer = new PropertyContainer();
 14771        }
 72
 51773        internal Schedule(Models.Schedule protocolObject)
 74        {
 51775            this.propertyContainer = new PropertyContainer(protocolObject);
 51776        }
 77
 78        #endregion Constructors
 79
 80        #region Schedule
 81
 82        /// <summary>
 83        /// Gets or sets the wall clock time after which no job will be scheduled under this job schedule.
 84        /// </summary>
 85        public DateTime? DoNotRunAfter
 86        {
 80787            get { return this.propertyContainer.DoNotRunAfterProperty.Value; }
 14388            set { this.propertyContainer.DoNotRunAfterProperty.Value = value; }
 89        }
 90
 91        /// <summary>
 92        /// Gets or sets the earliest wall clock time at which to schedule the first job under this job schedule
 93        /// </summary>
 94        public DateTime? DoNotRunUntil
 95        {
 80796            get { return this.propertyContainer.DoNotRunUntilProperty.Value; }
 14797            set { this.propertyContainer.DoNotRunUntilProperty.Value = value; }
 98        }
 99
 100        /// <summary>
 101        /// Gets or sets the time interval between the start times of two successive jobs under the job schedule.
 102        /// </summary>
 103        public TimeSpan? RecurrenceInterval
 104        {
 807105            get { return this.propertyContainer.RecurrenceIntervalProperty.Value; }
 137106            set { this.propertyContainer.RecurrenceIntervalProperty.Value = value; }
 107        }
 108
 109        /// <summary>
 110        /// Gets or sets the window of time within which a job must be started from the time the job schedule is ready t
 111        /// be scheduled.
 112        /// </summary>
 113        public TimeSpan? StartWindow
 114        {
 807115            get { return this.propertyContainer.StartWindowProperty.Value; }
 125116            set { this.propertyContainer.StartWindowProperty.Value = value; }
 117        }
 118
 119        #endregion // Schedule
 120
 121        #region IPropertyMetadata
 122
 123        bool IModifiable.HasBeenModified
 124        {
 2125            get { return this.propertyContainer.HasBeenModified; }
 126        }
 127
 128        bool IReadOnly.IsReadOnly
 129        {
 0130            get { return this.propertyContainer.IsReadOnly; }
 8131            set { this.propertyContainer.IsReadOnly = value; }
 132        }
 133
 134        #endregion //IPropertyMetadata
 135
 136        #region Internal/private methods
 137        /// <summary>
 138        /// Return a protocol object of the requested type.
 139        /// </summary>
 140        /// <returns>The protocol object of the requested type.</returns>
 141        Models.Schedule ITransportObjectProvider<Models.Schedule>.GetTransportObject()
 142        {
 147143            Models.Schedule result = new Models.Schedule()
 147144            {
 147145                DoNotRunAfter = this.DoNotRunAfter,
 147146                DoNotRunUntil = this.DoNotRunUntil,
 147147                RecurrenceInterval = this.RecurrenceInterval,
 147148                StartWindow = this.StartWindow,
 147149            };
 150
 147151            return result;
 152        }
 153
 154
 155        #endregion // Internal/private methods
 156    }
 157}