Skip to content

Commit

Permalink
Remove ICollectionTypeFactory
Browse files Browse the repository at this point in the history
This used to be a D.I. resolved service in pre-release versions of EF Core. The CollectionTypeFactory is now directly instantiated, so removing this interface.

Issue #6616
  • Loading branch information
ajcvickers committed Oct 3, 2016
1 parent 9cc618f commit a346680
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ public static IServiceCollection AddEntityFramework(
.AddSingleton<IDbSetInitializer, DbSetInitializer>()
.AddSingleton<IDbSetSource, DbSetSource>()
.AddSingleton<IEntityFinderSource, EntityFinderSource>()
.AddSingleton<ICollectionTypeFactory, CollectionTypeFactory>()
.AddSingleton<IEntityMaterializerSource, EntityMaterializerSource>()
.AddSingleton<ICoreConventionSetBuilder, CoreConventionSetBuilder>()
.AddSingleton<IModelCustomizer, ModelCustomizer>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.Reflection;
using JetBrains.Annotations;
using Microsoft.EntityFrameworkCore.ChangeTracking;

namespace Microsoft.EntityFrameworkCore.Metadata.Internal
Expand All @@ -13,13 +14,13 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Internal
/// This API supports the Entity Framework Core infrastructure and is not intended to be used
/// directly from your code. This API may change or be removed in future releases.
/// </summary>
public class CollectionTypeFactory : ICollectionTypeFactory
public class CollectionTypeFactory
{
/// <summary>
/// This API supports the Entity Framework Core infrastructure and is not intended to be used
/// directly from your code. This API may change or be removed in future releases.
/// </summary>
public virtual Type TryFindTypeToInstantiate(Type entityType, Type collectionType)
public virtual Type TryFindTypeToInstantiate([NotNull] Type entityType, [NotNull] Type collectionType)
{
// Code taken from EF6. The rules are:
// If the collection is defined as a concrete type with a public parameterless constructor, then create an instance of that type
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@
<Compile Include="Metadata\Internal\IClrCollectionAccessor.cs" />
<Compile Include="Metadata\Internal\IClrPropertyGetter.cs" />
<Compile Include="Metadata\Internal\IClrPropertySetter.cs" />
<Compile Include="Metadata\Internal\ICollectionTypeFactory.cs" />
<Compile Include="Metadata\Internal\IEntityMaterializer.cs" />
<Compile Include="Metadata\Internal\IEntityMaterializerSource.cs" />
<Compile Include="Metadata\Internal\Index.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public virtual void Services_wire_up_correctly()
VerifySingleton<IDbSetFinder>();
VerifySingleton<IDbSetInitializer>();
VerifySingleton<IDbSetSource>();
VerifySingleton<ICollectionTypeFactory>();
VerifySingleton<IEntityMaterializerSource>();
VerifySingleton<ILoggerFactory>();
VerifySingleton<ICoreConventionSetBuilder>();
Expand Down

0 comments on commit a346680

Please sign in to comment.