コード例 #1
0
ファイル: ReadOnlyNodeInfo.cs プロジェクト: valmac/ReactGraph
        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();
            }
        }
コード例 #2
0
ファイル: ReadWriteNode.cs プロジェクト: valmac/ReactGraph
 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;
 }