diff --git a/src/Foundatio.AppMetrics/AppMetricsClient.cs b/src/Foundatio.AppMetrics/AppMetricsClient.cs index 9feffee5..638104e0 100644 --- a/src/Foundatio.AppMetrics/AppMetricsClient.cs +++ b/src/Foundatio.AppMetrics/AppMetricsClient.cs @@ -1,5 +1,4 @@ -using System; -using App.Metrics; +using App.Metrics; using App.Metrics.Counter; using App.Metrics.Gauge; using App.Metrics.Timer; diff --git a/src/Foundatio.Extensions.Hosting/Startup/IStartupAction.cs b/src/Foundatio.Extensions.Hosting/Startup/IStartupAction.cs index 98cd9736..e067d4ff 100644 --- a/src/Foundatio.Extensions.Hosting/Startup/IStartupAction.cs +++ b/src/Foundatio.Extensions.Hosting/Startup/IStartupAction.cs @@ -1,5 +1,4 @@ -using System; -using System.Threading; +using System.Threading; using System.Threading.Tasks; namespace Foundatio.Extensions.Hosting.Startup; diff --git a/src/Foundatio.MetricsNET/MetricsNETClient.cs b/src/Foundatio.MetricsNET/MetricsNETClient.cs index 0dc737a2..beb952a4 100644 --- a/src/Foundatio.MetricsNET/MetricsNETClient.cs +++ b/src/Foundatio.MetricsNET/MetricsNETClient.cs @@ -1,5 +1,4 @@ -using System; -using Metrics; +using Metrics; namespace Foundatio.Metrics; diff --git a/src/Foundatio.TestHarness/Serializer/SerializerTestsBase.cs b/src/Foundatio.TestHarness/Serializer/SerializerTestsBase.cs index 85e9651d..75b2e7b6 100644 --- a/src/Foundatio.TestHarness/Serializer/SerializerTestsBase.cs +++ b/src/Foundatio.TestHarness/Serializer/SerializerTestsBase.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using BenchmarkDotNet.Attributes; using Foundatio.Serializer; using Foundatio.Xunit; diff --git a/src/Foundatio.TestHarness/Storage/FileStorageTestsBase.cs b/src/Foundatio.TestHarness/Storage/FileStorageTestsBase.cs index a39e4a51..87abd154 100644 --- a/src/Foundatio.TestHarness/Storage/FileStorageTestsBase.cs +++ b/src/Foundatio.TestHarness/Storage/FileStorageTestsBase.cs @@ -559,7 +559,7 @@ public virtual async Task CanConcurrentlyManageFilesAsync() var info = await storage.GetFileInfoAsync("nope"); Assert.Null(info); - await Parallel.ForEachAsync(Enumerable.Range(1, 10), async (i, ct) => + await Parallel.ForEachAsync(Enumerable.Range(1, 10), async (i, ct) => { var ev = new PostInfo { @@ -579,7 +579,7 @@ await Parallel.ForEachAsync(Enumerable.Range(1, 10), async (i, ct) => Assert.Equal(10, (await storage.GetFileListAsync()).Count); - await Parallel.ForEachAsync(Enumerable.Range(1, 10), async (_, _) => + await Parallel.ForEachAsync(Enumerable.Range(1, 10), async (_, _) => { string path = Path.Combine(queueFolder, queueItems.Random() + ".json"); var eventPost = await storage.GetEventPostAndSetActiveAsync(Path.Combine(queueFolder, RandomData.GetInt(0, 25) + ".json"), _logger); diff --git a/src/Foundatio.Xunit/Logging/LoggingExtensions.cs b/src/Foundatio.Xunit/Logging/LoggingExtensions.cs index fbe2959e..18a81d3f 100644 --- a/src/Foundatio.Xunit/Logging/LoggingExtensions.cs +++ b/src/Foundatio.Xunit/Logging/LoggingExtensions.cs @@ -17,7 +17,8 @@ public static ILoggingBuilder AddTestLogger(this ILoggingBuilder builder, ITestO Action configure = null) { - var options = new TestLoggerOptions { + var options = new TestLoggerOptions + { WriteLogEntryFunc = logEntry => { outputHelper?.WriteLine(logEntry.ToString(false)); @@ -33,7 +34,8 @@ public static ILoggingBuilder AddTestLogger(this ILoggingBuilder builder, Func configure = null) { - var options = new TestLoggerOptions { + var options = new TestLoggerOptions + { WriteLogEntryFunc = logEntry => { getOutputHelper?.Invoke()?.WriteLine(logEntry.ToString(false)); diff --git a/src/Foundatio.Xunit/Logging/TestLogger.cs b/src/Foundatio.Xunit/Logging/TestLogger.cs index 50506695..33eb1ced 100644 --- a/src/Foundatio.Xunit/Logging/TestLogger.cs +++ b/src/Foundatio.Xunit/Logging/TestLogger.cs @@ -21,7 +21,8 @@ public TestLogger(Action configure = null) public TestLogger(ITestOutputHelper output, Action configure = null) { - Options = new TestLoggerOptions { + Options = new TestLoggerOptions + { WriteLogEntryFunc = logEntry => { output.WriteLine(logEntry.ToString(false)); diff --git a/src/Foundatio.Xunit/Logging/TestLoggerFixture.cs b/src/Foundatio.Xunit/Logging/TestLoggerFixture.cs index 3e191e97..ec601b80 100644 --- a/src/Foundatio.Xunit/Logging/TestLoggerFixture.cs +++ b/src/Foundatio.Xunit/Logging/TestLoggerFixture.cs @@ -71,7 +71,7 @@ public virtual async Task DisposeAsync() break; } } - catch (ObjectDisposedException) {} + catch (ObjectDisposedException) { } catch (Exception ex) { Log?.LogError(ex, "Error disposing resource."); diff --git a/src/Foundatio/DeepCloner/Helpers/DeepCloneState.cs b/src/Foundatio/DeepCloner/Helpers/DeepCloneState.cs index a203f3fb..9e6b05c7 100644 --- a/src/Foundatio/DeepCloner/Helpers/DeepCloneState.cs +++ b/src/Foundatio/DeepCloner/Helpers/DeepCloneState.cs @@ -1,6 +1,4 @@ using System; -using System.Collections; -using System.Collections.Generic; using System.Runtime.CompilerServices; namespace Foundatio.Force.DeepCloner.Helpers; diff --git a/src/Foundatio/DeepCloner/Helpers/DeepClonerSafeTypes.cs b/src/Foundatio/DeepCloner/Helpers/DeepClonerSafeTypes.cs index 2d9dbabb..e3b60bc0 100644 --- a/src/Foundatio/DeepCloner/Helpers/DeepClonerSafeTypes.cs +++ b/src/Foundatio/DeepCloner/Helpers/DeepClonerSafeTypes.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; -using System.Linq; using System.Reflection; namespace Foundatio.Force.DeepCloner.Helpers; diff --git a/src/Foundatio/DeepCloner/Helpers/ShallowObjectCloner.cs b/src/Foundatio/DeepCloner/Helpers/ShallowObjectCloner.cs index 78ff49ff..1742abb8 100644 --- a/src/Foundatio/DeepCloner/Helpers/ShallowObjectCloner.cs +++ b/src/Foundatio/DeepCloner/Helpers/ShallowObjectCloner.cs @@ -1,8 +1,6 @@ #define NETCORE using System; using System.Linq.Expressions; -using System.Reflection; -using System.Reflection.Emit; namespace Foundatio.Force.DeepCloner.Helpers; diff --git a/src/Foundatio/Extensions/ObjectExtensions.cs b/src/Foundatio/Extensions/ObjectExtensions.cs index 96f3af88..8a8d5a5d 100644 --- a/src/Foundatio/Extensions/ObjectExtensions.cs +++ b/src/Foundatio/Extensions/ObjectExtensions.cs @@ -1,5 +1,4 @@ -using System; -using Foundatio.Force.DeepCloner.Helpers; +using Foundatio.Force.DeepCloner.Helpers; namespace Foundatio.Utility; diff --git a/src/Foundatio/Jobs/IJob.cs b/src/Foundatio/Jobs/IJob.cs index fec87b32..15ec2891 100644 --- a/src/Foundatio/Jobs/IJob.cs +++ b/src/Foundatio/Jobs/IJob.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.Threading; using System.Threading.Tasks; using Foundatio.Utility; diff --git a/src/Foundatio/Jobs/IQueueJob.cs b/src/Foundatio/Jobs/IQueueJob.cs index cf881965..37f7e891 100644 --- a/src/Foundatio/Jobs/IQueueJob.cs +++ b/src/Foundatio/Jobs/IQueueJob.cs @@ -1,10 +1,8 @@ -using System; -using System.Threading; +using System.Threading; using System.Threading.Tasks; using Foundatio.Queues; using Foundatio.Utility; using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging.Abstractions; namespace Foundatio.Jobs; diff --git a/src/Foundatio/Jobs/QueueJobBase.cs b/src/Foundatio/Jobs/QueueJobBase.cs index ee2653fd..46f583b4 100644 --- a/src/Foundatio/Jobs/QueueJobBase.cs +++ b/src/Foundatio/Jobs/QueueJobBase.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Threading.Tasks; diff --git a/src/Foundatio/Jobs/WorkItemJob/WorkItemData.cs b/src/Foundatio/Jobs/WorkItemJob/WorkItemData.cs index 00379811..63acbc9f 100644 --- a/src/Foundatio/Jobs/WorkItemJob/WorkItemData.cs +++ b/src/Foundatio/Jobs/WorkItemJob/WorkItemData.cs @@ -1,5 +1,4 @@ -using System; -using Foundatio.Metrics; +using Foundatio.Metrics; using Foundatio.Queues; namespace Foundatio.Jobs; diff --git a/src/Foundatio/Lock/ILockProvider.cs b/src/Foundatio/Lock/ILockProvider.cs index b70346a4..2acb709e 100644 --- a/src/Foundatio/Lock/ILockProvider.cs +++ b/src/Foundatio/Lock/ILockProvider.cs @@ -1,5 +1,4 @@ using System; -using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; diff --git a/src/Foundatio/Messaging/Message.cs b/src/Foundatio/Messaging/Message.cs index b8873321..7d6fcd2f 100644 --- a/src/Foundatio/Messaging/Message.cs +++ b/src/Foundatio/Messaging/Message.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using Foundatio.Serializer; namespace Foundatio.Messaging; diff --git a/src/Foundatio/Metrics/InMemoryMetricsClient.cs b/src/Foundatio/Metrics/InMemoryMetricsClient.cs index b29c1d24..3693ad06 100644 --- a/src/Foundatio/Metrics/InMemoryMetricsClient.cs +++ b/src/Foundatio/Metrics/InMemoryMetricsClient.cs @@ -1,5 +1,4 @@ -using System; -using Foundatio.Caching; +using Foundatio.Caching; namespace Foundatio.Metrics; diff --git a/src/Foundatio/Metrics/MetricTimer.cs b/src/Foundatio/Metrics/MetricTimer.cs index 488e3e8b..fb1e695d 100644 --- a/src/Foundatio/Metrics/MetricTimer.cs +++ b/src/Foundatio/Metrics/MetricTimer.cs @@ -2,8 +2,6 @@ using System; using System.Diagnostics; -using System.Threading.Tasks; -using Foundatio.Utility; namespace Foundatio.Metrics; diff --git a/src/Foundatio/Metrics/NullMetricsClient.cs b/src/Foundatio/Metrics/NullMetricsClient.cs index 08268efb..4f0752a7 100644 --- a/src/Foundatio/Metrics/NullMetricsClient.cs +++ b/src/Foundatio/Metrics/NullMetricsClient.cs @@ -1,7 +1,5 @@ #pragma warning disable 612, 618 -using System.Threading.Tasks; - namespace Foundatio.Metrics; public class NullMetricsClient : IMetricsClient diff --git a/src/Foundatio/Metrics/SharedMetricsClientOptions.cs b/src/Foundatio/Metrics/SharedMetricsClientOptions.cs index 0586ac6d..22cb23ce 100644 --- a/src/Foundatio/Metrics/SharedMetricsClientOptions.cs +++ b/src/Foundatio/Metrics/SharedMetricsClientOptions.cs @@ -1,6 +1,4 @@ -using System; - -namespace Foundatio.Metrics; +namespace Foundatio.Metrics; public class SharedMetricsClientOptions : SharedOptions { diff --git a/src/Foundatio/Nito.AsyncEx.Coordination/AsyncAutoResetEvent.cs b/src/Foundatio/Nito.AsyncEx.Coordination/AsyncAutoResetEvent.cs index 224a57cb..8e710214 100644 --- a/src/Foundatio/Nito.AsyncEx.Coordination/AsyncAutoResetEvent.cs +++ b/src/Foundatio/Nito.AsyncEx.Coordination/AsyncAutoResetEvent.cs @@ -1,4 +1,3 @@ -using System; using System.Diagnostics; using System.Threading; using System.Threading.Tasks; diff --git a/src/Foundatio/Nito.AsyncEx.Coordination/AsyncConditionVariable.cs b/src/Foundatio/Nito.AsyncEx.Coordination/AsyncConditionVariable.cs index 5e5075df..380455d4 100644 --- a/src/Foundatio/Nito.AsyncEx.Coordination/AsyncConditionVariable.cs +++ b/src/Foundatio/Nito.AsyncEx.Coordination/AsyncConditionVariable.cs @@ -1,4 +1,3 @@ -using System; using System.Diagnostics; using System.Threading; using System.Threading.Tasks; diff --git a/src/Foundatio/Nito.AsyncEx.Coordination/AsyncCountdownEvent.cs b/src/Foundatio/Nito.AsyncEx.Coordination/AsyncCountdownEvent.cs index 744cee45..f5e972cc 100644 --- a/src/Foundatio/Nito.AsyncEx.Coordination/AsyncCountdownEvent.cs +++ b/src/Foundatio/Nito.AsyncEx.Coordination/AsyncCountdownEvent.cs @@ -1,4 +1,3 @@ -using System; using System.Diagnostics; using System.Threading; using System.Threading.Tasks; diff --git a/src/Foundatio/Nito.AsyncEx.Tasks/Synchronous/TaskExtensions.cs b/src/Foundatio/Nito.AsyncEx.Tasks/Synchronous/TaskExtensions.cs index a6f5c7e1..2c949007 100644 --- a/src/Foundatio/Nito.AsyncEx.Tasks/Synchronous/TaskExtensions.cs +++ b/src/Foundatio/Nito.AsyncEx.Tasks/Synchronous/TaskExtensions.cs @@ -1,5 +1,4 @@ using System; -using System.Runtime.ExceptionServices; using System.Threading; using System.Threading.Tasks; diff --git a/src/Foundatio/Nito.AsyncEx.Tasks/TaskExtensions.cs b/src/Foundatio/Nito.AsyncEx.Tasks/TaskExtensions.cs index 63262aac..87b33bd6 100644 --- a/src/Foundatio/Nito.AsyncEx.Tasks/TaskExtensions.cs +++ b/src/Foundatio/Nito.AsyncEx.Tasks/TaskExtensions.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; using System.Threading; using System.Threading.Tasks; diff --git a/src/Foundatio/Nito.Disposables/Internals/BoundAction.cs b/src/Foundatio/Nito.Disposables/Internals/BoundAction.cs index 0f1591ae..eccd0fb6 100644 --- a/src/Foundatio/Nito.Disposables/Internals/BoundAction.cs +++ b/src/Foundatio/Nito.Disposables/Internals/BoundAction.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; using System.Threading; namespace Foundatio.Disposables.Internals; diff --git a/src/Foundatio/Nito.Disposables/SingleDisposable.cs b/src/Foundatio/Nito.Disposables/SingleDisposable.cs index abee4790..ccb12be8 100644 --- a/src/Foundatio/Nito.Disposables/SingleDisposable.cs +++ b/src/Foundatio/Nito.Disposables/SingleDisposable.cs @@ -1,5 +1,4 @@ using System; -using System.Threading; using System.Threading.Tasks; using Foundatio.Disposables.Internals; diff --git a/src/Foundatio/Queues/IQueueEntry.cs b/src/Foundatio/Queues/IQueueEntry.cs index 16e49d3c..38d0f913 100644 --- a/src/Foundatio/Queues/IQueueEntry.cs +++ b/src/Foundatio/Queues/IQueueEntry.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; -using Foundatio.Utility; namespace Foundatio.Queues; diff --git a/src/Foundatio/Utility/ConnectionStringParser.cs b/src/Foundatio/Utility/ConnectionStringParser.cs index 15e6aadb..66befd6a 100644 --- a/src/Foundatio/Utility/ConnectionStringParser.cs +++ b/src/Foundatio/Utility/ConnectionStringParser.cs @@ -1,11 +1,8 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.Globalization; -using System.Linq; using System.Text; using System.Text.RegularExpressions; -using Foundatio.Utility; namespace Foundatio.Utility; diff --git a/src/Foundatio/Utility/FoundatioDiagnostics.cs b/src/Foundatio/Utility/FoundatioDiagnostics.cs index b8389bc7..78d3b47d 100644 --- a/src/Foundatio/Utility/FoundatioDiagnostics.cs +++ b/src/Foundatio/Utility/FoundatioDiagnostics.cs @@ -1,5 +1,4 @@ -using System; -using System.Diagnostics; +using System.Diagnostics; using System.Diagnostics.Metrics; using System.Reflection; diff --git a/src/Foundatio/Utility/IAsyncLifetime.cs b/src/Foundatio/Utility/IAsyncLifetime.cs index 0cef7348..70cc6688 100644 --- a/src/Foundatio/Utility/IAsyncLifetime.cs +++ b/src/Foundatio/Utility/IAsyncLifetime.cs @@ -1,5 +1,4 @@ using System; -using System.Runtime.ExceptionServices; using System.Threading.Tasks; namespace Foundatio.Utility; diff --git a/src/Foundatio/Utility/OptionsBuilder.cs b/src/Foundatio/Utility/OptionsBuilder.cs index d838d870..9f4d7e4f 100644 --- a/src/Foundatio/Utility/OptionsBuilder.cs +++ b/src/Foundatio/Utility/OptionsBuilder.cs @@ -1,6 +1,4 @@ -using System; - -namespace Foundatio; +namespace Foundatio; public interface IOptionsBuilder { diff --git a/src/Foundatio/Utility/ScheduledTimer.cs b/src/Foundatio/Utility/ScheduledTimer.cs index 74431e94..b428c5c0 100644 --- a/src/Foundatio/Utility/ScheduledTimer.cs +++ b/src/Foundatio/Utility/ScheduledTimer.cs @@ -157,7 +157,7 @@ private async Task RunCallbackAsync() if (isTraceLogLevelEnabled) _logger.LogTrace("Finished sleeping"); } - var nextRun = SystemClock.UtcNow.AddMilliseconds(10); + var nextRun = SystemClock.UtcNow.AddMilliseconds(10); if (nextRun < nextTimeOverride) nextRun = nextTimeOverride.Value; diff --git a/src/Foundatio/Utility/SharedOptions.cs b/src/Foundatio/Utility/SharedOptions.cs index 7df27a46..9eb89822 100644 --- a/src/Foundatio/Utility/SharedOptions.cs +++ b/src/Foundatio/Utility/SharedOptions.cs @@ -1,4 +1,3 @@ -using System; using Foundatio.Serializer; using Microsoft.Extensions.Logging; diff --git a/tests/Foundatio.Tests/Jobs/InMemoryJobQueueTests.cs b/tests/Foundatio.Tests/Jobs/InMemoryJobQueueTests.cs index ef1a9c89..0f980c9c 100644 --- a/tests/Foundatio.Tests/Jobs/InMemoryJobQueueTests.cs +++ b/tests/Foundatio.Tests/Jobs/InMemoryJobQueueTests.cs @@ -2,7 +2,6 @@ using System.Threading.Tasks; using Foundatio.Caching; using Foundatio.Queues; -using Foundatio.Xunit; using Microsoft.Extensions.Logging; using Xunit; diff --git a/tests/Foundatio.Tests/Locks/InMemoryLockTests.cs b/tests/Foundatio.Tests/Locks/InMemoryLockTests.cs index ba1e5279..eff187b6 100644 --- a/tests/Foundatio.Tests/Locks/InMemoryLockTests.cs +++ b/tests/Foundatio.Tests/Locks/InMemoryLockTests.cs @@ -4,7 +4,6 @@ using Foundatio.Lock; using Foundatio.Messaging; using Foundatio.Utility; -using Foundatio.Xunit; using Microsoft.Extensions.Logging; using Xunit; using Xunit.Abstractions; diff --git a/tests/Foundatio.Tests/Metrics/DiagnosticsMetricsTests.cs b/tests/Foundatio.Tests/Metrics/DiagnosticsMetricsTests.cs index 6bd06c12..fd6db79d 100644 --- a/tests/Foundatio.Tests/Metrics/DiagnosticsMetricsTests.cs +++ b/tests/Foundatio.Tests/Metrics/DiagnosticsMetricsTests.cs @@ -4,7 +4,6 @@ using System.Threading.Tasks; using Foundatio.Metrics; using Foundatio.Xunit; -using Microsoft.Extensions.Logging; using Xunit; using Xunit.Abstractions; diff --git a/tests/Foundatio.Tests/Metrics/InMemoryMetricsTests.cs b/tests/Foundatio.Tests/Metrics/InMemoryMetricsTests.cs index 7953aceb..8196f0ee 100644 --- a/tests/Foundatio.Tests/Metrics/InMemoryMetricsTests.cs +++ b/tests/Foundatio.Tests/Metrics/InMemoryMetricsTests.cs @@ -1,7 +1,6 @@ using System.Threading.Tasks; using Foundatio.Metrics; using Foundatio.Utility; -using Foundatio.Xunit; using Xunit; using Xunit.Abstractions; diff --git a/tests/Foundatio.Tests/Storage/FolderFileStorageTests.cs b/tests/Foundatio.Tests/Storage/FolderFileStorageTests.cs index 6d423ad9..816d9e5a 100644 --- a/tests/Foundatio.Tests/Storage/FolderFileStorageTests.cs +++ b/tests/Foundatio.Tests/Storage/FolderFileStorageTests.cs @@ -1,5 +1,4 @@ -using System; -using System.IO; +using System.IO; using System.Threading.Tasks; using Foundatio.Storage; using Xunit;