Status: New
Owner: [email protected]
Labels: Type-Defect Priority-Medium
New issue 560 by [email protected]: generice type serialize error
http://code.google.com/p/protobuf/issues/detail?id=560
What steps will reproduce the problem?
1 I have a class with qualified
name "System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib,
Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089],[BitAuto.Reviews.Models.SerialForum,
BitAuto.Reviews.Models, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null]], mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089",when use
ProtoBuf.Caching.Enyim.NetTranscoder to serialize the
Dictionary<int,SerialForum> generice object ,the type name extract error in
the code begin line :155 like below:
string typeName = type.AssemblyQualifiedName;
int i = typeName.IndexOf(','); // first split
if (i >= 0) { i = typeName.IndexOf(',', i + 1); } // second
split
if (i >= 0) { typeName = typeName.Substring(0, i); } // extract
type/assembly only
byte[] buffer = enc.GetBytes(typeName);
var key = new ArraySegment<byte>(buffer, 0, buffer.Length);
when get the cache name from typeCache object , I didn't container the full
name ,so serialize operation failed .
What is the expected output? What do you see instead?
I think it would store the full qualified name of the object in typeCache
object.
What version of the product are you using? On what operating system?
Please provide any additional information below.
Attachments:
2013-9-23 11-00-58.png 28.4 KB
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups "Protocol
Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.