示例#1
0
        public bool CheckStep25()
        {
            var node       = TypicalChecks.GetTreeNodeUnderCaret(DocumentManager, TextControlManager);
            var parentNode = node?.Parent?.Parent as IPropertyDeclaration;

            return(parentNode != null && parentNode.DeclaredName == "Third");
        }
示例#2
0
        public bool CheckTutorial1Step2832()
        {
            var node       = TypicalChecks.GetTreeNodeUnderCaret(DocumentManager, TextControlManager);
            var parentNode = node?.Parent as ITypeDeclaration;

            return(parentNode != null && parentNode.DeclaredName == "CenterCoordinates");
        }
示例#3
0
        public bool CheckStep17()
        {
            var node   = TypicalChecks.GetTreeNodeUnderCaret(DocumentManager, TextControlManager);
            var parent = PsiNavigationHelper.GetParentOfType <IClassBody>(node);

            return(parent != null && parent.Properties.Count == 1);
        }
示例#4
0
        public bool CheckStep16()
        {
            var node   = TypicalChecks.GetTreeNodeUnderCaret(DocumentManager, TextControlManager);
            var parent = PsiNavigationHelper.GetParentOfType <IAsExpression>(node);

            return(parent != null);
        }
示例#5
0
        public bool CheckStep21()
        {
            var node   = TypicalChecks.GetTreeNodeUnderCaret(DocumentManager, TextControlManager);
            var parent = PsiNavigationHelper.GetParentOfType <IConstructorDeclaration>(node);

            return(parent != null && parent.DeclaredName == "WrongUsage");
        }
示例#6
0
        public bool CheckTutorial1Step29()
        {
            var node       = TypicalChecks.GetTreeNodeUnderCaret(DocumentManager, TextControlManager);
            var parentNode = node?.Parent as IMultipleFieldDeclaration;
            var decl       = parentNode?.Declarators.FirstOrDefault();

            return(parentNode != null && decl?.DeclaredName == "_coordinates");
        }