@@ -45,7 +45,7 @@ private ILogger Logger
4545 public IDependencyContainer CreateChildContainer ( ) => new UnityDependencyContainer ( this ) ;
4646 public IDependencyContainer ParentContainer { get ; }
4747
48- public void RegisterSingletonType < TInterface , TClass > ( params string [ ] mappingNames ) where TClass : TInterface
48+ public void AddSingleton < TInterface , TClass > ( params string [ ] mappingNames ) where TClass : TInterface
4949 {
5050 if ( ! typeof ( ILogger ) . IsAssignableFrom ( typeof ( TInterface ) ) )
5151 Logger ? . LogTrace ( "\t \t Registering singleton: <"
@@ -66,10 +66,10 @@ public void RegisterSingletonType<TInterface, TClass>(params string[] mappingNam
6666
6767 TInterface instance = container . Resolve < TInterface > ( primaryName ) ;
6868 foreach ( string name in pendingNames )
69- RegisterInstance ( instance , name ) ;
69+ AddTransient ( instance , name ) ;
7070 }
7171
72- public void RegisterSingletonInstance < TInterface > ( TInterface value , params string [ ] mappingNames )
72+ public void AddSingleton < TInterface > ( TInterface value , params string [ ] mappingNames )
7373 {
7474 if ( ! typeof ( ILogger ) . IsAssignableFrom ( typeof ( TInterface ) ) )
7575 Logger ? . LogTrace ( "\t \t Registering singleton instance: <"
@@ -87,7 +87,7 @@ public void RegisterSingletonInstance<TInterface>(TInterface value, params strin
8787 container . RegisterInstance ( mappingName , value , new ContainerControlledLifetimeManager ( ) ) ;
8888 }
8989
90- public void RegisterType < TInterface , TClass > ( params string [ ] mappingNames ) where TClass : TInterface
90+ public void AddTransient < TInterface , TClass > ( params string [ ] mappingNames ) where TClass : TInterface
9191 {
9292 if ( ! typeof ( ILogger ) . IsAssignableFrom ( typeof ( TInterface ) ) )
9393 Logger ? . LogTrace ( "\t \t Registering type: <"
@@ -105,7 +105,7 @@ public void RegisterType<TInterface, TClass>(params string[] mappingNames) where
105105 container . RegisterType < TInterface , TClass > ( mappingName ) ;
106106 }
107107
108- public void RegisterInstance < TInterface > ( TInterface value , params string [ ] mappingNames )
108+ public void AddTransient < TInterface > ( TInterface value , params string [ ] mappingNames )
109109 {
110110 if ( ! typeof ( ILogger ) . IsAssignableFrom ( typeof ( TInterface ) ) )
111111 Logger ? . LogTrace ( "\t \t Registering type instance: <"
@@ -123,12 +123,12 @@ public void RegisterInstance<TInterface>(TInterface value, params string[] mappi
123123 container . RegisterInstance ( mappingName , value ) ;
124124 }
125125
126- public void UnregisterType < T > ( params string [ ] mappingNames )
126+ public void Remove < T > ( params string [ ] mappingNames )
127127 {
128- UnregisterType ( typeof ( T ) , mappingNames ) ;
128+ Remove ( typeof ( T ) , mappingNames ) ;
129129 }
130130
131- public void UnregisterType ( Type type , params string [ ] mappingNames )
131+ public void Remove ( Type type , params string [ ] mappingNames )
132132 {
133133 foreach ( IContainerRegistration registration in container . Registrations
134134 . Where ( p => p . RegisteredType == type
0 commit comments