//------------------------------------------------------------------------------------ /// <summary> /// Sets a value that will be cached locally (not saved to the backing store). /// </summary> //------------------------------------------------------------------------------------ private void EnsureLocalValue(string publicPropName, PropType type) { lock (SyncLockLocalProperties) { if (LocalProperties == null) { LocalProperties = new System.Collections.Generic.Dictionary <string, object>(); } if (!LocalProperties.ContainsKey(publicPropName)) { LocalProperties.Add(publicPropName, ItemProperty.GetValue(null, type)); } } }
//------------------------------------------------------------------------------------ /// <summary> /// Sets a value that will be cached locally (not saved to the backing store). /// </summary> //------------------------------------------------------------------------------------ private void SetLocalValue(object value, string publicPropName, PropType type) { EnsureLocalValue(publicPropName, type); LocalProperties[publicPropName] = ItemProperty.GetValue(value, type); }