Added ToBuilder and WeakToBuilder
diff --git a/src/ProtocolBuffers/IMessage.cs b/src/ProtocolBuffers/IMessage.cs
index a29313f..e87bb52 100644
--- a/src/ProtocolBuffers/IMessage.cs
+++ b/src/ProtocolBuffers/IMessage.cs
@@ -168,11 +168,18 @@
/// <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 @@
/// 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
}
}