Model adapter to ObservableTreeNode
Inheritance: ITreeNode
Exemplo n.º 1
0
        private void OnGlobalEnvironmentEvaluation(DebugEvaluationResult result) {
            var wrapper = new EvaluationWrapper(result);

            var rootNodeModel = new VariableNode(_settings, wrapper);

            VsAppShell.Current.DispatchOnUIThread(
                () => {
                    EnvironmentName.Text = GlobalEnvironmentName;
                    _rootNode.Model = rootNodeModel;
                });
        }
Exemplo n.º 2
0
        public static int Comparison(VariableNode left, VariableNode right, ListSortDirection sortDirection) {
            int leftIndex = left._evaluation.Index;
            int rightIndex = right._evaluation.Index;

            Debug.Assert(leftIndex >= -1 && rightIndex >= -1);

            // Regardless to sortDirection, special index -1 is larger than anything. So, put at the end always
            if (leftIndex == -1 || rightIndex == -1) {
                return rightIndex - leftIndex;
            }

            if (sortDirection == ListSortDirection.Ascending) {
                return leftIndex - rightIndex;
            } else {
                return rightIndex - leftIndex;
            }
        }
Exemplo n.º 3
0
 private int Comparison(ITreeNode left, ITreeNode right)
 {
     return(VariableNode.Comparison((VariableNode)left, (VariableNode)right, SortDirection));
 }