aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs
diff options
context:
space:
mode:
authorJisi Liu <liujisi@google.com>2017-07-24 14:59:27 -0700
committerGitHub <noreply@github.com>2017-07-24 14:59:27 -0700
commit72cc5a6eb3975bbe3bc8454f053835d9e46dbcb5 (patch)
treec04e02e5fe58c1db617a6b8eb0bf6e2b69f55d96 /csharp/src/Google.Protobuf/WellKnownTypes/Any.cs
parent942a29cecd36f2a4b22fdd2179635cd548e6bd27 (diff)
parentdd091aad48423f3a047977e6662f0201194b9bfc (diff)
downloadprotobuf-72cc5a6eb3975bbe3bc8454f053835d9e46dbcb5.tar.gz
protobuf-72cc5a6eb3975bbe3bc8454f053835d9e46dbcb5.tar.bz2
protobuf-72cc5a6eb3975bbe3bc8454f053835d9e46dbcb5.zip
Merge pull request #3393 from pherl/3.4.x
Create 3.4.x branch
Diffstat (limited to 'csharp/src/Google.Protobuf/WellKnownTypes/Any.cs')
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Any.cs10
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 := &amp;pb.Foo{...}
+ /// any, err := ptypes.MarshalAny(foo)
+ /// ...
+ /// foo := &amp;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 '/'