136 references to GetProperty
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (76)
CodeGen\CodeGenFunctionPointersTests.cs (3)
789
validateProperty((PropertySymbol)c.
GetProperty
((string)"Prop1"), IsFunctionPointerTypeSymbol(CallingConvention.Default,
793
validateProperty(c.
GetProperty
("Prop2"), IsFunctionPointerTypeSymbol(CallingConvention.Standard,
985
var prop = c.
GetProperty
("Prop");
CodeGen\CodeGenReadonlyStructTests.cs (30)
1347
var p1 = type.
GetProperty
("P1");
1348
var p2 = type.
GetProperty
("P2");
1349
var p3 = type.
GetProperty
("P3");
1350
var p4 = type.
GetProperty
("P4");
1351
var p5 = type.
GetProperty
("P5");
1421
var p1 = type.
GetProperty
("P1");
1422
var p2 = type.
GetProperty
("P2");
1423
var p3 = type.
GetProperty
("P3");
1424
var p4 = type.
GetProperty
("P4");
1485
var p1 = type.
GetProperty
("P1");
1486
var p2 = type.
GetProperty
("P2");
1487
var p3 = type.
GetProperty
("P3");
1488
var p4 = type.
GetProperty
("P4");
1489
var p5 = type.
GetProperty
("P5");
1574
verifyReadOnly(s1.
GetProperty
("P1").GetMethod, true, RefKind.RefReadOnly);
1575
verifyReadOnly(s1.
GetProperty
("P1").SetMethod, false, RefKind.Ref);
1577
verifyReadOnly(s1.
GetProperty
("P2").GetMethod, true, RefKind.RefReadOnly);
1579
verifyReadOnly(s1.
GetProperty
("P3").GetMethod, true, RefKind.RefReadOnly);
1580
verifyReadOnly(s1.
GetProperty
("P3").SetMethod, false, RefKind.Ref);
1582
verifyReadOnly(s1.
GetProperty
("P4").GetMethod, false, RefKind.Ref);
1583
verifyReadOnly(s1.
GetProperty
("P4").SetMethod, true, RefKind.RefReadOnly);
1585
verifyReadOnly(s1.
GetProperty
("P5").GetMethod, false, null);
1586
verifyReadOnly(s1.
GetProperty
("P5").SetMethod, false, null);
1595
verifyReadOnly(s2.
GetProperty
("P1").GetMethod, true, RefKind.RefReadOnly);
1596
verifyReadOnly(s2.
GetProperty
("P2").GetMethod, true, RefKind.RefReadOnly);
1597
verifyReadOnly(s2.
GetProperty
("P3").SetMethod, true, RefKind.RefReadOnly);
1599
verifyReadOnly(s2.
GetProperty
("P4").GetMethod, false, null);
1600
verifyReadOnly(s2.
GetProperty
("P4").SetMethod, false, null);
2582
Assert.Equal(isReadOnly, type.
GetProperty
("P").GetMethod.IsDeclaredReadOnly);
2583
Assert.Equal(isReadOnly, type.
GetProperty
("P").GetMethod.IsEffectivelyReadOnly);
Emit\EmitMetadataTests.cs (3)
1273
var p = classA.
GetProperty
("P");
1275
var q = classA.
GetProperty
("Q");
1279
p = classC.BaseType().
GetProperty
("P");
Emit\InAttributeModifierTests.cs (40)
1778
var property = module.ContainingAssembly.GetTypeByMetadataName("Test").
GetProperty
("Property");
1798
var property = module.ContainingAssembly.GetTypeByMetadataName("Test").
GetProperty
("Property");
1819
var property = module.ContainingAssembly.GetTypeByMetadataName("Test").
GetProperty
("Property");
1840
var property = module.ContainingAssembly.GetTypeByMetadataName("Test").
GetProperty
("Property");
1860
var parameter = module.ContainingAssembly.GetTypeByMetadataName("Test").
GetProperty
("this[]").Parameters.Single();
1880
var parameter = module.ContainingAssembly.GetTypeByMetadataName("Test").
GetProperty
("this[]").Parameters.Single();
1901
var indexer = module.ContainingAssembly.GetTypeByMetadataName("Test").
GetProperty
("this[]");
1921
var indexer = module.ContainingAssembly.GetTypeByMetadataName("Test").
GetProperty
("this[]");
1943
var indexer = module.ContainingAssembly.GetTypeByMetadataName("Test").
GetProperty
("this[]");
2049
var parameter = module.ContainingAssembly.GetTypeByMetadataName("Test").
GetProperty
("this[]").Parameters.Single();
2970
var property = type.
GetProperty
("P");
2993
var property = type.
GetProperty
("P");
3015
var property = type.
GetProperty
("P");
3039
var property = type.
GetProperty
("P");
3061
var property = type.
GetProperty
("P");
3086
var implicitproperty = type.
GetProperty
("P");
3107
var property = type.
GetProperty
("P");
3131
var property = type.
GetProperty
("P");
3153
var property = type.
GetProperty
("P");
3177
var property = type.
GetProperty
("Parent.P");
3199
var parameter = type.
GetProperty
("this[]").Parameters.Single();
3225
var parameter = type.
GetProperty
("this[]").Parameters.Single();
3247
var parameter = type.
GetProperty
("this[]").Parameters.Single();
3273
var parameter = type.
GetProperty
("this[]").Parameters.Single();
3295
var parameter = type.
GetProperty
("this[]").Parameters.Single();
3322
var implicitParameter = type.
GetProperty
("this[]").Parameters.Single();
3350
var parameter = type.
GetProperty
("this[]").Parameters.Single();
3376
var parameter = type.
GetProperty
("this[]").Parameters.Single();
3398
var parameter = type.
GetProperty
("this[]").Parameters.Single();
3424
var parameter = type.
GetProperty
("Parent.Item").Parameters.Single();
3446
var indexer = type.
GetProperty
("this[]");
3470
var indexer = type.
GetProperty
("this[]");
3492
var indexer = type.
GetProperty
("this[]");
3516
var indexer = type.
GetProperty
("this[]");
3538
var indexer = type.
GetProperty
("this[]");
3562
var indexer = type.
GetProperty
("this[]");
3584
var indexer = type.
GetProperty
("this[]");
3608
var indexer = type.
GetProperty
("this[]");
3630
var indexer = type.
GetProperty
("this[]");
3654
var indexer = type.
GetProperty
("Parent.Item");
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (36)
Attributes\AttributeTests_Nullable.cs (2)
2534
var property = module.ContainingAssembly.GetTypeByMetadataName("C").GetTypeMember("<F>d__0").
GetProperty
("System.Collections.Generic.IEnumerator<System.Object>.Current");
2560
var property = module.ContainingAssembly.GetTypeByMetadataName("C").GetTypeMember("<F>d__0").
GetProperty
("System.Collections.Generic.IEnumerator<System.Object[]>.Current");
Attributes\AttributeTests_RefReadOnly.cs (34)
305
AssertProperty(type.
GetProperty
("P1"));
306
AssertProperty(type.
GetProperty
("P2"));
334
AssertProperty(type.
GetProperty
("P1"));
335
AssertProperty(type.
GetProperty
("P2"));
371
AssertProperty(type.
GetProperty
("P1"));
372
AssertProperty(type.
GetProperty
("P2"));
401
var indexer = module.ContainingAssembly.GetTypeByMetadataName("Test").
GetProperty
("this[]");
425
var parameter = module.ContainingAssembly.GetTypeByMetadataName("Test").
GetProperty
("this[]").GetParameters().Single();
445
var indexer = module.ContainingAssembly.GetTypeByMetadataName("Test").
GetProperty
("this[]");
473
var indexer = module.ContainingAssembly.GetTypeByMetadataName("Test").
GetProperty
("this[]");
1599
var property = type.
GetProperty
("Property");
1602
var indexer = type.
GetProperty
("this[]");
1641
var property = type.
GetProperty
("Property");
1644
var indexer = type.
GetProperty
("this[]");
1685
var property = type.
GetProperty
("Property");
1688
var indexer = type.
GetProperty
("this[]");
1730
var property = type.
GetProperty
("Property");
1733
var indexer = type.
GetProperty
("this[]");
1777
var property = type.
GetProperty
("Property");
1780
var indexer = type.
GetProperty
("this[]");
1821
var property = type.
GetProperty
("Property");
1824
var indexer = type.
GetProperty
("this[]");
1870
var property = type.
GetProperty
("Property");
1873
var indexer = type.
GetProperty
("this[]");
1914
var property = type.
GetProperty
("Property");
1917
var indexer = type.
GetProperty
("this[]");
1979
var property = type.
GetProperty
("System.Runtime.CompilerServices.ITest.Property");
1982
var indexer = type.
GetProperty
("System.Runtime.CompilerServices.ITest.Item");
2028
var property = type.
GetProperty
("System.Runtime.CompilerServices.ITest.Property");
2031
var indexer = type.
GetProperty
("System.Runtime.CompilerServices.ITest.Item");
2068
var property = type.
GetProperty
("ITest.Property");
2071
var indexer = type.
GetProperty
("ITest.Item");
2110
var property = type.
GetProperty
("ITest.Property");
2113
var indexer = type.
GetProperty
("ITest.Item");
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
Semantics\ReadOnlyStructsTests.cs (4)
1314
check(s1.
GetProperty
("P1"), true, false, false);
1315
check(s1.
GetProperty
("P2"), true, false, true);
1316
check(s1.
GetProperty
("P3"), false, true, false);
1317
check(s1.
GetProperty
("P4"), false, true, true);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (20)
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (1)
384
var csharpGetter = @class.
GetProperty
("I.P").GetMethod;
Symbols\IndexerTests.cs (1)
549
var classIndexer = @class.
GetProperty
("I1.this[]");
Symbols\InterfaceImplementationTests.cs (3)
186
var classExplicitImplementationBase = @class.
GetProperty
("BaseInterface.this[]");
187
var classExplicitImplementation = @class.
GetProperty
("Interface.this[]");
188
var classImplicitImplementation = @class.
GetProperty
("this[]");
Symbols\RequiredMembersTests.cs (1)
6960
var property = c.
GetProperty
("Property").GetPublicSymbol();
Symbols\Retargeting\RetargetingTests.cs (4)
290
var p = b.
GetProperty
("I<A>.P");
295
var i_a_p_v2 = i_a_v2.
GetProperty
("P");
315
implemented_p = c.
GetProperty
("I<CT>.P").ExplicitInterfaceImplementations[0];
319
var i_ct_p_v2 = i_ct_v2.
GetProperty
("P");
Symbols\Source\CustomModifierCopyTests.cs (5)
1136
var classProperty1 = comp1.GlobalNamespace.GetMember<NamedTypeSymbol>("C").
GetProperty
("I.P");
1159
var classProperty2 = comp2.GlobalNamespace.GetMember<NamedTypeSymbol>("C").
GetProperty
("I.P");
1173
var classProperty3 = comp3.GlobalNamespace.GetMember<NamedTypeSymbol>("C").
GetProperty
("P");
1300
var classProperty1 = comp1.GlobalNamespace.GetMember<NamedTypeSymbol>("C").
GetProperty
("P");
1327
var classProperty2 = comp2.GlobalNamespace.GetMember<NamedTypeSymbol>("C").
GetProperty
("P");
Symbols\Source\ExpressionBodiedPropertyTests.cs (2)
397
prop = (SourcePropertySymbol)c.
GetProperty
("I.Q");
401
prop = (SourcePropertySymbol)c.
GetProperty
("J.Q");
Symbols\Source\RecordTests.cs (2)
151
var x = (SourcePropertySymbolBase)c.
GetProperty
("x");
185
var y = (SourcePropertySymbolBase)c.
GetProperty
("y");
Symbols\SymbolErrorTests.cs (1)
4925
var indexer = compilation.GlobalNamespace.GetMember<NamedTypeSymbol>("A").
GetProperty
("IA." + WellKnownMemberNames.Indexer);