public void TestIsInstance()
        {
            Assert.False(TupleElementSyntaxWrapper.IsInstance(null));
            Assert.False(TupleElementSyntaxWrapper.IsInstance(SyntaxFactory.LiteralExpression(SyntaxKind.NullLiteralExpression)));

            var syntaxNode = this.CreateTupleElement();
            Assert.True(TupleElementSyntaxWrapper.IsInstance(syntaxNode));
        }
        private static void CheckTupleElement(SyntaxNodeAnalysisContext context, StyleCopSettings settings, TupleElementSyntaxWrapper tupleElement)
        {
            if (tupleElement.Identifier == default)
            {
                return;
            }

            CheckName(context, settings, tupleElement.Identifier.ValueText, tupleElement.Identifier.GetLocation(), true);
        }
Exemplo n.º 3
0
 public void TestIsInstance()
 {
     Assert.False(TupleElementSyntaxWrapper.IsInstance(null));
     Assert.False(TupleElementSyntaxWrapper.IsInstance(SyntaxFactory.LiteralExpression(SyntaxKind.NullLiteralExpression)));
 }