diff options
Diffstat (limited to 'csharp/src/ProtocolBuffers/IBuilder.cs')
-rw-r--r-- | csharp/src/ProtocolBuffers/IBuilder.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/csharp/src/ProtocolBuffers/IBuilder.cs b/csharp/src/ProtocolBuffers/IBuilder.cs index f9c0df61..e765464a 100644 --- a/csharp/src/ProtocolBuffers/IBuilder.cs +++ b/csharp/src/ProtocolBuffers/IBuilder.cs @@ -103,6 +103,11 @@ namespace Google.ProtocolBuffers /// </summary>
object this[FieldDescriptor field, int index] { get; set; }
+
+ bool HasOneof(OneofDescriptor oneof);
+
+ FieldDescriptor OneofFieldDescriptor(OneofDescriptor oneof);
+
/// <summary>
/// <see cref="IMessage{TMessage, TBuilder}.HasField"/>
/// </summary>
@@ -125,6 +130,7 @@ namespace Google.ProtocolBuffers IBuilder WeakAddRepeatedField(FieldDescriptor field, object value);
new IBuilder WeakClear();
IBuilder WeakClearField(FieldDescriptor field);
+ IBuilder WeakClearOneof(OneofDescriptor oneof);
IBuilder WeakMergeFrom(IMessage message);
new IBuilder WeakMergeFrom(ByteString data);
new IBuilder WeakMergeFrom(ByteString data, ExtensionRegistry registry);
@@ -228,6 +234,14 @@ namespace Google.ProtocolBuffers TBuilder ClearField(FieldDescriptor field);
/// <summary>
+ /// Clears the oneof. This is exactly equivalent to calling the generated
+ /// Clear method corresponding to the oneof.
+ /// </summary>
+ /// <param name="oneof"></param>
+ /// <returns></returns>
+ TBuilder ClearOneof(OneofDescriptor oneof);
+
+ /// <summary>
/// Appends the given value as a new element for the specified repeated field.
/// </summary>
/// <exception cref="ArgumentException">the field is not a repeated field,
|