Skip to content

Commit 8238ed9

Browse files
committed
Fix unnecessary reflection access for collection typed property.
From simple missing not operator, simple get accessor invocation was replaced with reflection. It hurts performance. This fix just add not operator.
1 parent 1224e7f commit 8238ed9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/MsgPack/Serialization/AbstractSerializers/SerializerBuilder`3.CommonConstructs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ private TConstruct EmitSetMemberValueStatement( TContext context, TConstruct ins
431431
return this.EmitSetProprety( context, instance, asProperty, value, false );
432432
}
433433

434-
getCollection = this.EmitGetProperty( context, instance, asProperty, asProperty.GetIsPublic() );
434+
getCollection = this.EmitGetProperty( context, instance, asProperty, !asProperty.GetIsPublic() );
435435
traits = asProperty.PropertyType.GetCollectionTraits();
436436
}
437437

0 commit comments

Comments
 (0)