Skip to content

Commit

Permalink
dotnet format
Browse files Browse the repository at this point in the history
  • Loading branch information
niemyjski committed Mar 21, 2024
1 parent 16683d1 commit 831b932
Show file tree
Hide file tree
Showing 41 changed files with 22 additions and 67 deletions.
3 changes: 1 addition & 2 deletions src/Foundatio.AppMetrics/AppMetricsClient.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using App.Metrics;
using App.Metrics;
using App.Metrics.Counter;
using App.Metrics.Gauge;
using App.Metrics.Timer;
Expand Down
3 changes: 1 addition & 2 deletions src/Foundatio.Extensions.Hosting/Startup/IStartupAction.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Threading;
using System.Threading;
using System.Threading.Tasks;

namespace Foundatio.Extensions.Hosting.Startup;
Expand Down
3 changes: 1 addition & 2 deletions src/Foundatio.MetricsNET/MetricsNETClient.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using Metrics;
using Metrics;

namespace Foundatio.Metrics;

Expand Down
3 changes: 1 addition & 2 deletions src/Foundatio.TestHarness/Serializer/SerializerTestsBase.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using BenchmarkDotNet.Attributes;
using Foundatio.Serializer;
using Foundatio.Xunit;
Expand Down
4 changes: 2 additions & 2 deletions src/Foundatio.TestHarness/Storage/FileStorageTestsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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);
Expand Down
6 changes: 4 additions & 2 deletions src/Foundatio.Xunit/Logging/LoggingExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ public static ILoggingBuilder AddTestLogger(this ILoggingBuilder builder, ITestO
Action<TestLoggerOptions> configure = null)
{

var options = new TestLoggerOptions {
var options = new TestLoggerOptions
{
WriteLogEntryFunc = logEntry =>
{
outputHelper?.WriteLine(logEntry.ToString(false));
Expand All @@ -33,7 +34,8 @@ public static ILoggingBuilder AddTestLogger(this ILoggingBuilder builder, Func<I
Action<TestLoggerOptions> configure = null)
{

var options = new TestLoggerOptions {
var options = new TestLoggerOptions
{
WriteLogEntryFunc = logEntry =>
{
getOutputHelper?.Invoke()?.WriteLine(logEntry.ToString(false));
Expand Down
3 changes: 2 additions & 1 deletion src/Foundatio.Xunit/Logging/TestLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public TestLogger(Action<TestLoggerOptions> configure = null)

public TestLogger(ITestOutputHelper output, Action<TestLoggerOptions> configure = null)
{
Options = new TestLoggerOptions {
Options = new TestLoggerOptions
{
WriteLogEntryFunc = logEntry =>
{
output.WriteLine(logEntry.ToString(false));
Expand Down
2 changes: 1 addition & 1 deletion src/Foundatio.Xunit/Logging/TestLoggerFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public virtual async Task DisposeAsync()
break;
}
}
catch (ObjectDisposedException) {}
catch (ObjectDisposedException) { }
catch (Exception ex)
{
Log?.LogError(ex, "Error disposing resource.");
Expand Down
2 changes: 0 additions & 2 deletions src/Foundatio/DeepCloner/Helpers/DeepCloneState.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;

namespace Foundatio.Force.DeepCloner.Helpers;
Expand Down
1 change: 0 additions & 1 deletion src/Foundatio/DeepCloner/Helpers/DeepClonerSafeTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions src/Foundatio/DeepCloner/Helpers/ShallowObjectCloner.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#define NETCORE
using System;
using System.Linq.Expressions;
using System.Reflection;
using System.Reflection.Emit;

namespace Foundatio.Force.DeepCloner.Helpers;

Expand Down
3 changes: 1 addition & 2 deletions src/Foundatio/Extensions/ObjectExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using Foundatio.Force.DeepCloner.Helpers;
using Foundatio.Force.DeepCloner.Helpers;

namespace Foundatio.Utility;

Expand Down
1 change: 0 additions & 1 deletion src/Foundatio/Jobs/IJob.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
using Foundatio.Utility;
Expand Down
4 changes: 1 addition & 3 deletions src/Foundatio/Jobs/IQueueJob.cs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
1 change: 0 additions & 1 deletion src/Foundatio/Jobs/QueueJobBase.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
Expand Down
3 changes: 1 addition & 2 deletions src/Foundatio/Jobs/WorkItemJob/WorkItemData.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using Foundatio.Metrics;
using Foundatio.Metrics;
using Foundatio.Queues;

namespace Foundatio.Jobs;
Expand Down
1 change: 0 additions & 1 deletion src/Foundatio/Lock/ILockProvider.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
Expand Down
1 change: 0 additions & 1 deletion src/Foundatio/Messaging/Message.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Foundatio.Serializer;

namespace Foundatio.Messaging;

Expand Down
3 changes: 1 addition & 2 deletions src/Foundatio/Metrics/InMemoryMetricsClient.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using Foundatio.Caching;
using Foundatio.Caching;

namespace Foundatio.Metrics;

Expand Down
2 changes: 0 additions & 2 deletions src/Foundatio/Metrics/MetricTimer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

using System;
using System.Diagnostics;
using System.Threading.Tasks;
using Foundatio.Utility;

namespace Foundatio.Metrics;

Expand Down
2 changes: 0 additions & 2 deletions src/Foundatio/Metrics/NullMetricsClient.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#pragma warning disable 612, 618

using System.Threading.Tasks;

namespace Foundatio.Metrics;

public class NullMetricsClient : IMetricsClient
Expand Down
4 changes: 1 addition & 3 deletions src/Foundatio/Metrics/SharedMetricsClientOptions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;

namespace Foundatio.Metrics;
namespace Foundatio.Metrics;

public class SharedMetricsClientOptions : SharedOptions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Runtime.ExceptionServices;
using System.Threading;
using System.Threading.Tasks;

Expand Down
3 changes: 0 additions & 3 deletions src/Foundatio/Nito.AsyncEx.Tasks/TaskExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;

Expand Down
2 changes: 0 additions & 2 deletions src/Foundatio/Nito.Disposables/Internals/BoundAction.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;

namespace Foundatio.Disposables.Internals;
Expand Down
1 change: 0 additions & 1 deletion src/Foundatio/Nito.Disposables/SingleDisposable.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using Foundatio.Disposables.Internals;

Expand Down
1 change: 0 additions & 1 deletion src/Foundatio/Queues/IQueueEntry.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Foundatio.Utility;

namespace Foundatio.Queues;

Expand Down
3 changes: 0 additions & 3 deletions src/Foundatio/Utility/ConnectionStringParser.cs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
3 changes: 1 addition & 2 deletions src/Foundatio/Utility/FoundatioDiagnostics.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Diagnostics;
using System.Diagnostics;
using System.Diagnostics.Metrics;
using System.Reflection;

Expand Down
1 change: 0 additions & 1 deletion src/Foundatio/Utility/IAsyncLifetime.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Runtime.ExceptionServices;
using System.Threading.Tasks;

namespace Foundatio.Utility;
Expand Down
4 changes: 1 addition & 3 deletions src/Foundatio/Utility/OptionsBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;

namespace Foundatio;
namespace Foundatio;

public interface IOptionsBuilder
{
Expand Down
2 changes: 1 addition & 1 deletion src/Foundatio/Utility/ScheduledTimer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 0 additions & 1 deletion src/Foundatio/Utility/SharedOptions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using Foundatio.Serializer;
using Microsoft.Extensions.Logging;

Expand Down
1 change: 0 additions & 1 deletion tests/Foundatio.Tests/Jobs/InMemoryJobQueueTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Threading.Tasks;
using Foundatio.Caching;
using Foundatio.Queues;
using Foundatio.Xunit;
using Microsoft.Extensions.Logging;

using Xunit;
Expand Down
1 change: 0 additions & 1 deletion tests/Foundatio.Tests/Locks/InMemoryLockTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion tests/Foundatio.Tests/Metrics/DiagnosticsMetricsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Threading.Tasks;
using Foundatio.Metrics;
using Foundatio.Xunit;
using Microsoft.Extensions.Logging;
using Xunit;
using Xunit.Abstractions;

Expand Down
1 change: 0 additions & 1 deletion tests/Foundatio.Tests/Metrics/InMemoryMetricsTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System.Threading.Tasks;
using Foundatio.Metrics;
using Foundatio.Utility;
using Foundatio.Xunit;

using Xunit;
using Xunit.Abstractions;
Expand Down
3 changes: 1 addition & 2 deletions tests/Foundatio.Tests/Storage/FolderFileStorageTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.IO;
using System.IO;
using System.Threading.Tasks;
using Foundatio.Storage;
using Xunit;
Expand Down

0 comments on commit 831b932

Please sign in to comment.