protobuf-net basics

2008-12-15 Thread Meidan

Hi,

I'm trying to use protobuf-net like this:

[DataContract]
public class Foo
{
[DataMember]
public int Int { get; set; }
}

var stream = new FileStream(@d:\serialized,
FileMode.Create, FileAccess.Write, FileShare.None);
var f = new Foo() {Int = 7};
ProtoBuf.Serializer.Serialize(stream, f);
stream.Close();

But the created file is empty, what am I missing?

Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~--~~~~--~~--~--~---



Re: 2.0.3 officially released

2008-12-15 Thread Kenton Varda
Yes, thanks for reminding me.  There still isn't any documentation on this
feature, even inside Google.  :(  I will try to write it this week.
(Sorry, it all comes down to me having too much work to do...)

On Sun, Dec 14, 2008 at 4:44 PM, codeazure codeaz...@gmail.com wrote:


 The language guide in the documentation still doesn't describe Field
 Options. I can see some references to them in some of the language
 specific sections (Java, Python), but nothing telling us how to use
 this feature either in fields or enums.

 With this and other changes, it's really helpful for developers to
 have access to current and complete documentation - doesn't have to be
 a huge amount, but just something to remind us that it's there.

 Thanks,
 Jeff

 On Dec 6, 5:48 am, Kenton Varda ken...@google.com wrote:
protoc
* Enum values may now have custom options, using syntax similar to
 field
  options.

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~--~~~~--~~--~--~---