//------------------------------------------------------------------------------------ /// <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)); } } }
private void addProperty(LocalProperties properties, int category_index, string category, string name, string value_type, object value, bool read_only = false) { properties.Add(String.Format("{0}.{1}", category, name), new LocalProperty(name, value_type, category_index, category, name, true, read_only, value, "") ); }