From 41f046624d7dcb53850062bc0f6f9fe1d8de560a Mon Sep 17 00:00:00 2001 From: honzapatCZ Date: Fri, 7 Aug 2026 23:41:05 +0200 Subject: [PATCH] nullabilities --- Models/DateOnlyFrame.cs | 8 ++++---- Models/DateTimeFrame.cs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Models/DateOnlyFrame.cs b/Models/DateOnlyFrame.cs index fc6d6fb..0c1ef3e 100644 --- a/Models/DateOnlyFrame.cs +++ b/Models/DateOnlyFrame.cs @@ -49,9 +49,9 @@ public class DateOnlyFrame : IEquatable public override int GetHashCode() => HashCode.Combine(fromDate, toDate); - public static bool operator ==(DateOnlyFrame left, DateOnlyFrame right) - => left.Equals(right); + public static bool operator ==(DateOnlyFrame? left, DateOnlyFrame? right) + => left?.Equals(right) ?? right is null; - public static bool operator !=(DateOnlyFrame left, DateOnlyFrame right) - => !left.Equals(right); + public static bool operator !=(DateOnlyFrame? left, DateOnlyFrame? right) + => !(left?.Equals(right) ?? right is null); } \ No newline at end of file diff --git a/Models/DateTimeFrame.cs b/Models/DateTimeFrame.cs index e319782..794b049 100644 --- a/Models/DateTimeFrame.cs +++ b/Models/DateTimeFrame.cs @@ -40,9 +40,9 @@ public class DateTimeFrame : IEquatable public override int GetHashCode() => HashCode.Combine(FromDate, ToDate); - public static bool operator ==(DateTimeFrame left, DateTimeFrame right) - => left.Equals(right); + public static bool operator ==(DateTimeFrame? left, DateTimeFrame? right) + => left?.Equals(right) ?? right is null; - public static bool operator !=(DateTimeFrame left, DateTimeFrame right) - => !left.Equals(right); + public static bool operator !=(DateTimeFrame? left, DateTimeFrame? right) + => !(left?.Equals(right) ?? right is null); } \ No newline at end of file