private static void SetDirect(IDynamicPropertySupport support) { lock (typeof(ConfigurationManager)) { m_Config = support; DynamicProperty.RegisterWithDynamicPropertySupport(support); m_InitializedWithDefaultConfig = false; } }
protected PropertyWrapper(string propName, V defaultValue) { m_Property = DynamicProperty.GetInstance(propName); m_DefaultValue = defaultValue; var type = GetType(); // This checks whether this constructor is called by a class that // extends the immediate sub classes (IntProperty, etc.) of PropertyWrapper. // If yes, it is very likely that OnPropertyChanged() is overriden // in the sub class and we need to register the callback. // Otherwise, we know that OnPropertyChanged() does nothing in // immediate subclasses and we can avoid registering the callback, which // has the cost of modifying the event. if (!m_SubClassesWithNoCallback.ContainsKey(type)) { PropertyChanged += (o, args) => OnPropertyChanged(); } }
public DelegateCachedValue(DynamicProperty property, Func <string, T> parseFunc) : base(property) { m_ParseFunc = parseFunc; }
public CachedValue(DynamicProperty property) { m_Property = property; Flush(); }