Model adapter to ObservableTreeNode
Inheritance: ITreeNode
        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;
                });
        }
Example #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;
            }
        }
Example #3
0
 private int Comparison(ITreeNode left, ITreeNode right)
 {
     return(VariableNode.Comparison((VariableNode)left, (VariableNode)right, SortDirection));
 }