public ReadOnlyNodeInfo(Func <T, T> getValue, string fullPath, string pathFromParent, NodeRepository nodeRepository, bool shouldTrackChanges, Action <Exception> onError, VisualisationInfo visualisationInfo) { FullPath = fullPath; currentValue = new Maybe <T>(); this.getValue = getValue; this.pathFromParent = pathFromParent; this.nodeRepository = nodeRepository; this.shouldTrackChanges = shouldTrackChanges; this.onError = onError; this.visualisationInfo = visualisationInfo; if (shouldTrackChanges) { UnderlyingValueHasBeenChanged(); } }
public ReadWriteNode(Func <T> getValue, Action <T> setValue, string fullPath, string pathFromParent, VisualisationInfo visualsationInfo, NodeRepository nodeRepository, bool shouldTrackChanges, Action <Exception> exceptionHandler) : base(_ => getValue(), fullPath, pathFromParent, nodeRepository, shouldTrackChanges, exceptionHandler, visualsationInfo) { this.setValue = setValue; }