115 references to Indexer
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamespaceOrTypeSymbolExtensions.cs (1)
29
: symbol.GetMembers(WellKnownMemberNames.
Indexer
).OfType<IPropertySymbol>().Where(p => p.IsIndexer);
Microsoft.CodeAnalysis.CSharp (13)
Binder\Binder_Crefs.cs (2)
197
ImmutableArray<Symbol> sortedSymbols = ComputeSortedCrefMembers(syntax, containerOpt, WellKnownMemberNames.
Indexer
, memberNameText: WellKnownMemberNames.
Indexer
, arity, syntax.Parameters != null, diagnostics);
Binder\Binder_Expressions.cs (2)
9588
this.LookupMembersWithFallback(lookupResult, expr.Type, WellKnownMemberNames.
Indexer
, arity: 0, useSiteInfo: ref useSiteInfo, options: lookupOptions);
10019
WellKnownMemberNames.
Indexer
,
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
496
return ExplicitInterfaceHelpers.GetMemberName(outerBinder, explicitInterfaceSpecifierSyntax, WellKnownMemberNames.
Indexer
);
Compilation\CSharpSemanticModel.cs (2)
4094
AppendSymbolsWithNameAndArity(symbols, WellKnownMemberNames.
Indexer
, 0, binder, type, LookupOptions.MustBeInstance);
4114
Debug.Assert(symbol.IsIndexer(), "Only indexers can have name " + WellKnownMemberNames.
Indexer
);
Compilation\SyntaxTreeSemanticModel.cs (1)
1641
return GetDeclarationName(declaration, indexerDecl.ExplicitInterfaceSpecifier, WellKnownMemberNames.
Indexer
);
Declarations\DeclarationTreeBuilder.cs (1)
1195
set.Add(WellKnownMemberNames.
Indexer
);
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
420
get { return this.IsIndexer ? WellKnownMemberNames.
Indexer
: _name; }
Symbols\NamedTypeSymbol.cs (1)
308
ImmutableArray<Symbol> candidates = GetSimpleNonTypeMembers(WellKnownMemberNames.
Indexer
);
Symbols\Source\SourcePropertySymbolBase.cs (2)
174
_name = ExplicitInterfaceHelpers.GetMemberName(WellKnownMemberNames.
Indexer
, _explicitInterfaceType, aliasQualifierOpt);
241
string interfacePropertyName = IsIndexer ? WellKnownMemberNames.
Indexer
: ((PropertyDeclarationSyntax)syntax).Identifier.ValueText;
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs (1)
128
=> type.GetMembers(WellKnownMemberNames.
Indexer
)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
SymbolKey\SymbolKeyCompilationsTests.cs (2)
547
var originalSymbols = typeSym1.GetMembers(WellKnownMemberNames.
Indexer
);
550
var newSymbols = typeSym2.GetMembers(WellKnownMemberNames.
Indexer
);
SymbolKey\SymbolKeyMetadataVsSourceTests.cs (1)
86
var member05 = (typesym.GetMembers(WellKnownMemberNames.
Indexer
).Single() as IPropertySymbol).Type;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
BreakingChanges.cs (1)
166
Assert.Equal(Microsoft.CodeAnalysis.WellKnownMemberNames.
Indexer
, indexer.Name);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (47)
Attributes\AttributeTests.cs (2)
5425
var idxsym = typesym.GetMember(WellKnownMemberNames.
Indexer
) as PropertySymbol;
8643
var indexer = compilation.GlobalNamespace.GetMember<NamedTypeSymbol>("IA").GetMember<PropertySymbol>(WellKnownMemberNames.
Indexer
);
RefStructInterfacesTests.cs (22)
402
PropertySymbol propertySymbol = m.GlobalNamespace.GetMember<PropertySymbol>("I." + WellKnownMemberNames.
Indexer
);
434
PropertySymbol propertySymbol = m.GlobalNamespace.GetMember<PropertySymbol>("I." + WellKnownMemberNames.
Indexer
);
468
PropertySymbol propertySymbol = comp.GetMember<PropertySymbol>("I." + WellKnownMemberNames.
Indexer
);
493
PropertySymbol propertySymbol = comp.GetMember<PropertySymbol>("I." + WellKnownMemberNames.
Indexer
);
520
PropertySymbol propertySymbol = m.GlobalNamespace.GetMember<PropertySymbol>("I." + WellKnownMemberNames.
Indexer
);
558
PropertySymbol propertySymbol = m.GlobalNamespace.GetMember<PropertySymbol>("I." + WellKnownMemberNames.
Indexer
);
598
PropertySymbol propertySymbol = comp.GetMember<PropertySymbol>("I." + WellKnownMemberNames.
Indexer
);
626
PropertySymbol propertySymbol = comp.GetMember<PropertySymbol>("I." + WellKnownMemberNames.
Indexer
);
1635
var p = comp1.GetMember<PropertySymbol>("I." + WellKnownMemberNames.
Indexer
);
1695
PropertySymbol propertySymbol = comp2.GetMember<PropertySymbol>("C." + WellKnownMemberNames.
Indexer
);
1751
PropertySymbol propertySymbol = comp3.GetMember<PropertySymbol>("C.I." + WellKnownMemberNames.
Indexer
);
1797
PropertySymbol c1P = m.GlobalNamespace.GetMember<PropertySymbol>("C1." + WellKnownMemberNames.
Indexer
);
1800
PropertySymbol c2P = m.GlobalNamespace.GetMember<PropertySymbol>("C2.I." + (m is PEModuleSymbol ? "Item" : WellKnownMemberNames.
Indexer
));
1803
PropertySymbol c3P = m.GlobalNamespace.GetMember<PropertySymbol>("C3." + WellKnownMemberNames.
Indexer
);
1863
PropertySymbol propertySymbol = comp5.GetMember<PropertySymbol>("C.I." + WellKnownMemberNames.
Indexer
);
1885
PropertySymbol propertySymbol = m.GlobalNamespace.GetMember<PropertySymbol>("C.I." + (m is PEModuleSymbol ? "Item" : WellKnownMemberNames.
Indexer
));
1922
PropertySymbol propertySymbol = m.GlobalNamespace.GetMember<PropertySymbol>("C." + WellKnownMemberNames.
Indexer
);
1975
PropertySymbol propertySymbol = m.GlobalNamespace.GetMember<PropertySymbol>("C.I." + (m is PEModuleSymbol ? "Item" : WellKnownMemberNames.
Indexer
));
2032
PropertySymbol propertySymbol = m.GlobalNamespace.GetMember<PropertySymbol>("C." + WellKnownMemberNames.
Indexer
);
2052
PropertySymbol propertySymbol = m.GlobalNamespace.GetMember<PropertySymbol>("C.I." + (m is PEModuleSymbol ? "Item" : WellKnownMemberNames.
Indexer
));
2151
PropertySymbol propertySymbol = comp7.GetMember<PropertySymbol>("C." + WellKnownMemberNames.
Indexer
);
2185
PropertySymbol propertySymbol = comp8.GetMember<PropertySymbol>("C.I." + WellKnownMemberNames.
Indexer
);
Semantics\ParamsCollectionTests.cs (23)
9129
VerifyParameterRefSafetyScope(template, memberName: "Test." + WellKnownMemberNames.
Indexer
);
9152
VerifyParameterRefSafetyScope(template, memberName: "Test." + WellKnownMemberNames.
Indexer
);
9177
VerifyParameterRefSafetyScope(template, memberName: "Test." + WellKnownMemberNames.
Indexer
);
10929
var test1 = comp.GetMember<PropertySymbol>("Params1." + WellKnownMemberNames.
Indexer
).Parameters.Last();
10930
var test2 = comp.GetMember<PropertySymbol>("Params2." + WellKnownMemberNames.
Indexer
).Parameters.Last();
11077
var test1 = comp.GetMember<PropertySymbol>("Params1." + WellKnownMemberNames.
Indexer
).Parameters.Last();
11078
var test2 = comp.GetMember<PropertySymbol>("Params2." + WellKnownMemberNames.
Indexer
).Parameters.Last();
11225
var test1 = comp.GetMember<PropertySymbol>("Params1." + WellKnownMemberNames.
Indexer
).Parameters.Last();
11226
var test2 = comp.GetMember<PropertySymbol>("Params2." + WellKnownMemberNames.
Indexer
).Parameters.Last();
11367
var test1 = comp.GetMember<PropertySymbol>("Params1." + WellKnownMemberNames.
Indexer
).Parameters.Last();
11368
var test2 = comp.GetMember<PropertySymbol>("Params2." + WellKnownMemberNames.
Indexer
).Parameters.Last();
11515
var test1 = comp.GetMember<PropertySymbol>("Params1." + WellKnownMemberNames.
Indexer
).Parameters.Last();
11516
var test2 = comp.GetMember<PropertySymbol>("Params2." + WellKnownMemberNames.
Indexer
).Parameters.Last();
11662
var test1 = comp.GetMember<PropertySymbol>("Params1." + WellKnownMemberNames.
Indexer
).Parameters.Last();
11663
var test2 = comp.GetMember<PropertySymbol>("Params2." + WellKnownMemberNames.
Indexer
).Parameters.Last();
11809
var test1 = comp.GetMember<PropertySymbol>("Params1." + WellKnownMemberNames.
Indexer
).Parameters.Last();
11810
var test2 = comp.GetMember<PropertySymbol>("Params2." + WellKnownMemberNames.
Indexer
).Parameters.Last();
11950
var test1 = comp.GetMember<PropertySymbol>("Params1." + WellKnownMemberNames.
Indexer
).Parameters.Last();
11951
var test2 = comp.GetMember<PropertySymbol>("Params2." + WellKnownMemberNames.
Indexer
).Parameters.Last();
12189
var test1 = comp.GetMember<PropertySymbol>("Params1." + WellKnownMemberNames.
Indexer
).Parameters.Last();
12190
var test2 = comp.GetMember<PropertySymbol>("Params2." + WellKnownMemberNames.
Indexer
).Parameters.Last();
12322
var test1 = comp.GetMember<PropertySymbol>("Params1." + WellKnownMemberNames.
Indexer
).Parameters.Last();
12439
var test1 = comp.GetMember<PropertySymbol>("Params1." + WellKnownMemberNames.
Indexer
).Parameters.Last();
Microsoft.CodeAnalysis.CSharp.Features (4)
Completion\CompletionProviders\NamedParameterCompletionProvider.cs (1)
194
var indexers = semanticModel.LookupSymbols(position, expressionType, WellKnownMemberNames.
Indexer
).OfType<IPropertySymbol>();
SignatureHelp\ElementAccessExpressionSignatureHelpProvider.cs (2)
219
indexers = semanticModel.LookupSymbols(position, expressionType, WellKnownMemberNames.
Indexer
)
268
if (indexer.Name != WellKnownMemberNames.
Indexer
)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs (1)
128
=> type.GetMembers(WellKnownMemberNames.
Indexer
)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
Semantics\ArglistTests.cs (4)
1254
var indexer = comp.GlobalNamespace.GetMember<NamedTypeSymbol>("A").GetMember<PropertySymbol>(WellKnownMemberNames.
Indexer
);
1280
var indexer = comp.GlobalNamespace.GetMember<NamedTypeSymbol>("A").GetMember<PropertySymbol>(WellKnownMemberNames.
Indexer
);
1306
var indexer = comp.GlobalNamespace.GetMember<NamedTypeSymbol>("A").GetMember<PropertySymbol>(WellKnownMemberNames.
Indexer
);
1332
var indexer = comp.GlobalNamespace.GetMember<NamedTypeSymbol>("A").GetMember<PropertySymbol>(WellKnownMemberNames.
Indexer
);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (39)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (3)
341
Assert.Equal(WellKnownMemberNames.
Indexer
, propertySymbol.Name);
479
Assert.Equal(WellKnownMemberNames.
Indexer
, symbol.Name);
548
Assert.Equal(WellKnownMemberNames.
Indexer
, symbol.Name);
Symbols\IndexerTests.cs (24)
326
Assert.Equal(WellKnownMemberNames.
Indexer
, classIndexer.Name);
327
Assert.Equal(WellKnownMemberNames.
Indexer
, interface1Indexer.Name);
328
Assert.Equal(WellKnownMemberNames.
Indexer
, interface2Indexer.Name);
408
Assert.Equal(WellKnownMemberNames.
Indexer
, classIndexer.Name);
409
Assert.Equal(WellKnownMemberNames.
Indexer
, interface1Indexer.Name);
410
Assert.Equal(WellKnownMemberNames.
Indexer
, interface2Indexer.Name);
618
Assert.Equal(WellKnownMemberNames.
Indexer
, derivedIndexer.Name);
619
Assert.Equal(WellKnownMemberNames.
Indexer
, baseIndexer.Name);
675
Assert.Equal(WellKnownMemberNames.
Indexer
, derivedIndexer.Name);
676
Assert.Equal(WellKnownMemberNames.
Indexer
, baseIndexer.Name);
743
Assert.Equal(WellKnownMemberNames.
Indexer
, derivedIndexer.Name);
744
Assert.Equal(WellKnownMemberNames.
Indexer
, baseIndexers[0].Name);
745
Assert.Equal(WellKnownMemberNames.
Indexer
, baseIndexers[1].Name);
814
Assert.Equal(WellKnownMemberNames.
Indexer
, derivedIndexer.Name);
815
Assert.Equal(WellKnownMemberNames.
Indexer
, baseIndexers[0].Name);
816
Assert.Equal(WellKnownMemberNames.
Indexer
, baseIndexers[1].Name);
1436
Assert.Equal(WellKnownMemberNames.
Indexer
, indexer.Name);
2404
var indexer = type01.GetMembers(WellKnownMemberNames.
Indexer
).Single() as PropertySymbol;
2837
var idxSymbol = typeSymbol.GetMember<PropertySymbol>(WellKnownMemberNames.
Indexer
);
2847
Assert.Equal(WellKnownMemberNames.
Indexer
, idxSymbol2.Symbol.Name);
2864
var unsubstitutedIndexer = unsubstitutedType.GetMember<SourcePropertySymbol>(WellKnownMemberNames.
Indexer
);
2866
Assert.Equal(WellKnownMemberNames.
Indexer
, unsubstitutedIndexer.Name);
2870
var substitutedIndexer = substitutedType.GetMember<SubstitutedPropertySymbol>(WellKnownMemberNames.
Indexer
);
2872
Assert.Equal(WellKnownMemberNames.
Indexer
, substitutedIndexer.Name);
Symbols\OverriddenOrHiddenMembersTests.cs (4)
2618
var indexerA = global.GetMember<NamedTypeSymbol>("A").GetMember<PropertySymbol>(WellKnownMemberNames.
Indexer
);
2619
var indexerB = global.GetMember<NamedTypeSymbol>("B").GetMember<PropertySymbol>(WellKnownMemberNames.
Indexer
);
2620
var indexerC = global.GetMember<NamedTypeSymbol>("C").GetMember<PropertySymbol>(WellKnownMemberNames.
Indexer
);
2621
var indexerD = global.GetMember<NamedTypeSymbol>("D").GetMember<PropertySymbol>(WellKnownMemberNames.
Indexer
);
Symbols\Source\CustomModifierCopyTests.cs (6)
1775
var baseIndexer = baseType.GetMember<PropertySymbol>(WellKnownMemberNames.
Indexer
);
1779
var derivedIndexer = derivedType.GetMember<PropertySymbol>(WellKnownMemberNames.
Indexer
);
1892
var baseIndexer = baseType.GetMember<PropertySymbol>(WellKnownMemberNames.
Indexer
);
1896
var derivedIndexer = derivedType.GetMember<PropertySymbol>(WellKnownMemberNames.
Indexer
);
1989
var interfaceIndexer = interfaceType.GetMember<PropertySymbol>(WellKnownMemberNames.
Indexer
);
2091
var interfaceIndexer = interfaceType.GetMember<PropertySymbol>(WellKnownMemberNames.
Indexer
);
Symbols\SymbolErrorTests.cs (1)
4925
var indexer = compilation.GlobalNamespace.GetMember<NamedTypeSymbol>("A").GetProperty("IA." + WellKnownMemberNames.
Indexer
);
Symbols\TypeTests.cs (1)
1533
mem = topType.GetMembers(WellKnownMemberNames.
Indexer
).Single();
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
SymbolUtilities.cs (1)
63
T member = type.GetMembers(WellKnownMemberNames.
Indexer
).Where(i => i.MetadataName == name).Single() as T;
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamespaceOrTypeSymbolExtensions.cs (1)
29
: symbol.GetMembers(WellKnownMemberNames.
Indexer
).OfType<IPropertySymbol>().Where(p => p.IsIndexer);