Skip to content

Commit

Permalink
Variable rename from #34385. (#34399)
Browse files Browse the repository at this point in the history
  • Loading branch information
cincuranet authored Aug 11, 2024
1 parent ab30db3 commit 4df2f55
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class SqlServerOptionsExtension : RelationalOptionsExtension, IDbContextO
private int? _sqlServerCompatibilityLevel;
private int? _azureSqlCompatibilityLevel;
private int? _azureSynapseCompatibilityLevel;
private bool _useRetryStrategyByDefault;
private bool _useRetryingStrategyByDefault;

/// <summary>
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
Expand Down Expand Up @@ -83,7 +83,7 @@ protected SqlServerOptionsExtension(SqlServerOptionsExtension copyFrom)
_sqlServerCompatibilityLevel = copyFrom._sqlServerCompatibilityLevel;
_azureSqlCompatibilityLevel = copyFrom._azureSqlCompatibilityLevel;
_azureSynapseCompatibilityLevel = copyFrom._azureSynapseCompatibilityLevel;
_useRetryStrategyByDefault = copyFrom._useRetryStrategyByDefault;
_useRetryingStrategyByDefault = copyFrom._useRetryingStrategyByDefault;
}

/// <summary>
Expand Down Expand Up @@ -146,8 +146,8 @@ public virtual int AzureSynapseCompatibilityLevel
/// any release. You should only use it directly in your code with extreme caution and knowing that
/// doing so can result in application failures when updating to a new Entity Framework Core release.
/// </summary>
public virtual bool UseRetryStrategyByDefault
=> _useRetryStrategyByDefault;
public virtual bool UseRetryingStrategyByDefault
=> _useRetryingStrategyByDefault;

/// <summary>
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
Expand Down Expand Up @@ -180,7 +180,7 @@ public virtual SqlServerOptionsExtension WithLegacyAzureSql(bool enable)
var clone = (SqlServerOptionsExtension)Clone();

clone._engineType = SqlServerEngineType.SqlServer;
clone._useRetryStrategyByDefault = enable;
clone._useRetryingStrategyByDefault = enable;

return clone;
}
Expand Down Expand Up @@ -236,11 +236,11 @@ public virtual SqlServerOptionsExtension WithAzureSynapseCompatibilityLevel(int?
/// any release. You should only use it directly in your code with extreme caution and knowing that
/// doing so can result in application failures when updating to a new Entity Framework Core release.
/// </summary>
public virtual SqlServerOptionsExtension WithUseRetryStrategyByDefault(bool enable)
public virtual SqlServerOptionsExtension WithUseRetryingStrategyByDefault(bool enable)
{
var clone = (SqlServerOptionsExtension)Clone();

clone._useRetryStrategyByDefault = enable;
clone._useRetryingStrategyByDefault = enable;

return clone;
}
Expand All @@ -251,7 +251,7 @@ public virtual IDbContextOptionsExtension ApplyDefaults(IDbContextOptions option
if (ExecutionStrategyFactory == null
&& (EngineType == SqlServerEngineType.AzureSql
|| EngineType == SqlServerEngineType.AzureSynapse
|| UseRetryStrategyByDefault))
|| UseRetryingStrategyByDefault))
{
return WithExecutionStrategyFactory(c => new SqlServerRetryingExecutionStrategy(c));
}
Expand Down Expand Up @@ -325,11 +325,11 @@ public override string LogFragment
.Append(Extension._engineType)
.Append(' ');

if (Extension._useRetryStrategyByDefault)
if (Extension._useRetryingStrategyByDefault)
{
builder
.Append("UseRetryStrategyByDefault=")
.Append(Extension._useRetryStrategyByDefault)
.Append("UseRetryingStrategyByDefault=")
.Append(Extension._useRetryingStrategyByDefault)
.Append(' ');
}

Expand Down Expand Up @@ -365,7 +365,7 @@ public override string LogFragment
public override void PopulateDebugInfo(IDictionary<string, string> debugInfo)
{
debugInfo["EngineType"] = Extension.EngineType.ToString();
debugInfo["UseRetryStrategyByDefault"] = Extension.UseRetryStrategyByDefault.ToString();
debugInfo["UseRetryingStrategyByDefault"] = Extension.UseRetryingStrategyByDefault.ToString();

if (Extension.SqlServerCompatibilityLevel is int sqlServerCompatibilityLevel)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public virtual SqlEngineDbContextOptionsBuilder EnableRetryOnFailure()
/// </para>
/// </remarks>
public virtual SqlEngineDbContextOptionsBuilder TryEnableRetryOnFailure()
=> WithOption(e => e.WithUseRetryStrategyByDefault(true));
=> WithOption(e => e.WithUseRetryingStrategyByDefault(true));

/// <summary>
/// Configures the context to use the default retrying <see cref="IExecutionStrategy" />.
Expand Down

0 comments on commit 4df2f55

Please sign in to comment.