aboutsummaryrefslogtreecommitdiff
path: root/csharp/ProtocolBuffers/GeneratedBuilder.cs
diff options
context:
space:
mode:
authorJon Skeet <skeet@pobox.com>2008-08-14 20:38:07 +0100
committerJon Skeet <skeet@pobox.com>2008-08-14 20:38:07 +0100
commit0980982095e5fc99a20b627c188d52a8b63248c7 (patch)
tree1952fd5258f2e548211e6bfb826c2579727bf509 /csharp/ProtocolBuffers/GeneratedBuilder.cs
parent38da52d3490a329be0407438eeddff6da65e5085 (diff)
downloadprotobuf-0980982095e5fc99a20b627c188d52a8b63248c7.tar.gz
protobuf-0980982095e5fc99a20b627c188d52a8b63248c7.tar.bz2
protobuf-0980982095e5fc99a20b627c188d52a8b63248c7.zip
Evil reflection optimisation.
Diffstat (limited to 'csharp/ProtocolBuffers/GeneratedBuilder.cs')
-rw-r--r--csharp/ProtocolBuffers/GeneratedBuilder.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/csharp/ProtocolBuffers/GeneratedBuilder.cs b/csharp/ProtocolBuffers/GeneratedBuilder.cs
index 54d37392..a1c59e89 100644
--- a/csharp/ProtocolBuffers/GeneratedBuilder.cs
+++ b/csharp/ProtocolBuffers/GeneratedBuilder.cs
@@ -51,7 +51,7 @@ namespace Google.ProtocolBuffers {
// For repeated fields, the underlying list object is still modifiable at this point.
// Make sure not to expose the modifiable list to the caller.
return field.IsRepeated
- ? InternalFieldAccessors[field].GetRepeatedWrapper(this)
+ ? InternalFieldAccessors[field].GetRepeatedWrapper(ThisBuilder)
: MessageBeingBuilt[field];
}
set {
@@ -92,7 +92,7 @@ namespace Google.ProtocolBuffers {
public override object this[FieldDescriptor field, int index] {
get { return MessageBeingBuilt[field, index]; }
- set { InternalFieldAccessors[field].SetRepeated(this, index, value); }
+ set { InternalFieldAccessors[field].SetRepeated(ThisBuilder, index, value); }
}
public override bool HasField(FieldDescriptor field) {
@@ -144,7 +144,7 @@ namespace Google.ProtocolBuffers {
}
public override TBuilder AddRepeatedField(FieldDescriptor field, object value) {
- InternalFieldAccessors[field].AddRepeated(this, value);
+ InternalFieldAccessors[field].AddRepeated(ThisBuilder, value);
return ThisBuilder;
}