Skip to content

Commit

Permalink
Fix style warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
raman-m committed Nov 1, 2024
1 parent f1b5bc1 commit 3199588
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ public ResiliencePipeline<HttpResponseMessage> GetResiliencePipeline(DownstreamR
return ResiliencePipeline<HttpResponseMessage>.Empty; // shortcut -> No QoS
}

if (!options.IsValid()) throw new ArgumentException("QoS options are invalid.");
if (!options.IsValid())
{
throw new ArgumentException("QoS options are invalid.");
}

return _registry.GetOrAddPipeline<HttpResponseMessage>(
key: new OcelotResiliencePipelineKey(GetRouteName(route)),
Expand Down
10 changes: 3 additions & 7 deletions src/Ocelot/Configuration/QoSOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public QoSOptions(
double failureRatio,
int samplingDuration,
int timeoutValue,
string key)
string key)
{
DurationOfBreak = durationOfBreak;
ExceptionsAllowedBeforeBreaking = exceptionsAllowedBeforeBreaking;
Expand Down Expand Up @@ -100,12 +100,8 @@ public QoSOptions(

public string Key { get; }

/// <summary>
/// Value for TimeoutStrategy in milliseconds.
/// </summary>
/// <value>
/// An <see cref="int"/> value (milliseconds).
/// </value>
/// <summary>Value for TimeoutStrategy in milliseconds.</summary>
/// <value>An <see cref="int"/> value (milliseconds).</value>
public int TimeoutValue { get; }

public bool UseQos => ExceptionsAllowedBeforeBreaking >= 2 || TimeoutValue > 0;
Expand Down

0 comments on commit 3199588

Please sign in to comment.