private void CheckSystemSecurityEllipticCurve(ITypeSymbol containingType, SyntaxNode syntaxElement, ArgumentListSyntax argumentList, SyntaxNodeAnalysisContext c)
        {
            var firstParam = argumentList.Get(0);

            if (firstParam == null || containingType == null || !containingType.DerivesFromAny(SystemSecurityCryptographyCurveClasses))
            {
                return;
            }

            if (c.SemanticModel.GetSymbolInfo(firstParam).Symbol is { }  paramSymbol)
            {
                CheckCurveNameKeyLength(syntaxElement, paramSymbol.Name, c);
            }
        }
Ejemplo n.º 2
0
 private string GetStringValue(ArgumentListSyntax argumentList, int index) =>
 argumentList.Get(index).GetStringValue();