示例#1
0
 public WriteOnlyNode(Action <T> setValue, Action <Exception> exceptionHandler, string path)
 {
     visualisationInfo     = new VisualisationInfo(NodeType.Action, false);
     this.setValue         = setValue;
     FullPath              = path;
     this.exceptionHandler = exceptionHandler;
 }
示例#2
0
        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();
            }
        }
示例#3
0
 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;
 }