Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Can we have readonly serializers?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Justin Dearing  
View profile  
 More options Sep 23 2012, 3:45 pm
From: Justin Dearing <zippy1...@gmail.com>
Date: Sun, 23 Sep 2012 12:45:47 -0700 (PDT)
Local: Sun, Sep 23 2012 3:45 pm
Subject: Can we have readonly serializers?

First of all my motivation  is I want to be able to serialize
System.Diagnostics.EventLogEntry without having to do any magic or creating
a PODO class with all the properties.

Anyway, some classes like EventLogEntry have readonly properties, and you
want to insert these classes into the database, even if you never read data
back into the same classes. I was thinking the following:

   - Create ReadonlyPublicMemberFinderConvention that will serialize to
   readonly properties
   - Create an internal collection of readonly serializers.
   - Create a static method called  BsonSerializer.
   LookupReadonlySerializer()  that populates this collection
   - Then have the serialization calls look in this collection first (which
   will only ever be explicitly populated) then the read/write collection. The
   deserialization calls simply won't look here.

Justin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
craiggwilson  
View profile  
 More options Sep 23 2012, 4:35 pm
From: craiggwilson <craiggwil...@gmail.com>
Date: Sun, 23 Sep 2012 13:35:03 -0700 (PDT)
Local: Sun, Sep 23 2012 4:35 pm
Subject: Re: Can we have readonly serializers?

This is already possible, you just need a way to let the BsonClassMap know
about the readonly members.  Effectively, readonly members get serialized
to the database but not deserialized from the database.  


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »