diff --git a/src/Cronos/CronExpression.cs b/src/Cronos/CronExpression.cs index e89a723..da57c43 100644 --- a/src/Cronos/CronExpression.cs +++ b/src/Cronos/CronExpression.cs @@ -23,7 +23,6 @@ using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using System.Globalization; using System.Runtime.CompilerServices; using System.Text; @@ -245,7 +244,9 @@ public IEnumerable GetOccurrences( var fromOffset = new DateTimeOffset(fromUtc); +#pragma warning disable CA1062 var occurrence = GetOccurrenceConsideringTimeZone(fromOffset, zone, inclusive); +#pragma warning restore CA1062 return occurrence?.UtcDateTime; } @@ -294,7 +295,9 @@ public IEnumerable GetOccurrences( return new DateTimeOffset(found, TimeSpan.Zero); } +#pragma warning disable CA1062 return GetOccurrenceConsideringTimeZone(from, zone, inclusive); +#pragma warning restore CA1062 } /// diff --git a/src/Cronos/CronFormat.cs b/src/Cronos/CronFormat.cs index e5ffe87..994fd72 100644 --- a/src/Cronos/CronFormat.cs +++ b/src/Cronos/CronFormat.cs @@ -33,7 +33,9 @@ public enum CronFormat /// /// Parsing string must contain only 5 fields: minute, hour, day of month, month, day of week. /// +#pragma warning disable CA1008 Standard = 0, +#pragma warning restore CA1008 /// /// Second field must be specified in parsing string. diff --git a/src/Cronos/Cronos.csproj b/src/Cronos/Cronos.csproj index ef38521..210bbe4 100644 --- a/src/Cronos/Cronos.csproj +++ b/src/Cronos/Cronos.csproj @@ -38,7 +38,7 @@ true latest - Recommended + All true