8 overrides of IsIndexer
Microsoft.CodeAnalysis.CSharp (8)
Lowering\StateMachineRewriter\SynthesizedStateMachineProperty.cs (1)
61
public override bool
IsIndexer
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertySymbol.cs (1)
117
public override bool
IsIndexer
Symbols\ErrorPropertySymbol.cs (1)
52
public override bool
IsIndexer
{ get { return _isIndexer; } }
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
651
public override bool
IsIndexer
Symbols\SignatureOnlyPropertySymbol.cs (1)
104
public override bool
IsIndexer
{ get { throw ExceptionUtilities.Unreachable(); } }
Symbols\Source\SourcePropertySymbolBase.cs (1)
599
public override bool
IsIndexer
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListProperty.cs (1)
41
public override bool
IsIndexer
=> Parameters.Length > 0;
Symbols\Wrapped\WrappedPropertySymbol.cs (1)
55
public override bool
IsIndexer
63 references to IsIndexer
Microsoft.CodeAnalysis.CSharp (21)
Binder\Binder.ValueChecks.cs (1)
4682
PropertySymbol {
IsIndexer
: true } indexer => getIndexerEscape(indexer, left, rightEscape),
Binder\Binder_Expressions.cs (4)
1513
ContainingMember() is MethodSymbol { MethodKind: MethodKind.PropertyGet or MethodKind.PropertySet, AssociatedSymbol: PropertySymbol {
IsIndexer
: false } })
9973
if (property.
IsIndexer
|| !property.IsIndexedProperty)
10150
var name = candidate.
IsIndexer
? SyntaxFacts.GetText(SyntaxKind.ThisKeyword) : candidate.Name;
10565
return new ErrorPropertySymbol(candidate.ContainingType, propertyType, candidate.Name, candidate.
IsIndexer
, candidate.IsIndexedProperty);
BoundTree\BoundExpression.cs (1)
376
if (!indexer.
IsIndexer
&& indexer.IsIndexedProperty)
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
328
else if ((object)propertyAccess != null && propertyAccess.IsIndexedProperty() && !propertyAccess.
IsIndexer
)
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.cs (2)
195
Debug.Assert(!property.
IsIndexer
);
216
Debug.Assert(indexer.
IsIndexer
|| indexer.IsIndexedProperty);
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (2)
70
Debug.Assert(node.Indexer.
IsIndexer
|| node.Indexer.IsIndexedProperty);
79
Debug.Assert(indexer.
IsIndexer
|| indexer.IsIndexedProperty);
Symbols\MemberSymbolExtensions.cs (1)
418
return symbol.Kind == SymbolKind.Property && ((PropertySymbol)symbol).
IsIndexer
;
Symbols\NamedTypeSymbol.cs (1)
321
Debug.Assert(((PropertySymbol)candidate).
IsIndexer
);
Symbols\PropertySymbol.cs (1)
360
=> !IsOverride && !IsExplicitInterfaceImplementation && (
IsIndexer
|| IsIndexedProperty || this.GetIsNewExtensionMember());
Symbols\PropertySymbolExtensions.cs (1)
66
return property.IsIndexedProperty && (!property.
IsIndexer
|| property.HasRefOrOutParameter());
Symbols\PublicModel\PropertySymbol.cs (1)
28
get { return _underlying.
IsIndexer
; }
Symbols\Source\SourceMemberContainerSymbol.cs (2)
4364
string propertyName = propertySymbol.
IsIndexer
? propertySymbol.MetadataName : propertySymbol.Name;
4657
if (!((PropertySymbol)member).
IsIndexer
)
Symbols\Symbol.cs (1)
660
if (property.
IsIndexer
|| property.MustCallMethodsDirectly)
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (1)
331
return !property.
IsIndexer
&& !property.IsOverride && property.GetMethod is not null;
Symbols\Wrapped\WrappedPropertySymbol.cs (1)
59
return _underlyingProperty.
IsIndexer
;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
CodeGen\CodeGenTupleTest.cs (2)
15835
Assert.False(m1P1.
IsIndexer
);
15865
Assert.True(m1this.
IsIndexer
);
CodeGen\IndexerTests.cs (2)
156
Assert.False(indexer.
IsIndexer
);
258
Assert.True(indexer.
IsIndexer
);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Semantics\AmbiguousOverrideTests.cs (6)
779
Assert.True(baseProperty1.
IsIndexer
);
780
Assert.True(baseProperty2.
IsIndexer
);
785
Assert.True(derivedProperty.
IsIndexer
);
853
Assert.True(baseProperty1.
IsIndexer
);
854
Assert.True(baseProperty2.
IsIndexer
);
859
Assert.True(derivedProperty.
IsIndexer
);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (32)
Symbols\AnonymousTypesSymbolTests.cs (1)
1098
Assert.False(property.
IsIndexer
);
Symbols\DefaultInterfaceImplementationTests.cs (25)
17090
Assert.Equal(p3.
IsIndexer
, p3.IsVirtual);
17092
Assert.Equal(!p3.
IsIndexer
, p3.IsStatic);
17096
Assert.Same(p3.
IsIndexer
? p3 : null, test1.FindImplementationForInterfaceMember(p3));
17097
Assert.Same(p3.
IsIndexer
? test2P3 : null, test2.FindImplementationForInterfaceMember(p3));
17099
ValidateP3Accessor(p3.GetMethod, p3.
IsIndexer
? test2P3.GetMethod : null);
17100
ValidateP3Accessor(p3.SetMethod, p3.
IsIndexer
? test2P3.SetMethod : null);
17104
Assert.Equal(p3.
IsIndexer
, accessor.IsVirtual);
17105
Assert.Equal(p3.
IsIndexer
, accessor.IsMetadataVirtual());
17107
Assert.Equal(!p3.
IsIndexer
, accessor.IsStatic);
17112
Assert.Same(p3.
IsIndexer
? accessor : null, test1.FindImplementationForInterfaceMember(accessor));
17344
Assert.Equal(p3.
IsIndexer
, p3.IsVirtual);
17346
Assert.Equal(!p3.
IsIndexer
, p3.IsStatic);
17350
Assert.Same(p3.
IsIndexer
? p3 : null, test1.FindImplementationForInterfaceMember(p3));
17351
Assert.Same(p3.
IsIndexer
? test2P3 : null, test2.FindImplementationForInterfaceMember(p3));
17353
ValidateP3Accessor(p3.GetMethod, p3.
IsIndexer
? test2P3.GetMethod : null);
17354
ValidateP3Accessor(p3.SetMethod, p3.
IsIndexer
? test2P3.SetMethod : null);
17358
Assert.Equal(p3.
IsIndexer
, accessor.IsVirtual);
17359
Assert.Equal(p3.
IsIndexer
, accessor.IsMetadataVirtual());
17361
Assert.Equal(!p3.
IsIndexer
, accessor.IsStatic);
17366
Assert.Same(p3.
IsIndexer
? accessor : null, test1.FindImplementationForInterfaceMember(accessor));
17376
Assert.Equal(!p4.
IsIndexer
, p4.IsStatic);
17381
Assert.Same(p4.
IsIndexer
? test2P4 : null, test2.FindImplementationForInterfaceMember(p4));
17383
ValidateP4Accessor(p4.GetMethod, p4.
IsIndexer
? test2P4.GetMethod : null);
17384
ValidateP4Accessor(p4.SetMethod, p4.
IsIndexer
? test2P4.SetMethod : null);
17391
Assert.Equal(!p4.
IsIndexer
, accessor.IsStatic);
Symbols\IndexerTests.cs (2)
179
Assert.True(property.
IsIndexer
);
2130
Assert.True(indexer.
IsIndexer
);
Symbols\InterfaceImplementationTests.cs (1)
1768
Assert.False(interfaceProperty.
IsIndexer
);
Symbols\Metadata\PE\LoadingIndexers.cs (3)
1036
Assert.Equal(expectIndexer, property.
IsIndexer
);
1173
Assert.True(interfaceIndexer.
IsIndexer
);
1177
Assert.False(classIndexer.
IsIndexer
);