Пример #1
0
 /// <summary>
 ///     发出属性修改前事件
 /// </summary>
 /// <param name="propertyName">属性</param>
 /// <param name="oldValue">旧值</param>
 /// <param name="newValue">新值</param>
 protected void BeforePropertyChanged(string propertyName, object oldValue, object newValue)
 {
     if (IsLoadingMode)
     {
         return;
     }
     GlobalTrigger.BeforePropertyChanged(this, propertyName, oldValue, newValue);
 }
Пример #2
0
 CodeGeneratorScope()
 {
     if (WorkContext.WorkModel == WorkModel.Coder)
     {
         return;
     }
     _innerScope = WorkModelScope.CreateScope(WorkModel.Coder);
     GlobalTrigger.OnCodeGeneratorBegin();
 }
Пример #3
0
 /// <inheritdoc />
 protected override void OnDispose()
 {
     if (_innerScope == null)
     {
         return;
     }
     _innerScope.Dispose();
     GlobalTrigger.OnCodeGeneratorEnd();
 }
Пример #4
0
 CodeGeneratorScope(NotificationObject config)
 {
     _innerScope = WorkModelScope.CreateScope(WorkModel.Coder);
     if (config == null)
     {
         return;
     }
     GlobalTrigger.OnCodeGeneratorBegin(config);
 }
Пример #5
0
 /// <summary>
 ///     发出属性修改事件(不受阻止模式影响)
 /// </summary>
 /// <param name="args">属性</param>
 private void RaisePropertyChangedInner(PropertyChangedEventArgs args)
 {
     try
     {
         propertyChanged?.Invoke(this, args);
         GlobalTrigger.OnPropertyChanged(this, args.PropertyName);
     }
     catch (Exception ex)
     {
         Trace.WriteLine(ex, "NotificationObject.RaisePropertyChangedInner");
         throw;
     }
 }