Sealed qualifying public classes Migrated database changes
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
|
||||
public static class Hash
|
||||
{
|
||||
public static Func<string?, string?> StringToSha256Hash = (input) =>
|
||||
public static readonly Func<string?, string?> StringToSha256Hash = (input) =>
|
||||
Convert.ToHexString(SHA256.HashData(Encoding.UTF8.GetBytes(input!)));
|
||||
|
||||
public static Func<Stream, string?> StreamToSha256Hash = (stream) =>
|
||||
public static readonly Func<Stream, string?> StreamToSha256Hash = (stream) =>
|
||||
Convert.ToHexString(SHA256.HashData(stream));
|
||||
|
||||
public static Func<byte[], string?> BytesToSha256Hash = (bytes) =>
|
||||
public static readonly Func<byte[], string?> BytesToSha256Hash = (bytes) =>
|
||||
Convert.ToHexString(SHA256.HashData(bytes));
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public static class Quartz
|
||||
config.UseDefaultThreadPool(options => options.MaxConcurrency = 1);
|
||||
config.UseTimeZoneConverter();
|
||||
|
||||
config.SetProperty("quartz.jobStore.misfireThreshold", TimeSpan.FromMinutes(2).TotalMilliseconds.ToString());
|
||||
config.SetProperty("quartz.jobStore.misfireThreshold", TimeSpan.FromMinutes(2).TotalMilliseconds.ToString(CultureInfo.InvariantCulture));
|
||||
|
||||
config.UsePersistentStore(storage =>
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ public static class Timezones
|
||||
? new DateTimeOffset(sourceDateAdjusted.Ticks, SouthAfricanTimeZone.BaseUtcOffset).LocaliseDateTimeOffset(SouthAfricanTimeZone.BaseUtcOffset)
|
||||
: new DateTimeOffset(sourceDateAdjusted.Ticks, timezone!.BaseUtcOffset).LocaliseDateTimeOffset(timezone.BaseUtcOffset);
|
||||
|
||||
return DateTimeOffset.Parse(localised!);
|
||||
return DateTimeOffset.Parse(localised!, CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
public static DateTime UtcNow(this TimeZoneInfo timezone) => ToDateTimeWithTimeZone(DateTime.Now, timezone).UtcDateTime;
|
||||
|
||||
Reference in New Issue
Block a user