Skip to content

Commit dc095d5

Browse files
committed
some fixes
1 parent a2c32fc commit dc095d5

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

src/DateRecurrenceR/Core/DayOfMonth.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ namespace DateRecurrenceR.Core;
33
/// <summary>
44
/// Represents a number of the day of the month
55
/// </summary>
6-
#if NET6_0
7-
public readonly struct DayOfMonth
8-
#else
6+
#if NET8_0_OR_GREATER
97
public readonly struct DayOfMonth : IInt32Based<DayOfMonth>
8+
#else
9+
public readonly struct DayOfMonth : IEquatable<DayOfMonth>
1010
#endif
1111
{
1212
private const int MinVal = 1;

src/DateRecurrenceR/Core/DayOfYear.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ namespace DateRecurrenceR.Core;
33
/// <summary>
44
/// Represents a number of the day of the year
55
/// </summary>
6-
#if NET6_0
7-
public readonly struct DayOfYear
8-
#else
6+
#if NET8_0_OR_GREATER
97
public readonly struct DayOfYear : IInt32Based<DayOfYear>
8+
#else
9+
public readonly struct DayOfYear : IEquatable<DayOfYear>
1010
#endif
1111
{
1212
private const int MinVal = 1;

src/DateRecurrenceR/Core/IInt32Based.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
namespace DateRecurrenceR.Core;
44

5+
#if NET8_0_OR_GREATER
56
/// <summary>
67
///
78
/// </summary>
89
/// <typeparam name="TSelf"></typeparam>
9-
#if NET8_0_OR_GREATER
1010
public interface IInt32Based<TSelf> : IEquatable<TSelf>, IEqualityOperators<TSelf, TSelf, bool>, IMinMaxValue<TSelf>
1111
where TSelf : IInt32Based<TSelf>;
1212
#endif

src/DateRecurrenceR/Core/Interval.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ namespace DateRecurrenceR.Core;
33
/// <summary>
44
/// Represents a number of the interval
55
/// </summary>
6-
#if NET6_0
7-
public readonly struct Interval
8-
#else
6+
#if NET8_0_OR_GREATER
97
public readonly struct Interval : IInt32Based<Interval>
8+
#else
9+
public readonly struct Interval : IEquatable<Interval>
1010
#endif
1111
{
1212
private const int MinVal = 1;
@@ -27,7 +27,7 @@ public Interval()
2727
/// </summary>
2828
public Interval(int value)
2929
{
30-
if (value is < MinVal or > MaxVal) throw new ArgumentOutOfRangeException(nameof(value));
30+
if (value < MinVal) throw new ArgumentOutOfRangeException(nameof(value));
3131

3232
_value = value;
3333
}

src/DateRecurrenceR/Core/MonthOfYear.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ namespace DateRecurrenceR.Core;
33
/// <summary>
44
/// Represents a number of the month of the year
55
/// </summary>
6-
#if NET6_0
7-
public readonly struct MonthOfYear
8-
#else
6+
#if NET8_0_OR_GREATER
97
public readonly struct MonthOfYear : IInt32Based<MonthOfYear>
8+
#else
9+
public readonly struct MonthOfYear : IEquatable<MonthOfYear>
1010
#endif
1111
{
1212
private const int MinVal = 1;

0 commit comments

Comments
 (0)