protected internal void AddEvent(CompositeEventType eventType, string path, object eventData) { CompositeRoot?.DoAddEvent(new CompositeEvent(eventType, path, eventData, CompositeRoot?.CompositeRootSession?.Token, CompositeRoot != null && CompositeRoot.CompositeRootSession != null ? CompositeRoot.CompositeRootSession.Mode : CompositeRootMode.None)); }
protected virtual void NotifyPropertyChanged(string propertyName) { var property = GetType().GetProperty(propertyName); if (property == null) { throw new ArgumentException(propertyName); } var propertyValue = property.GetValue(this); _propertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); CompositeRoot?.DoAddEvent(new CompositeEvent(CompositeEventType.Change, this.GetPropertyPath(property), propertyValue, CompositeRoot?.CompositeRootSession?.Token, CompositeRoot != null && CompositeRoot.CompositeRootSession != null ? CompositeRoot.CompositeRootSession.Mode : CompositeRootMode.None)); }