Skip to content

Commit

Permalink
ran dotnet format
Browse files Browse the repository at this point in the history
  • Loading branch information
niemyjski committed Mar 27, 2024
1 parent 65430a1 commit 6b2b88a
Show file tree
Hide file tree
Showing 10 changed files with 1,256 additions and 1,262 deletions.
12 changes: 8 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ csharp_indent_labels = one_less_than_current
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:suggestion

# avoid this. unless absolutely necessary
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_event = false:suggestion
dotnet_style_qualification_for_field = false:error
dotnet_style_qualification_for_property = false:error
dotnet_style_qualification_for_method = false:error
dotnet_style_qualification_for_event = false:error

# Types: use keywords instead of BCL types, and permit var only when the type is clear
csharp_style_var_for_built_in_types = false:suggestion
Expand Down Expand Up @@ -154,6 +154,10 @@ csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false

# Custom
csharp_style_namespace_declarations = file_scoped:error
dotnet_diagnostic.IDE0005.severity = error # Using directive is unnecessary.

# C++ Files
[*.{cpp,h,in}]
curly_bracket_next_line = true
Expand Down
17 changes: 8 additions & 9 deletions src/Foundatio.AzureServiceBus/Extensions/QueueEntryExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
using Foundatio.Queues;
using Microsoft.Azure.ServiceBus;

namespace Foundatio.Extensions
namespace Foundatio.Extensions;

internal static class QueueEntryExtensions
{
internal static class QueueEntryExtensions
{

public static string LockToken(this IQueueEntry entry) => entry.Properties["LockToken"];
public static string LockToken(this IQueueEntry entry) => entry.Properties["LockToken"];

public static void SetLockToken(this IQueueEntryMetadata entry, Message message)
{
if (message.SystemProperties.IsReceived)
entry.Properties.Add("LockToken", message.SystemProperties.LockToken);
}
public static void SetLockToken(this IQueueEntryMetadata entry, Message message)
{
if (message.SystemProperties.IsReceived)
entry.Properties.Add("LockToken", message.SystemProperties.LockToken);
}
}
33 changes: 16 additions & 17 deletions src/Foundatio.AzureServiceBus/Extensions/TaskExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,25 @@
using System.Threading.Tasks;
using Foundatio.AsyncEx;

namespace Foundatio.Extensions
namespace Foundatio.Extensions;

internal static class TaskExtensions
{
internal static class TaskExtensions
[DebuggerStepThrough]
public static ConfiguredTaskAwaitable<TResult> AnyContext<TResult>(this Task<TResult> task)
{
[DebuggerStepThrough]
public static ConfiguredTaskAwaitable<TResult> AnyContext<TResult>(this Task<TResult> task)
{
return task.ConfigureAwait(continueOnCapturedContext: false);
}
return task.ConfigureAwait(continueOnCapturedContext: false);
}

[DebuggerStepThrough]
public static ConfiguredTaskAwaitable AnyContext(this Task task)
{
return task.ConfigureAwait(continueOnCapturedContext: false);
}
[DebuggerStepThrough]
public static ConfiguredTaskAwaitable AnyContext(this Task task)
{
return task.ConfigureAwait(continueOnCapturedContext: false);
}

[DebuggerStepThrough]
public static ConfiguredTaskAwaitable<TResult> AnyContext<TResult>(this AwaitableDisposable<TResult> task) where TResult : IDisposable
{
return task.ConfigureAwait(continueOnCapturedContext: false);
}
[DebuggerStepThrough]
public static ConfiguredTaskAwaitable<TResult> AnyContext<TResult>(this AwaitableDisposable<TResult> task) where TResult : IDisposable
{
return task.ConfigureAwait(continueOnCapturedContext: false);
}
}
Loading

0 comments on commit 6b2b88a

Please sign in to comment.