internal NDAttachedPropertyKey(OnChanging <TKey, TType, TValue> changedMethod, TValue defaultValue, NDPropertySettings settigns) : base(defaultValue, settigns) { this.changedMethod = changedMethod; }
internal NDReadOnlyPropertyKey(TValue defaultValue, NDPropertySettings settigns) { Settigns = settigns; DefaultValue = defaultValue; }
internal NDBasePropertyKey(TValue defaultValue, NDPropertySettings settigns) : base(defaultValue, settigns) { ReadOnlyProperty = new NDReadOnlyPropertyKey <TKey, TType, TValue>(defaultValue, settigns); }
/// <summary> /// Registers a Property on the specific class /// </summary> /// <typeparam name="TValue">The type of the Property</typeparam> /// <typeparam name="TType">The Type of the Object that defines the Property</typeparam> /// <param name="changingMethod">The Method that will be called if the property will be set.</param> /// <param name="defaultValue">The default Value that the Proeprty will have if no value is set.</param> /// <param name="nullTreatment">Defines how to handle Null values.</param> /// <param name="settigns">Additional Settings.</param> /// <returns>The Property key</returns> public static NDPropertyKey <TKey, TType, TValue> Register <TType, TValue>(Func <TType, OnChanging <TKey, TValue> > changingMethod, TValue defaultValue, NDPropertySettings settigns, Action <TType> notifyPropertyChanged = null) where TType : class { var p = new NDPropertyKey <TKey, TType, TValue>(changingMethod, defaultValue, settigns, notifyPropertyChanged); if (p.Inherited) { if (!inheritedPropertys.ContainsKey(typeof(TType))) { inheritedPropertys.Add(typeof(TType), new List <IInternalNDProperty <TKey> >()); } inheritedPropertys[typeof(TType)].Add(p); } if (settigns.HasFlag(NDPropertySettings.ParentReference)) { AddParentHandler(p); } return(p); }
internal NDPropertyKey(Func <TType, OnChanging <TKey, TValue> > changedMethod, TValue defaultValue, NDPropertySettings settigns, Action <TType> notifyPropertyChanged) : base(defaultValue, settigns) { this.changedMethod = changedMethod; this.notifyPropertyChanged = notifyPropertyChanged; }