[Mono-list] OnDeserialization problem
Robert Jordan
robertj at gmx.net
Fri Apr 10 05:49:25 EDT 2009
Chris Howie wrote:
> On Mon, Mar 23, 2009 at 12:35 PM, Dave Null <eric.jacoboni at gmail.com> wrote:
>> BTW... What is the preferred way to achieve this kind of stuff ?
>>
>> 1) using IDeserializationCallback interface and implementing
>> OnDeserialization() method, as i've done above
>> 2) or, simply using [OnDeserializated] attribute as in:
>
> I prefer the first method since using the attribute requires (IIRC) a
> public method, which is unsightly and can "poison" your API with
> superfluous methods.
They are not required to be public. Limiting those attributes
to public would be against the purpose of serialization
attributes.
Robert
More information about the Mono-list
mailing list