Glimpse Serialization for Session tab

17 views
Skip to first unread message

Mihaela Bobaru

unread,
Nov 11, 2015, 3:23:58 PM11/11/15
to GetGlimpse-dev
I am using Glimpse to help me view my Session objects. My objects are Linq to Sql (ORM) mapped, with DataContract attribute, and I made them Serializable, also implementing ISerializable, where in the GetDataObject implementation I use the Protobuf serializer.
In my dev env I can see in the debugger my object types pass IsSerializable, however, from what's in the Session tab in Glimpse, it seems they don't make it past the Glimpse test for serializability. The Value column displays the type name (string) for an object, and the Type column is '--' (empty). I looked into the Glimpse source code for serialization and what I see
in the Session tab would happen only if type.IsSerializable fails. Why does it fail the Glimpse test, if I see the same test pass in the debugger? Also, I don't see where in the Glimpse code the actual serialization is done. I see the column on the Session TabSection getting the value coming from Serialization.GetValueSafe() which, for a serializable type, would just return the object. So how is Glimpse serialization designed to work? I would have expected some form of Serializer.Serialize call somewhere. I also tested by putting my objects in Cache instead of Session, and in the Glimpse Cache tab this time I also don't see a value for the object (is '--' empty), since the same Serialization.GetValueSafe() is called, as I see in the source for the cache tab. But at least the type is reported correctly for the cached objects. Can someone help? Thanks.    
Reply all
Reply to author
Forward
0 new messages