16 references to Any
Microsoft.CodeAnalysis.CodeStyle (16)
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (3)
172
!symbol.GetAttributes().
Any
(
182
return symbol.GetAttributes().
Any
(static (x, dataMemberAttribute) => SymbolEqualityComparer.Default.Equals(x.AttributeClass, dataMemberAttribute), dataMemberAttribute)
183
&& symbol.ContainingType.GetAttributes().
Any
(static (x, dataContractAttribute) => SymbolEqualityComparer.Default.Equals(x.AttributeClass, dataContractAttribute), dataContractAttribute);
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (2)
241
if (method.GetAttributes().
Any
(static (a, self) => a.AttributeClass is { } attributeClass && self._attributeSetForMethodsToIgnore.Contains(attributeClass), this))
274
containingType.AllInterfaces.
Any
((@interface, marshaler) => @interface.Equals(marshaler), _iCustomMarshaler))
src\Analyzers\Core\Analyzers\SimplifyLinqExpression\AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
160
=> linqMethods.
Any
(static (m, invocation) => m.Equals(invocation.TargetMethod.ReducedFrom ?? invocation.TargetMethod.OriginalDefinition, SymbolEqualityComparer.Default), invocation);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (1)
234
return method.Parameters.
Any
(static (p, within) => p.Type.Equals(within, SymbolEqualityComparer.Default), within);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IParameterSymbolExtensions.cs (2)
39
if (containingType.DeclaringSyntaxReferences.
Any
(static (r, arg) => r.GetSyntax(arg.cancellationToken) == arg.constructorSyntax, (constructorSyntax, cancellationToken)))
69
return containingType.DeclaringSyntaxReferences.
Any
(static (r, arg) => r.GetSyntax(arg.cancellationToken) == arg.constructorSyntax, (constructorSyntax, cancellationToken));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.RequiresUnsafeModifierVisitor.cs (4)
93
symbol.Parameters.
Any
(static (p, self) => p.Accept(self), this);
103
return symbol.ConstraintTypes.
Any
(static (ts, self) => ts.Accept(self), this);
115
symbol.Parameters.
Any
(static (p, self) => p.Accept(self), this) ||
116
symbol.TypeParameters.
Any
(static (tp, self) => tp.Accept(self), this);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
220
return type.AllInterfaces.
Any
(static (t, originalInterfaceType) => SymbolEquivalenceComparer.Instance.Equals(t.OriginalDefinition, originalInterfaceType), originalInterfaceType);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
191
return type.AllInterfaces.
Any
(static (i, enumerableType) => i.OriginalDefinition.Equals(enumerableType), enumerableType);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\HeaderFacts\AbstractHeaderFacts.cs (1)
59
if (holes.
Any
(static (h, position) => h.Span.Contains(position) && position > h.Span.Start, position))