RaiseErrorsChanged() protected method

Raises the errors changed.
protected RaiseErrorsChanged ( string propertName ) : void
propertName string Name of the propert.
return void
Exemplo n.º 1
0
 /// <summary>
 /// <para>Create a new Value Container</para>
 /// <para>创建属性值容器</para>
 /// </summary>
 /// <param name="info">Property name/属性名</param>
 /// <param name="model"><para>The model that Value Container will be held with.</para>
 /// <para>所属的model实例</para></param>
 /// <param name="equalityComparer"><para>Comparer of new/old value, for notifition.</para>
 /// <para>判断两个值是否相等的比较器,用于判断是否通知变更</para></param>
 /// <param name="initValue">The first value of this container/初始值</param>
 public ValueContainer(string info, BindableBase model, Func <TProperty, TProperty, bool> equalityComparer, TProperty initValue = default(TProperty))
 {
     EqualityComparer = equalityComparer;
     PropertyName     = info;
     PropertyType     = typeof(TProperty);
     Model            = model;
     Value            = initValue;
     _Errors          = new ObservableCollection <ErrorEntity>();
     _Errors.GetEventObservable(model)
     .Subscribe
     (
         e =>
     {
         model.RaiseErrorsChanged(PropertyName);
     }
     )
     .DisposeWith(model);
 }