You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the attribute [MongoDiscriminated] on a generic class, the type string return by ReflectionHelper.GetTypeDiscriminator() is truncated and not valid which lead to an exception when using it in Type.GetType().
With the following code :
class Program
{
[Norm.MongoDiscriminated]
class Error<T>
{ }
static void Main(string[] args)
{
var helper = new Norm.BSON.ReflectionHelper(typeof(Error<int>));
Console.WriteLine(helper.GetTypeDiscriminator());
}
}
I get the following type :
test.norm.Program+Error`1[[System.Int32, mscorlib
When the valid type would have been :
test.norm.Program+Error`1[[System.Int32, mscorlib]], test.norm
The text was updated successfully, but these errors were encountered:
When using the attribute [MongoDiscriminated] on a generic class, the type string return by ReflectionHelper.GetTypeDiscriminator() is truncated and not valid which lead to an exception when using it in Type.GetType().
With the following code :
I get the following type :
test.norm.Program+Error`1[[System.Int32, mscorlib
When the valid type would have been :
test.norm.Program+Error`1[[System.Int32, mscorlib]], test.norm
The text was updated successfully, but these errors were encountered: