diff --git a/src/Umbraco.Core/Composing/ContainerExtensions.cs b/src/Umbraco.Core/Composing/ContainerExtensions.cs index 789cdf6366..047bcd2ae5 100644 --- a/src/Umbraco.Core/Composing/ContainerExtensions.cs +++ b/src/Umbraco.Core/Composing/ContainerExtensions.cs @@ -33,14 +33,6 @@ namespace Umbraco.Core.Composing public static T TryGetInstance(this IContainer container) => (T) container.TryGetInstance(typeof(T)); - /// - /// Gets registrations for a service. - /// - /// The type of the service. - /// The registrations for the service. - public static IEnumerable GetRegistered(this IContainer container) - => container.GetRegistered(typeof(TService)); - /// /// Creates an instance with arguments. /// diff --git a/src/Umbraco.Core/Composing/IContainer.cs b/src/Umbraco.Core/Composing/IContainer.cs index d068339eb1..4975f5d08d 100644 --- a/src/Umbraco.Core/Composing/IContainer.cs +++ b/src/Umbraco.Core/Composing/IContainer.cs @@ -61,13 +61,6 @@ namespace Umbraco.Core.Composing /// The type of the service. IEnumerable GetAllInstances(); - /// - /// Gets registrations for a service. - /// - /// The type of the service. - /// The registrations for the service. - IEnumerable GetRegistered(Type serviceType); - /// /// Releases an instance. /// @@ -76,7 +69,7 @@ namespace Umbraco.Core.Composing /// See https://stackoverflow.com/questions/14072208 and http://kozmic.net/2010/08/27/must-i-release-everything-when-using-windsor/, /// you only need to release instances you specifically resolved, and even then, if done right, that might never be needed. For /// instance, LightInject does not require this and does not support it - should work with scopes. - /// + /// void Release(object instance); #endregion diff --git a/src/Umbraco.Core/Composing/LightInject/LightInjectContainer.cs b/src/Umbraco.Core/Composing/LightInject/LightInjectContainer.cs index 90c2903bc7..e3b93f5aea 100644 --- a/src/Umbraco.Core/Composing/LightInject/LightInjectContainer.cs +++ b/src/Umbraco.Core/Composing/LightInject/LightInjectContainer.cs @@ -117,10 +117,6 @@ namespace Umbraco.Core.Composing.LightInject public IEnumerable GetAllInstances(Type type) => Container.GetAllInstances(type); - /// - public IEnumerable GetRegistered(Type type) - => Container.AvailableServices.Where(x => x.ServiceType == type).Select(x => new Registration(x.ServiceType, x.ServiceName)); - /// public void Release(object instance) { diff --git a/src/Umbraco.Core/Composing/Registration.cs b/src/Umbraco.Core/Composing/Registration.cs deleted file mode 100644 index a3cb62522b..0000000000 --- a/src/Umbraco.Core/Composing/Registration.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; - -namespace Umbraco.Core.Composing -{ - /// - /// Represents a service registration in the container. - /// - public class Registration - { - /// - /// Initializes a new instance of the class. - /// - /// - /// - public Registration(Type serviceType, string serviceName) - { - ServiceType = serviceType; - ServiceName = serviceName; - } - - /// - /// Gets the service type. - /// - public Type ServiceType { get; } - - /// - /// Gets the service name. - /// - public string ServiceName { get; } - } -} diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 57f7208d03..2e235dcd23 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -190,7 +190,6 @@ -