Thank you for your reply.

'RuntimeTypeModel.Default
        .Add(type(Customer), false)
            .Add(1, "Id")
            .Add(3, "Name");'
Is it the script in the .proto file?

What I want to do is just use the configuration to instead of the 
Attribute, because I want to use the binary serializer in the third party's 
class.
So I think the configuration can inject the class. Am I right?
Anyway, i will try first and will contact you for help if necessary. Thanks 
for your help again.


在 2013年6月1日星期六UTC+8上午3时42分38秒,Marc Gravell写道:
>
> This is a protobuf-net specific question. The answer to that depends on 
> what you want to do. And I should stress that using attribute decoration is 
> a lot simpler (and is what you get if you start from .proto). But basically:
>
>     RuntimeTypeModel.Default
>         .Add(type(Customer), false)
>             .Add(1, "Id")
>             .Add(3, "Name");
>
> Etc - assuming that members Id and Name are defined. But there are lots 
> more options - for using specific formats, surrogates, factories, 
> callbacks, etc. So again - what do you want to do?
> On 31 May 2013 18:16, "凌翔" <[email protected] <javascript:>> wrote:
>
>> Please give me an example, thank you! 
>>
>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/protobuf?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to