diff options
author | Jisi Liu <jisi.liu@gmail.com> | 2017-07-18 15:44:24 -0700 |
---|---|---|
committer | Jisi Liu <jisi.liu@gmail.com> | 2017-07-18 15:44:24 -0700 |
commit | 86975301f1876ce1934612777b8ca6c76520f5cc (patch) | |
tree | 73f1762f99bceec586eb1d539e5622d76e53f4f8 /csharp/src/Google.Protobuf/WellKnownTypes/Any.cs | |
parent | 09354db1434859a31a3c81abebcc4018d42f2715 (diff) | |
download | protobuf-86975301f1876ce1934612777b8ca6c76520f5cc.tar.gz protobuf-86975301f1876ce1934612777b8ca6c76520f5cc.tar.bz2 protobuf-86975301f1876ce1934612777b8ca6c76520f5cc.zip |
Update csharp and php descriptor
Diffstat (limited to 'csharp/src/Google.Protobuf/WellKnownTypes/Any.cs')
-rw-r--r-- | csharp/src/Google.Protobuf/WellKnownTypes/Any.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs index b90c9a2a..5b39b809 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs @@ -73,6 +73,16 @@ namespace Google.Protobuf.WellKnownTypes { /// any.Unpack(foo) /// ... /// + /// Example 4: Pack and unpack a message in Go + /// + /// foo := &pb.Foo{...} + /// any, err := ptypes.MarshalAny(foo) + /// ... + /// foo := &pb.Foo{} + /// if err := ptypes.UnmarshalAny(any, foo); err != nil { + /// ... + /// } + /// /// The pack methods provided by protobuf library will by default use /// 'type.googleapis.com/full.type.name' as the type URL and the unpack /// methods only use the fully qualified type name after the last '/' |