Skip to content

Commit

Permalink
Fixed issue ninject#158
Browse files Browse the repository at this point in the history
ResolutionExtensions.CanResolve returns incorrect type.
  • Loading branch information
RobV8r committed Jan 3, 2015
1 parent f2a558f commit 873ff28
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/Ninject/Syntax/ResolutionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ public static IEnumerable<object> GetAll(this IResolutionRoot root, Type service
/// <typeparam name="T">The service to resolve.</typeparam>
/// <param name="root">The resolution root.</param>
/// <param name="parameters">The parameters to pass to the request.</param>
/// <returns>An instance of the service.</returns>
/// <returns><c>True</c> if the request can be resolved; otherwise, <c>false</c>.</returns>
public static bool CanResolve<T>(this IResolutionRoot root, params IParameter[] parameters)
{
return CanResolve(root, typeof(T), null, parameters, false, true);
Expand All @@ -310,7 +310,7 @@ public static bool CanResolve<T>(this IResolutionRoot root, params IParameter[]
/// <param name="root">The resolution root.</param>
/// <param name="name">The name of the binding.</param>
/// <param name="parameters">The parameters to pass to the request.</param>
/// <returns>An instance of the service.</returns>
/// <returns><c>True</c> if the request can be resolved; otherwise, <c>false</c>.</returns>
public static bool CanResolve<T>(this IResolutionRoot root, string name, params IParameter[] parameters)
{
return CanResolve(root, typeof(T), b => b.Name == name, parameters, false, true);
Expand All @@ -323,7 +323,7 @@ public static bool CanResolve<T>(this IResolutionRoot root, string name, params
/// <param name="root">The resolution root.</param>
/// <param name="constraint">The constraint to apply to the binding.</param>
/// <param name="parameters">The parameters to pass to the request.</param>
/// <returns>An instance of the service.</returns>
/// <returns><c>True</c> if the request can be resolved; otherwise, <c>false</c>.</returns>
public static bool CanResolve<T>(this IResolutionRoot root, Func<IBindingMetadata, bool> constraint, params IParameter[] parameters)
{
return CanResolve(root, typeof(T), constraint, parameters, false, true);
Expand All @@ -335,8 +335,8 @@ public static bool CanResolve<T>(this IResolutionRoot root, Func<IBindingMetadat
/// <param name="root">The resolution root.</param>
/// <param name="service">The service to resolve.</param>
/// <param name="parameters">The parameters to pass to the request.</param>
/// <returns>An instance of the service.</returns>
public static object CanResolve(this IResolutionRoot root, Type service, params IParameter[] parameters)
/// <returns><c>True</c> if the request can be resolved; otherwise, <c>false</c>.</returns>
public static bool CanResolve(this IResolutionRoot root, Type service, params IParameter[] parameters)
{
return CanResolve(root, service, null, parameters, false, true);
}
Expand All @@ -348,8 +348,8 @@ public static object CanResolve(this IResolutionRoot root, Type service, params
/// <param name="service">The service to resolve.</param>
/// <param name="name">The name of the binding.</param>
/// <param name="parameters">The parameters to pass to the request.</param>
/// <returns>An instance of the service.</returns>
public static object CanResolve(this IResolutionRoot root, Type service, string name, params IParameter[] parameters)
/// <returns><c>True</c> if the request can be resolved; otherwise, <c>false</c>.</returns>
public static bool CanResolve(this IResolutionRoot root, Type service, string name, params IParameter[] parameters)
{
return CanResolve(root, service, b => b.Name == name, parameters, false, true);
}
Expand All @@ -361,8 +361,8 @@ public static object CanResolve(this IResolutionRoot root, Type service, string
/// <param name="service">The service to resolve.</param>
/// <param name="constraint">The constraint to apply to the binding.</param>
/// <param name="parameters">The parameters to pass to the request.</param>
/// <returns>An instance of the service.</returns>
public static object CanResolve(this IResolutionRoot root, Type service, Func<IBindingMetadata, bool> constraint, params IParameter[] parameters)
/// <returns><c>True</c> if the request can be resolved; otherwise, <c>false</c>.</returns>
public static bool CanResolve(this IResolutionRoot root, Type service, Func<IBindingMetadata, bool> constraint, params IParameter[] parameters)
{
return CanResolve(root, service, constraint, parameters, false, true);
}
Expand Down

0 comments on commit 873ff28

Please sign in to comment.