Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable rename from #34385. #34399

Merged
merged 1 commit into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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