aboutsummaryrefslogtreecommitdiff
path: root/src/ProtocolBuffers/IMessage.cs
diff options
context:
space:
mode:
authorJon Skeet <skeet@pobox.com>2009-02-24 16:50:56 +0000
committerJon Skeet <skeet@pobox.com>2009-02-24 16:50:56 +0000
commite81a9d7c87380028b72cd77d48e767705ee224b5 (patch)
treea4e0c00735509e67a8188dfc6934f418a49b3abf /src/ProtocolBuffers/IMessage.cs
parent25a28580a6f307cb8eb040367f5671e678e9896b (diff)
downloadprotobuf-e81a9d7c87380028b72cd77d48e767705ee224b5.tar.gz
protobuf-e81a9d7c87380028b72cd77d48e767705ee224b5.tar.bz2
protobuf-e81a9d7c87380028b72cd77d48e767705ee224b5.zip
Added ToBuilder and WeakToBuilder
Diffstat (limited to 'src/ProtocolBuffers/IMessage.cs')
-rw-r--r--src/ProtocolBuffers/IMessage.cs15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/ProtocolBuffers/IMessage.cs b/src/ProtocolBuffers/IMessage.cs
index a29313fb..e87bb52c 100644
--- a/src/ProtocolBuffers/IMessage.cs
+++ b/src/ProtocolBuffers/IMessage.cs
@@ -168,11 +168,18 @@ namespace Google.ProtocolBuffers {
/// <summary>
/// Creates a builder for the type, but in a weakly typed manner. This
- /// is typically implemented by strongly typed builders by just returning
+ /// is typically implemented by strongly typed messages by just returning
/// the result of CreateBuilderForType.
/// </summary>
IBuilder WeakCreateBuilderForType();
+ /// <summary>
+ /// Creates a builder with the same contents as this message. This
+ /// is typically implemented by strongly typed messages by just returning
+ /// the result of ToBuilder.
+ /// </summary>
+ IBuilder WeakToBuilder();
+
IMessage WeakDefaultInstanceForType { get; }
}
@@ -198,6 +205,12 @@ namespace Google.ProtocolBuffers {
/// Constructs a new builder for a message of the same type as this message.
/// </summary>
TBuilder CreateBuilderForType();
+ /// <summary>
+ /// Creates a builder with the same contents as this current instance.
+ /// This is typically implemented by strongly typed messages by just
+ /// returning the result of ToBuilder().
+ /// </summary>
+ TBuilder ToBuilder();
#endregion
}
}