< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 8
Coverable lines: 8
Total lines: 45
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
.ctor(...)100%110%

File(s)

https://raw.githubusercontent.com/dotnet/runtime/811a7eabb75c42db53440e8ba3f60c07511cfd1f/src/libraries/System.Private.CoreLib/src/System/Globalization/DaylightTime.cs

#LineLine coverage
 1// Licensed to the .NET Foundation under one or more agreements.
 2// The .NET Foundation licenses this file to you under the MIT license.
 3
 4namespace System.Globalization
 5{
 6    // This class represents a starting/ending time for a period of daylight saving time.
 7    public class DaylightTime
 8    {
 9        private readonly DateTime _start;
 10        private readonly DateTime _end;
 11        private readonly TimeSpan _delta;
 12
 013        public DaylightTime(DateTime start, DateTime end, TimeSpan delta)
 14        {
 015            _start = start;
 016            _end = end;
 017            _delta = delta;
 018        }
 19
 20        // The start date of a daylight saving period.
 021        public DateTime Start => _start;
 22
 23        // The end date of a daylight saving period.
 024        public DateTime End => _end;
 25
 26        // Delta to stardard offset in ticks.
 027        public TimeSpan Delta => _delta;
 28    }
 29
 30    // Value type version of DaylightTime
 31    internal readonly struct DaylightTimeStruct
 32    {
 33        public DaylightTimeStruct(DateTime start, DateTime end, TimeSpan delta)
 34        {
 35            Start = start;
 36            End = end;
 37            Delta = delta;
 38        }
 39
 40        public readonly DateTime Start;
 41        public readonly DateTime End;
 42        public readonly TimeSpan Delta;
 43    }
 44}
 45