-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GetNameWithoutGenericPart Throws SubString exception #26
Comments
@frankbryce |
@scott-xu |
ok thanks |
In the function,
Here is sample code where
|
Happened to me as well. public class MyGenericType<T>
{
public MyGenericType()
{
var lambda = (T element) => T == default(T);
// This lambda will be compiled to a generic class with full name
// like "MyGenericType`1+<>c", but short name just "<>c"
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm liking the package but I ran into this issue.
On line 102 of file AbstractInterfaceBindingGenerator.cs, the string.SubString() method is called without first making sure that the IndexOf() call did not return -1. The following exception is thrown if the IndexOf() returns -1, which is not very useful when something went wrong with my Ninject bootstrapping.
"System.ArgumentOutOfRangeException: Length cannot be less than zero"
The call that I'm making which ultimately leads to this exception is the following.
kernel.Bind(x => x.FromAssembliesInPath(Directory.GetCurrentDirectory())
.SelectAllClasses().BindDefaultInterfaces());
The text was updated successfully, but these errors were encountered: