Skip to content

Commit

Permalink
API review changes
Browse files Browse the repository at this point in the history
* `InterceptionResolver` -> `InterceptionAggregator`
* `IConventionContext<in T>` -> `IConventionContext<in TMetadata>`
* `IDbFunctionParameter.Parent` -> `IDbFunctionParameter.Function`
* Remove `HasNullPropagation`
* `CurrentDbContext` properties -> `CurrentContext`
  • Loading branch information
ajcvickers committed Jul 21, 2019
1 parent fc97f32 commit 23d892e
Show file tree
Hide file tree
Showing 46 changed files with 247 additions and 390 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public MigrationsScaffolder([NotNull] MigrationsScaffolderDependencies dependenc
{
Check.NotNull(dependencies, nameof(dependencies));

_contextType = dependencies.CurrentDbContext.Context.GetType();
_contextType = dependencies.CurrentContext.Context.GetType();
_activeProvider = dependencies.DatabaseProvider.Name;
Dependencies = dependencies;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public sealed class MigrationsScaffolderDependencies
/// doing so can result in application failures when updating to a new Entity Framework Core release.
/// </para>
/// </summary>
/// <param name="currentDbContext"> The current DbContext. </param>
/// <param name="currentContext"> The current DbContext. </param>
/// <param name="model"> The model. </param>
/// <param name="migrationsAssembly"> The migrations assembly. </param>
/// <param name="migrationsModelDiffer"> The migrations model differ. </param>
Expand All @@ -62,7 +62,7 @@ public sealed class MigrationsScaffolderDependencies
/// <param name="migrator"> The migrator. </param>
[EntityFrameworkInternal]
public MigrationsScaffolderDependencies(
[NotNull] ICurrentDbContext currentDbContext,
[NotNull] ICurrentDbContext currentContext,
[NotNull] IModel model,
[NotNull] IMigrationsAssembly migrationsAssembly,
[NotNull] IMigrationsModelDiffer migrationsModelDiffer,
Expand All @@ -74,7 +74,7 @@ public MigrationsScaffolderDependencies(
[NotNull] ISnapshotModelProcessor snapshotModelProcessor,
[NotNull] IMigrator migrator)
{
Check.NotNull(currentDbContext, nameof(currentDbContext));
Check.NotNull(currentContext, nameof(currentContext));
Check.NotNull(model, nameof(model));
Check.NotNull(migrationsAssembly, nameof(migrationsAssembly));
Check.NotNull(migrationsModelDiffer, nameof(migrationsModelDiffer));
Expand All @@ -86,7 +86,7 @@ public MigrationsScaffolderDependencies(
Check.NotNull(snapshotModelProcessor, nameof(snapshotModelProcessor));
Check.NotNull(migrator, nameof(migrator));

CurrentDbContext = currentDbContext;
CurrentContext = currentContext;
Model = model;
MigrationsAssembly = migrationsAssembly;
MigrationsModelDiffer = migrationsModelDiffer;
Expand All @@ -102,7 +102,7 @@ public MigrationsScaffolderDependencies(
/// <summary>
/// The current DbContext.
/// </summary>
public ICurrentDbContext CurrentDbContext { get; }
public ICurrentDbContext CurrentContext { get; }

/// <summary>
/// The model.
Expand Down Expand Up @@ -157,11 +157,11 @@ public MigrationsScaffolderDependencies(
/// <summary>
/// Clones this dependency parameter object with one service replaced.
/// </summary>
/// <param name="currentDbContext"> A replacement for the current dependency of this type. </param>
/// <param name="currentContext"> A replacement for the current dependency of this type. </param>
/// <returns> A new parameter object with the given service replaced. </returns>
public MigrationsScaffolderDependencies With([NotNull] ICurrentDbContext currentDbContext)
public MigrationsScaffolderDependencies With([NotNull] ICurrentDbContext currentContext)
=> new MigrationsScaffolderDependencies(
currentDbContext,
currentContext,
Model,
MigrationsAssembly,
MigrationsModelDiffer,
Expand All @@ -180,7 +180,7 @@ public MigrationsScaffolderDependencies With([NotNull] ICurrentDbContext current
/// <returns> A new parameter object with the given service replaced. </returns>
public MigrationsScaffolderDependencies With([NotNull] IModel model)
=> new MigrationsScaffolderDependencies(
CurrentDbContext,
CurrentContext,
model,
MigrationsAssembly,
MigrationsModelDiffer,
Expand All @@ -199,7 +199,7 @@ public MigrationsScaffolderDependencies With([NotNull] IModel model)
/// <returns> A new parameter object with the given service replaced. </returns>
public MigrationsScaffolderDependencies With([NotNull] IMigrationsAssembly migrationsAssembly)
=> new MigrationsScaffolderDependencies(
CurrentDbContext,
CurrentContext,
Model,
migrationsAssembly,
MigrationsModelDiffer,
Expand All @@ -218,7 +218,7 @@ public MigrationsScaffolderDependencies With([NotNull] IMigrationsAssembly migra
/// <returns> A new parameter object with the given service replaced. </returns>
public MigrationsScaffolderDependencies With([NotNull] IMigrationsModelDiffer migrationsModelDiffer)
=> new MigrationsScaffolderDependencies(
CurrentDbContext,
CurrentContext,
Model,
MigrationsAssembly,
migrationsModelDiffer,
Expand All @@ -237,7 +237,7 @@ public MigrationsScaffolderDependencies With([NotNull] IMigrationsModelDiffer mi
/// <returns> A new parameter object with the given service replaced. </returns>
public MigrationsScaffolderDependencies With([NotNull] IMigrationsIdGenerator migrationsIdGenerator)
=> new MigrationsScaffolderDependencies(
CurrentDbContext,
CurrentContext,
Model,
MigrationsAssembly,
MigrationsModelDiffer,
Expand All @@ -256,7 +256,7 @@ public MigrationsScaffolderDependencies With([NotNull] IMigrationsIdGenerator mi
/// <returns> A new parameter object with the given service replaced. </returns>
public MigrationsScaffolderDependencies With([NotNull] IMigrationsCodeGeneratorSelector migrationsCodeGeneratorSelector)
=> new MigrationsScaffolderDependencies(
CurrentDbContext,
CurrentContext,
Model,
MigrationsAssembly,
MigrationsModelDiffer,
Expand All @@ -275,7 +275,7 @@ public MigrationsScaffolderDependencies With([NotNull] IMigrationsCodeGeneratorS
/// <returns> A new parameter object with the given service replaced. </returns>
public MigrationsScaffolderDependencies With([NotNull] IHistoryRepository historyRepository)
=> new MigrationsScaffolderDependencies(
CurrentDbContext,
CurrentContext,
Model,
MigrationsAssembly,
MigrationsModelDiffer,
Expand All @@ -294,7 +294,7 @@ public MigrationsScaffolderDependencies With([NotNull] IHistoryRepository histor
/// <returns> A new parameter object with the given service replaced. </returns>
public MigrationsScaffolderDependencies With([NotNull] IOperationReporter operationReporter)
=> new MigrationsScaffolderDependencies(
CurrentDbContext,
CurrentContext,
Model,
MigrationsAssembly,
MigrationsModelDiffer,
Expand All @@ -313,7 +313,7 @@ public MigrationsScaffolderDependencies With([NotNull] IOperationReporter operat
/// <returns> A new parameter object with the given service replaced. </returns>
public MigrationsScaffolderDependencies With([NotNull] IDatabaseProvider databaseProvider)
=> new MigrationsScaffolderDependencies(
CurrentDbContext,
CurrentContext,
Model,
MigrationsAssembly,
MigrationsModelDiffer,
Expand All @@ -332,7 +332,7 @@ public MigrationsScaffolderDependencies With([NotNull] IDatabaseProvider databas
/// <returns> A new parameter object with the given service replaced. </returns>
public MigrationsScaffolderDependencies With([NotNull] ISnapshotModelProcessor snapshotModelProcessor)
=> new MigrationsScaffolderDependencies(
CurrentDbContext,
CurrentContext,
Model,
MigrationsAssembly,
MigrationsModelDiffer,
Expand All @@ -351,7 +351,7 @@ public MigrationsScaffolderDependencies With([NotNull] ISnapshotModelProcessor s
/// <returns> A new parameter object with the given service replaced. </returns>
public MigrationsScaffolderDependencies With([NotNull] IMigrator migrator)
=> new MigrationsScaffolderDependencies(
CurrentDbContext,
CurrentContext,
Model,
MigrationsAssembly,
MigrationsModelDiffer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics.Internal
/// 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 class DbCommandInterceptorResolver : InterceptorResolver<IDbCommandInterceptor>
public class DbCommandInterceptorAggregator : InterceptorAggregator<IDbCommandInterceptor>
{
/// <summary>
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics.Internal
/// 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 class DbConnectionInterceptorResolver : InterceptorResolver<IDbConnectionInterceptor>
public class DbConnectionInterceptorAggregator : InterceptorAggregator<IDbConnectionInterceptor>
{
/// <summary>
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics.Internal
/// 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 class DbTransactionInterceptorResolver : InterceptorResolver<IDbTransactionInterceptor>
public class DbTransactionInterceptorAggregator : InterceptorAggregator<IDbTransactionInterceptor>
{
/// <summary>
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
Expand Down
Loading

0 comments on commit 23d892e

Please sign in to comment.