@@ -54,29 +54,29 @@ public InstanceResolver(IResolutionRoot resolutionRoot)
5454 /// <param name="type">The type of the instance.</param>
5555 /// <param name="name">The name of the binding to use. If null the name is not used.</param>
5656 /// <param name="constraint">The constraint for the bindings. If null the constraint is not used.</param>
57- /// <param name="constructorArguments ">The constructor arguments .</param>
58- /// <param name="fallback">if set to <c>true</c> the request fallsback to requesting instances without
57+ /// <param name="parameters ">The parameters that are passed to the request .</param>
58+ /// <param name="fallback">if set to <c>true</c> the request falls back to requesting instances without
5959 /// name or constraint if no one can received otherwise.</param>
6060 /// <returns>An instance of the specified type.</returns>
61- public object Get ( Type type , string name , Func < IBindingMetadata , bool > constraint , IConstructorArgument [ ] constructorArguments , bool fallback )
61+ public object Get ( Type type , string name , Func < IBindingMetadata , bool > constraint , IParameter [ ] parameters , bool fallback )
6262 {
6363 if ( fallback && constraint != null )
6464 {
65- return this . resolutionRoot . TryGet ( type , constraint , constructorArguments ) ??
66- this . Get ( type , name , null , constructorArguments , name != null ) ;
65+ return this . resolutionRoot . TryGet ( type , constraint , parameters ) ??
66+ this . Get ( type , name , null , parameters , name != null ) ;
6767 }
6868
6969 if ( fallback && name != null )
7070 {
71- return this . resolutionRoot . TryGet ( type , name , constructorArguments ) ??
72- this . Get ( type , null , null , constructorArguments , true ) ;
71+ return this . resolutionRoot . TryGet ( type , name , parameters ) ??
72+ this . Get ( type , null , null , parameters , true ) ;
7373 }
7474
7575 return constraint == null
7676 ? name == null && ! fallback
77- ? this . resolutionRoot . Get ( type , constructorArguments )
78- : this . resolutionRoot . Get ( type , name , constructorArguments )
79- : this . resolutionRoot . Get ( type , constraint , constructorArguments ) ;
77+ ? this . resolutionRoot . Get ( type , parameters )
78+ : this . resolutionRoot . Get ( type , name , parameters )
79+ : this . resolutionRoot . Get ( type , constraint , parameters ) ;
8080 }
8181
8282 /// <summary>
@@ -85,17 +85,17 @@ public object Get(Type type, string name, Func<IBindingMetadata, bool> constrain
8585 /// <param name="type">The type of the instance.</param>
8686 /// <param name="name">The name of the binding to use. If null the name is not used.</param>
8787 /// <param name="constraint">The constraint for the bindings. If null the constraint is not used.</param>
88- /// <param name="constructorArguments ">The constructor arguments .</param>
89- /// <param name="fallback">if set to <c>true</c> the request fallsback to requesting instances without
88+ /// <param name="parameters ">The parameters that are passed to the request .</param>
89+ /// <param name="fallback">if set to <c>true</c> the request falls back to requesting instances without
9090 /// name or constraint if no one can received otherwise.</param>
9191 /// <returns>An instance of the specified type.</returns>
92- public object GetAllAsList ( Type type , string name , Func < IBindingMetadata , bool > constraint , IConstructorArgument [ ] constructorArguments , bool fallback )
92+ public object GetAllAsList ( Type type , string name , Func < IBindingMetadata , bool > constraint , IParameter [ ] parameters , bool fallback )
9393 {
9494 var listType = typeof ( List < > ) . MakeGenericType ( type ) ;
9595 var list = listType . GetConstructor ( new Type [ 0 ] ) . Invoke ( new object [ 0 ] ) ;
9696 var addMethod = listType . GetMethod ( "Add" ) ;
9797
98- var values = this . GetAll ( type , name , constraint , constructorArguments , fallback ) ;
98+ var values = this . GetAll ( type , name , constraint , parameters , fallback ) ;
9999
100100 foreach ( var value in values )
101101 {
@@ -111,13 +111,13 @@ public object GetAllAsList(Type type, string name, Func<IBindingMetadata, bool>
111111 /// <param name="type">The type of the instance.</param>
112112 /// <param name="name">The name of the binding to use. If null the name is not used.</param>
113113 /// <param name="constraint">The constraint for the bindings. If null the constraint is not used.</param>
114- /// <param name="constructorArguments ">The constructor arguments .</param>
115- /// <param name="fallback">if set to <c>true</c> the request fallsback to requesting instances without
114+ /// <param name="parameters ">The parameters that are passed to the request .</param>
115+ /// <param name="fallback">if set to <c>true</c> the request falls back to requesting instances without
116116 /// name or constraint if no one can received otherwise.</param>
117117 /// <returns>An instance of the specified type.</returns>
118- public object GetAllAsArray ( Type type , string name , Func < IBindingMetadata , bool > constraint , IConstructorArgument [ ] constructorArguments , bool fallback )
118+ public object GetAllAsArray ( Type type , string name , Func < IBindingMetadata , bool > constraint , IParameter [ ] parameters , bool fallback )
119119 {
120- var list = this . GetAllAsList ( type , name , constraint , constructorArguments , fallback ) ;
120+ var list = this . GetAllAsList ( type , name , constraint , parameters , fallback ) ;
121121 return typeof ( Enumerable )
122122 . GetMethod ( "ToArray" )
123123 . MakeGenericMethod ( type )
@@ -130,29 +130,29 @@ public object GetAllAsArray(Type type, string name, Func<IBindingMetadata, bool>
130130 /// <param name="type">The type of the instance.</param>
131131 /// <param name="name">The name of the binding to use. If null the name is not used.</param>
132132 /// <param name="constraint">The constraint for the bindings. If null the constraint is not used.</param>
133- /// <param name="constructorArguments ">The constructor arguments .</param>
134- /// <param name="fallback">if set to <c>true</c> the request fallsback to requesting instances without
133+ /// <param name="parameters ">The parameters that are passed to the request .</param>
134+ /// <param name="fallback">if set to <c>true</c> the request falls back to requesting instances without
135135 /// name or constraint if no one can received otherwise.</param>
136136 /// <returns>All instances of the specified type.</returns>
137- private IEnumerable < object > GetAll ( Type type , string name , Func < IBindingMetadata , bool > constraint , IConstructorArgument [ ] constructorArguments , bool fallback )
137+ private IEnumerable < object > GetAll ( Type type , string name , Func < IBindingMetadata , bool > constraint , IParameter [ ] parameters , bool fallback )
138138 {
139139 if ( fallback && constraint != null )
140140 {
141- var result = this . resolutionRoot . GetAll ( type , constraint , constructorArguments ) ;
142- return result . Any ( ) ? result : this . GetAll ( type , name , null , constructorArguments , true ) ;
141+ var result = this . resolutionRoot . GetAll ( type , constraint , parameters ) ;
142+ return result . Any ( ) ? result : this . GetAll ( type , name , null , parameters , true ) ;
143143 }
144144
145145 if ( fallback && name != null )
146146 {
147- var result = this . resolutionRoot . GetAll ( type , name , constructorArguments ) ;
148- return result . Any ( ) ? result : this . GetAll ( type , null , null , constructorArguments , true ) ;
147+ var result = this . resolutionRoot . GetAll ( type , name , parameters ) ;
148+ return result . Any ( ) ? result : this . GetAll ( type , null , null , parameters , true ) ;
149149 }
150150
151151 return constraint == null
152152 ? name == null
153- ? this . resolutionRoot . GetAll ( type , constructorArguments )
154- : this . resolutionRoot . GetAll ( type , name , constructorArguments )
155- : this . resolutionRoot . GetAll ( type , constraint , constructorArguments ) ;
153+ ? this . resolutionRoot . GetAll ( type , parameters )
154+ : this . resolutionRoot . GetAll ( type , name , parameters )
155+ : this . resolutionRoot . GetAll ( type , constraint , parameters ) ;
156156 }
157157 }
158158}
0 commit comments