From 0bbb323107a098e56895a1da0275f032c5b1f56b Mon Sep 17 00:00:00 2001 From: viklele Date: Thu, 26 Jun 2014 15:54:41 +0530 Subject: [PATCH] Update DeltaPatcher.cs --- Source/DeltaPatcher.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/DeltaPatcher.cs b/Source/DeltaPatcher.cs index ab393a0..69ebfec 100644 --- a/Source/DeltaPatcher.cs +++ b/Source/DeltaPatcher.cs @@ -20,6 +20,8 @@ public class DeltaPatcher : DynamicObject /// public DeltaPatcher() { + // cache patchable properties for later use, we don't have to + // look for them in every instance of T if (m_patchableProperties == null) { m_patchableProperties = new Dictionary(); @@ -30,7 +32,7 @@ public DeltaPatcher() { if (prop.CanWrite) { - // create dynamic properties of Delta + // Skip not patchable properties var attr = prop.GetCustomAttribute(typeof(NotPatchableAttribute)); if (attr == null) {