Ejemplo n.º 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;
 }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 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;
 }