2 implementations of IsIndexer
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\PropertySymbol.cs (1)
26bool IPropertySymbol.IsIndexer
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\PropertySymbol.vb (1)
103Public MustOverride ReadOnly Property IsDefault As Boolean Implements IPropertySymbol.IsIndexer
83 references to IsIndexer
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (1)
669if (member is IPropertySymbol { IsIndexer: false, IsImplicitlyDeclared: false } property && !IsUnsupportedType(property.Type))
Microsoft.AspNetCore.App.Analyzers (1)
Http\HeaderDictionaryIndexerAnalyzer.cs (1)
28if (property.IsIndexer &&
Microsoft.CodeAnalysis.CodeStyle (11)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
356if (property.IsIndexer)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (1)
414if (property.IsIndexer || property.CanBeReferencedByName)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamespaceOrTypeSymbolExtensions.cs (1)
29: symbol.GetMembers(WellKnownMemberNames.Indexer).OfType<IPropertySymbol>().Where(p => p.IsIndexer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
312=> symbol is IPropertySymbol { IsIndexer: true };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
54return !property.IsIndexer;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.PropertySymbolKey.cs (1)
19visitor.WriteBoolean(symbol.IsIndexer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SignatureComparer.cs (2)
55property1.IsIndexer != property2.IsIndexer)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (2)
599x.IsIndexer == y.IsIndexer &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
242Hash.Combine(x.IsIndexer,
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
224IsIndexer = propertySymbol.IsIndexer;
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_Property.cs (1)
53if (property is { IsIndexer: false, Parameters.Length: > 0 } &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
569isIndexer ?? property.IsIndexer,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IPropertySymbolExtensions.cs (2)
37property.IsIndexer); 67property.IsIndexer);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
202var expression = property.IsIndexer 241var expression = property.IsIndexer
Microsoft.CodeAnalysis.CSharp (1)
SymbolDisplay\SymbolDisplayVisitor.Members.cs (1)
208if (symbol.IsIndexer)
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
123if (!propertyReference.Property.IsIndexer)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs (1)
130.Where(p => p.IsIndexer &&
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\PropertyGenerator.cs (2)
27=> property.IsIndexer || property.Parameters.Length == 0; 82var declaration = property.IsIndexer
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
554.Where(p => p.IsIndexer && p.Parameters.Length > index);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\IndexAndRangeTests.cs (1)
1001Assert.True(property.IsIndexer);
Microsoft.CodeAnalysis.CSharp.Features (7)
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (1)
229else if (member is IPropertySymbol { IsStatic: true, IsIndexer: false } property)
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.CompletionSymbolDisplay.cs (1)
33if (symbol.IsIndexer)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (3)
1979=> symbol.IsIndexer ? CSharpFeaturesResources.indexer : base.GetDisplayName(symbol); 1984MethodKind.PropertyGet => symbol.AssociatedSymbol is IPropertySymbol { IsIndexer: true } ? CSharpFeaturesResources.indexer_getter : CSharpFeaturesResources.property_getter, 1985MethodKind.PropertySet => symbol.AssociatedSymbol is IPropertySymbol { IsIndexer: true } ? CSharpFeaturesResources.indexer_setter : CSharpFeaturesResources.property_setter,
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
123if (!propertyReference.Property.IsIndexer)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs (1)
130.Where(p => p.IsIndexer &&
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (7)
Compilation\SemanticModelAPITests.cs (1)
146Assert.True(propertySymbol.IsIndexer);
Compilation\SemanticModelGetSemanticInfoTests.cs (1)
4548Assert.True(symbol.ContainingSymbol.Kind == SymbolKind.Property && ((IPropertySymbol)symbol.ContainingSymbol).IsIndexer);
DocumentationComments\CrefTests.cs (1)
3254Assert.True(((IPropertySymbol)info.CandidateSymbols[0]).IsIndexer);
SymbolDisplay\SymbolDisplayTests.cs (2)
5690var indexer = type.GetMembers().Where(m => m.Kind == SymbolKind.Property && ((IPropertySymbol)m).IsIndexer).Single(); 5894var indexer = type.GetMembers().Where(m => m.Kind == SymbolKind.Property && ((IPropertySymbol)m).IsIndexer).Single();
Symbols\Source\NullablePublicAPITests.cs (2)
3272Assert.True(propertySymbol.IsIndexer); 3323Assert.True(propertySymbol.IsIndexer);
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\PropertyGenerator.cs (2)
27=> property.IsIndexer || property.Parameters.Length == 0; 82var declaration = property.IsIndexer
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
554.Where(p => p.IsIndexer && p.Parameters.Length > index);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (4)
CodeGeneration\SyntaxGeneratorTests.cs (4)
2496var property = type.GetMembers().Single(m => m is IPropertySymbol { IsIndexer: false }); 2497var indexer = type.GetMembers().Single(m => m is IPropertySymbol { IsIndexer: true }); 4279var indexer = symbolC.GetMembers().OfType<IPropertySymbol>().Single(m => m.IsIndexer); 4280var property = symbolC.GetMembers().OfType<IPropertySymbol>().Single(m => !m.IsIndexer);
Microsoft.CodeAnalysis.Features (7)
ConvertForToForEach\AbstractConvertForToForEachCodeRefactoringProvider.cs (1)
534=> property is { IsIndexer: true, Parameters: [{ Type.SpecialType: SpecialType.System_Int32 }] };
ExtractInterface\AbstractExtractInterfaceService.cs (1)
424isIndexer: property.IsIndexer));
RQName\RQNodeBuilder.cs (1)
101RQMethodPropertyOrEventName name = symbol.IsIndexer
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
356if (property.IsIndexer)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
224IsIndexer = propertySymbol.IsIndexer;
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_Property.cs (1)
53if (property is { IsIndexer: false, Parameters.Length: > 0 } &&
ValueTracking\ValueTracker.FindReferencesProgress.cs (1)
92else if (symbol is IPropertySymbol { IsIndexer: true } propertySymbol)
Microsoft.CodeAnalysis.VisualBasic (2)
SymbolDisplay\SymbolDisplayVisitor.Members.vb (1)
76If Format.MemberOptions.IncludesOption(SymbolDisplayMemberOptions.IncludeModifiers) AndAlso symbol.IsIndexer Then
Symbols\PropertySymbol.vb (1)
103Public MustOverride ReadOnly Property IsDefault As Boolean Implements IPropertySymbol.IsIndexer
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\PropertyGenerator.vb (1)
181If [property].IsIndexer Then
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
SymbolDisplay\SymbolDisplayTests.vb (1)
5359Dim indexer = type.GetMembers().Where(Function(m) m.Kind = SymbolKind.Property AndAlso DirectCast(m, IPropertySymbol).IsIndexer).Single()
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\PropertyGenerator.vb (1)
181If [property].IsIndexer Then
Microsoft.CodeAnalysis.Workspaces (19)
Editing\SyntaxGenerator.cs (1)
726return property.IsIndexer ? IndexerDeclaration(property) : PropertyDeclaration(property);
FindSymbols\FindReferences\Finders\PropertySymbolReferenceFinder.cs (3)
122if (symbol.IsIndexer) 125if (symbol.IsIndexer) 167if (symbol.IsIndexer)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (1)
414if (property.IsIndexer || property.CanBeReferencedByName)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamespaceOrTypeSymbolExtensions.cs (1)
29: symbol.GetMembers(WellKnownMemberNames.Indexer).OfType<IPropertySymbol>().Where(p => p.IsIndexer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
312=> symbol is IPropertySymbol { IsIndexer: true };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
54return !property.IsIndexer;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.PropertySymbolKey.cs (1)
19visitor.WriteBoolean(symbol.IsIndexer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SignatureComparer.cs (2)
55property1.IsIndexer != property2.IsIndexer)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (2)
599x.IsIndexer == y.IsIndexer &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
242Hash.Combine(x.IsIndexer,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
569isIndexer ?? property.IsIndexer,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IPropertySymbolExtensions.cs (2)
37property.IsIndexer); 67property.IsIndexer);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
202var expression = property.IsIndexer 241var expression = property.IsIndexer
Microsoft.Gen.Logging (1)
Parsing\Parser.LogProperties.cs (1)
125if (property.IsIndexer)
Microsoft.VisualStudio.LanguageServices (1)
Progression\GraphBuilder.cs (1)
409if (propertySymbol.IsIndexer && LanguageNames.CSharp == propertySymbol.Language)
Microsoft.VisualStudio.LanguageServices.CSharp (2)
CodeModel\CSharpCodeModelService_Prototype.cs (1)
462if (symbol.IsIndexer)
ObjectBrowser\DescriptionBuilder.cs (1)
494if (propertySymbol.IsIndexer)