Skip to content

Commit

Permalink
Fix ide0002 style rule (#2302)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabidabet authored Sep 25, 2024
1 parent 0d925bc commit d496e1f
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 11 deletions.
8 changes: 5 additions & 3 deletions src/Polly.Core/ResilienceValidationContext.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace Polly;
using Polly.Utils;

namespace Polly;

/// <summary>
/// The validation context that encapsulates parameters for the validation.
Expand All @@ -12,8 +14,8 @@ internal sealed class ResilienceValidationContext
/// <param name="primaryMessage">The primary validation message.</param>
public ResilienceValidationContext(object instance, string primaryMessage)
{
Instance = Polly.Utils.Guard.NotNull(instance);
PrimaryMessage = Polly.Utils.Guard.NotNull(primaryMessage);
Instance = Guard.NotNull(instance);
PrimaryMessage = Guard.NotNull(primaryMessage);
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions src/Polly/AsyncPolicy.ExecuteOverloads.cs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ private async Task ExecuteInternalAsync(Func<Context, CancellationToken, Task> a
}
finally
{
PolicyBase.RestorePolicyContext(context, priorPolicyWrapKey, priorPolicyKey);
RestorePolicyContext(context, priorPolicyWrapKey, priorPolicyKey);
}
}

Expand All @@ -496,7 +496,7 @@ private async Task<TResult> ExecuteInternalAsync<TResult>(
}
finally
{
PolicyBase.RestorePolicyContext(context, priorPolicyWrapKey, priorPolicyKey);
RestorePolicyContext(context, priorPolicyWrapKey, priorPolicyKey);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ private async Task<TResult> ExecuteInternalAsync(
}
finally
{
PolicyBase.RestorePolicyContext(context, priorPolicyWrapKey, priorPolicyKey);
RestorePolicyContext(context, priorPolicyWrapKey, priorPolicyKey);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/Polly/Policy.ExecuteOverloads.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void Execute(Action<Context, CancellationToken> action, Context context,
}
finally
{
PolicyBase.RestorePolicyContext(context, priorPolicyWrapKey, priorPolicyKey);
RestorePolicyContext(context, priorPolicyWrapKey, priorPolicyKey);
}
}

Expand Down Expand Up @@ -160,7 +160,7 @@ public TResult Execute<TResult>(Func<Context, CancellationToken, TResult> action
}
finally
{
PolicyBase.RestorePolicyContext(context, priorPolicyWrapKey, priorPolicyKey);
RestorePolicyContext(context, priorPolicyWrapKey, priorPolicyKey);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Polly/Policy.TResult.ExecuteOverloads.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public TResult Execute(Func<Context, CancellationToken, TResult> action, Context
}
finally
{
PolicyBase.RestorePolicyContext(context, priorPolicyWrapKey, priorPolicyKey);
RestorePolicyContext(context, priorPolicyWrapKey, priorPolicyKey);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Polly/Utilities/TimedLock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private sealed class Sentinel
// If this finalizer runs, someone somewhere failed to
// call Dispose, which means we've failed to leave
// a monitor!
System.Diagnostics.Debug.Fail("Undisposed lock");
Debug.Fail("Undisposed lock");
}
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion src/Snippets/Docs/ResiliencePipelines.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public static void ResiliencePipelinesDiagramTimeoutRetryTimeout()

public static async Task ExecuteOutcomeAsync()
{
var pipeline = Polly.ResiliencePipeline.Empty;
var pipeline = ResiliencePipeline.Empty;

#region resilience-pipeline-outcome

Expand Down

0 comments on commit d496e1f

Please sign in to comment.