6 implementations of GetMembers
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceOrTypeSymbol.cs (1)
30public virtual ImmutableArray<ISymbol> GetMembers()
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\NamespaceOrTypeSymbol.cs (1)
13ImmutableArray<ISymbol> INamespaceOrTypeSymbol.GetMembers()
Microsoft.CodeAnalysis.Features (2)
MetadataAsSource\AbstractMetadataAsSourceService.AbstractWrappedNamespaceOrTypeSymbol.cs (1)
24public abstract ImmutableArray<ISymbol> GetMembers();
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
103public override ImmutableArray<ISymbol> GetMembers()
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\NamespaceOrTypeSymbol.vb (1)
268Private Function INamespaceOrTypeSymbol_GetMembers() As ImmutableArray(Of ISymbol) Implements INamespaceOrTypeSymbol.GetMembers
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceOrTypeSymbol.cs (1)
30public virtual ImmutableArray<ISymbol> GetMembers()
467 references to GetMembers
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (1)
666ImmutableArray<ISymbol> members = current.GetMembers();
ILLink.RoslynAnalyzer (7)
DataFlow\DynamicallyAccessedMembersBinder.cs (6)
122 foreach (var method in type.GetMembers ().OfType<IMethodSymbol> ()) { 151 foreach (var method in type.GetMembers ().OfType<IMethodSymbol> ()) { 194 foreach (var field in type.GetMembers ().OfType<IFieldSymbol> ()) { 253 foreach (var property in type.GetMembers ().OfType<IPropertySymbol> ()) { 302 foreach (var @event in type.GetMembers ().OfType<IEventSymbol> ()) { 410 foreach (var member in type.GetMembers ()) {
INamedTypeSymbolExtensions.cs (1)
45 var members = interfaceSymbol.GetMembers ();
Microsoft.Analyzers.Extra (4)
AsyncMethodWithoutCancellation.cs (1)
143if (@interface.GetMembers().OfType<IMethodSymbol>()
CallAnalysis\Fixers\LegacyLoggingFixer.cs (1)
635foreach (var methodSymbol in targetClassSymbol.GetMembers().Where(m => m.Kind == SymbolKind.Method).OfType<IMethodSymbol>())
MakeExeTypesInternalAnalyzer.cs (1)
118var members = type.GetMembers();
Utilities\SymbolExtensions.cs (1)
67foreach (var member in iface.GetMembers().OfType<IMethodSymbol>())
Microsoft.Analyzers.Local (1)
ApiLifecycle\AssemblyAnalysis.cs (1)
198.GetMembers()
Microsoft.AspNetCore.Analyzers (2)
ConfigureMethodVisitor.cs (1)
47foreach (var member in symbol.GetMembers())
StartupFacts.cs (1)
30var members = type.GetMembers();
Microsoft.AspNetCore.App.Analyzers (5)
Authorization\AddAuthorizationBuilderAnalyzer.cs (1)
44var addAuthorizationMethod = policyServiceCollectionExtensions.GetMembers()
Authorization\AuthorizationOptionsTypes.cs (1)
20var authorizationOptionsMembers = AuthorizationOptions.GetMembers();
Mvc\MvcAnalyzer.cs (1)
60foreach (var member in namedTypeSymbol.GetMembers())
RouteEmbeddedLanguage\Infrastructure\RoutePatternParametersDetector.cs (1)
69ITypeSymbol typeSymbol => typeSymbol.GetMembers().OfType<IPropertySymbol>().ToImmutableArray().As<ISymbol>(),
RouteHandlers\AtMostOneFromBodyAttribute.cs (1)
29var fromBodyMetadataInterfaceMembers = asParameterDecoratedParameter.Type.GetMembers().Where(
Microsoft.AspNetCore.Components.Analyzers (2)
ComponentParameterAnalyzer.cs (2)
55foreach (var member in type.GetMembers()) 145=> propertySymbol.ContainingType.GetMembers()
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
ComponentParameterAnalyzer.cs (1)
49foreach (var member in type.GetMembers())
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
StaticRouteHandlerModel\EndpointParameter.cs (1)
473var properties = type.GetMembers().OfType<IPropertySymbol>().Where(property => property.DeclaredAccessibility == Accessibility.Public);
Microsoft.AspNetCore.Mvc.Analyzers (1)
TopLevelParameterNameAnalyzer.cs (1)
108foreach (var member in type.GetMembers())
Microsoft.AspNetCore.Mvc.Api.Analyzers (2)
AddResponseTypeAttributeCodeFixAction.cs (1)
153foreach (var member in statusCodesType.GetMembers())
SymbolApiResponseMetadataProvider.cs (1)
123foreach (var conventionMethod in conventionType.GetMembers().OfType<IMethodSymbol>())
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (4)
HubClientProxyGenerator.Parser.cs (2)
284var members = providerSymbol.GetMembers() 288.GetMembers()
HubServerProxyGenerator.Parser.cs (2)
261var members = hubSymbol.GetMembers() 265.GetMembers()
Microsoft.CodeAnalysis (4)
DiagnosticAnalyzer\AnalyzerManager.AnalyzerExecutionContext.cs (2)
188processMembers(((INamedTypeSymbol)symbol).GetMembers()); 215processMembers(typeMember.GetMembers());
Operations\ControlFlowGraphBuilder.cs (1)
7956var properties = operation.Type.GetMembers()
SymbolDisplay\AbstractSymbolDisplayVisitor.cs (1)
317foreach (var member in enumType.GetMembers())
Microsoft.CodeAnalysis.CodeStyle (32)
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (2)
118var members = ((INamedTypeSymbol)symbolEndContext.Symbol).GetMembers(); 143foreach (var member in namedType.GetMembers())
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (1)
155foreach (var member in enumType.GetMembers())
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (3)
230foreach (var member in namedType.GetMembers()) 472foreach (var member in namedType.GetMembers()) 691foreach (var member in namedTypeSymbol.GetMembers())
src\Analyzers\Core\Analyzers\SimplifyLinqExpression\AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
99foreach (var method in enumerableType.GetMembers().OfType<IMethodSymbol>())
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
129foreach (var member in namedType.GetMembers())
src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (1)
79foreach (var member in containingType.GetMembers())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (9)
198return type.GetMembers().WhereAsArray(m => m.DeclaredAccessibility == Accessibility.Public && 204return type.GetMembers(); 299return type.GetMembers().WhereAsArray(m => m.Kind != SymbolKind.NamedType && 304return type.GetMembers(); 461foreach (var member in type.GetMembers()) 515=> type.GetMembers(); 568foreach (var member in containingType.GetMembers()) 591foreach (var member in containingType.GetMembers()) 612foreach (var member in type.GetMembers())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IPropertySymbolExtensions.cs (1)
12=> property.ContainingType.GetMembers()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (6)
152from interfaceMember in iface.GetMembers() 550return ((INamedTypeSymbol)symbol).GetMembers().OfType<IPropertySymbol>().Where(p => p.CanBeReferencedByName); 671if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p.Name == WellKnownMemberNames.IsCompleted && p.Type.SpecialType == SpecialType.System_Boolean && p.GetMethod != null)) 676var methods = returnType.GetMembers().OfType<IMethodSymbol>(); 705.SelectMany(x => x.GetMembers()) 745.SelectMany(x => x.GetMembers())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (3)
440return types.SelectMany(x => x.GetMembers().OfType<T>().Where(m => m.IsAccessibleWithin(within))); 505return types.SelectMany(x => x.GetMembers().OfType<T>().Where(m => m.IsAccessibleWithin(within))); 693foreach (var member in type.GetMembers())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AnonymousTypeSymbolKey.cs (2)
22var properties = symbol.GetMembers().OfType<IPropertySymbol>().ToImmutableArray(); 39var contextualProperties = contextualSymbol?.GetMembers().OfType<IPropertySymbol>().ToImmutableArray() ?? [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
302? containingType.GetMembers()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
22var orderedExistingConstants = enumType.GetMembers()
Microsoft.CodeAnalysis.CodeStyle.Fixes (8)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (2)
26var fields = namedType.GetMembers() 32var properties = namedType.GetMembers()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (2)
176foreach (var field in enumType.GetMembers().OfType<IFieldSymbol>()) 195foreach (var field in enumType.GetMembers().OfType<IFieldSymbol>())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (2)
154return namedType.GetMembers(); 157return namedType.GetMembers()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\INamedTypeSymbolExtensions.cs (1)
32namedType.GetMembers().WhereAsArray(s => s is not INamedTypeSymbol),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
505return containingType.GetMembers()
Microsoft.CodeAnalysis.CSharp (3)
SymbolDisplay\SymbolDisplayVisitor.Types.cs (1)
465var members = string.Join(", ", symbol.GetMembers().OfType<IPropertySymbol>().Select(CreateAnonymousTypeMember));
Symbols\TypedConstantExtensions.cs (2)
82var members = constant.Type!.GetMembers(); 161var members = constant.Type!.GetMembers();
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
79.GetMembers()
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
81foreach (var member in structType.GetMembers())
src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
102foreach (var member in typeSymbol.GetMembers())
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.InfoCache.cs (1)
70=> namedType.GetMembers()
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
90foreach (var member in namedType.GetMembers())
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
106.GetMembers()
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
314var positionalParam = param.ContainingSymbol.ContainingType.GetMembers().FirstOrDefault(member
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Editing\CSharpImportAdder.cs (1)
118foreach (var member in type.GetMembers())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
553var indexers = type.GetMembers().OfType<IPropertySymbol>()
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (6)
SymbolKey\SymbolKeyCompilationsTests.cs (4)
229var indexer1 = type.GetMembers().Where(m => m.MetadataName == "I.Item").Single() as IPropertySymbol; 230var indexer2 = type.GetMembers().Where(m => m.MetadataName == "I<T>.Item").Single() as IPropertySymbol; 267var members1 = symbols1.OfType<INamespaceOrTypeSymbol>().SelectMany(n => n.GetMembers()).ToList(); 268var members2 = symbols2.OfType<INamespaceOrTypeSymbol>().SelectMany(n => n.GetMembers()).ToList();
SymbolKey\SymbolKeyTestBase.cs (2)
220foreach (var memberSymbol in symbol.GetMembers()) 413foreach (var m in tinfo.Type.GetMembers())
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (15)
CodeGen\CodeGenTupleTest.cs (15)
4490vt2.GetMembers().ToTestDisplayStrings()); 5883Assert.All(tupleWithoutNames.GetMembers().OfType<IFieldSymbol>().Select(f => f.Locations.FirstOrDefault()), 5960Assert.All(tupleWithoutNames.GetMembers().OfType<IFieldSymbol>().Select(f => f.Locations.FirstOrDefault()), 5979Assert.All(tupleWithNames.GetMembers().OfType<IFieldSymbol>().Select(f => f.Locations.FirstOrDefault()), 5998Assert.All(tupleWithSomeNames.GetMembers().OfType<IFieldSymbol>().Select(f => f.Locations.FirstOrDefault()), 6016Assert.All(tupleWithNames.GetMembers().OfType<IFieldSymbol>().Select(f => f.Locations.FirstOrDefault()), 6068Assert.All(tuple8WithoutNames.GetMembers().OfType<IFieldSymbol>().Where(f => f.Name != "Rest").Select(f => f.Locations.FirstOrDefault()), 6093Assert.All(tuple8WithNames.GetMembers().OfType<IFieldSymbol>().Select(f => f.Locations.FirstOrDefault()), 6118Assert.All(tuple9WithoutNames.GetMembers().OfType<IFieldSymbol>().Select(f => f.Locations.FirstOrDefault()), 6144Assert.All(tuple9WithNames.GetMembers().OfType<IFieldSymbol>().Select(f => f.Locations.FirstOrDefault()), 6176Assert.All(tuple9WithNames.GetMembers().OfType<IFieldSymbol>().Select(f => f.Locations.FirstOrDefault()), 13300AssertTestDisplayString(valuetuple.GetMembers(), 13347AssertTestDisplayString(valuetuple.GetMembers(), 13379AssertTestDisplayString(valuetuple.GetMembers(), 22859AssertEx.SetEqual(xSymbol.GetMembers().OfType<IFieldSymbol>().Select(f => f.Name),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Diagnostics\GetDiagnosticsTests.cs (1)
1721foreach (var field in namedType.GetMembers().OfType<IFieldSymbol>())
Semantics\PrimaryConstructorTests.cs (1)
127var members = comp.GetTypeByMetadataName("Point").GetMembers();
Microsoft.CodeAnalysis.CSharp.Features (15)
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (1)
318reservedNames: declaredSymbol.ContainingType.GetMembers().Select(m => m.Name));
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (1)
133var collectionType = namedType.GetMembers()
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (2)
189var fields = type.GetMembers().OfType<IFieldSymbol>().Where(f => f.IsConst).Where(f => f.HasConstantValue); 217foreach (var member in type.GetMembers())
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.cs (1)
78foreach (var member in symbol.GetMembers())
Debugging\BreakpointResolver.cs (1)
24var members = type.GetMembers()
ImplementInterface\AbstractChangeImplementationCodeRefactoringProvider.cs (1)
194foreach (var interfaceMember in interfaceType.GetMembers())
NavigationBar\CSharpNavigationBarItemService.cs (1)
67foreach (var member in type.GetMembers())
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
79.GetMembers()
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
81foreach (var member in structType.GetMembers())
src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
102foreach (var member in typeSymbol.GetMembers())
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.InfoCache.cs (1)
70=> namedType.GetMembers()
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
90foreach (var member in namedType.GetMembers())
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
106.GetMembers()
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
314var positionalParam = param.ContainingSymbol.ContainingType.GetMembers().FirstOrDefault(member
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
ExtractClass\ExtractClassTests.cs (1)
3107var availableMembers = originalSymbol.GetMembers().Where(member => MemberAndDestinationValidator.IsMemberValid(member));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (25)
Semantics\NativeIntegerTests.cs (4)
301var nativeIntegerMembers = nativeIntegerType.GetMembers(); 302var underlyingMembers = underlyingType.GetMembers(); 511var allMembers = type.GetMembers(); 512Assert.Equal(allMembers, type.GetMembers(), ReferenceEqualityComparer.Instance); // same member instances
Semantics\NullableReferenceTypesTests.cs (21)
12345foreach (var ev in type.GetMembers().OfType<EventSymbol>()) 12713foreach (var ev in type.GetMembers().OfType<EventSymbol>()) 12801foreach (var ev in type.GetMembers().OfType<EventSymbol>()) 12883foreach (var member in compilation.GetTypeByMetadataName("B1").GetMembers().OfType<PropertySymbol>()) 12888foreach (var member in compilation.GetTypeByMetadataName("B2").GetMembers().OfType<PropertySymbol>()) 12897foreach (var property in type.GetMembers().OfType<PropertySymbol>()) 13033foreach (var member in compilation.GetTypeByMetadataName("IA").GetMembers().OfType<PropertySymbol>()) 13039foreach (var member in compilation.GetTypeByMetadataName("IA2").GetMembers().OfType<PropertySymbol>()) 13049foreach (var property in type.GetMembers().OfType<PropertySymbol>()) 13124foreach (var member in compilation.GetTypeByMetadataName("IA").GetMembers().OfType<PropertySymbol>()) 13130foreach (var member in compilation.GetTypeByMetadataName("IA2").GetMembers().OfType<PropertySymbol>()) 13140foreach (var property in type.GetMembers().OfType<PropertySymbol>()) 16633foreach (var member in compilation.GetTypeByMetadataName(typeName).GetMembers().OfType<PropertySymbol>()) 16639foreach (var member in compilation.GetTypeByMetadataName("B3").GetMembers().OfType<PropertySymbol>()) 16648foreach (var property in type.GetMembers().OfType<PropertySymbol>()) 16718var implemented = compilation.GetTypeByMetadataName(typeName[0]).GetMembers().OfType<PropertySymbol>().Single(); 16724var implemented = compilation.GetTypeByMetadataName("IA3").GetMembers().OfType<PropertySymbol>().Single(); 16733foreach (var property in type.GetMembers().OfType<PropertySymbol>()) 16803var implemented = compilation.GetTypeByMetadataName(typeName[0]).GetMembers().OfType<PropertySymbol>().Single(); 16809var implemented = compilation.GetTypeByMetadataName("IA3").GetMembers().OfType<PropertySymbol>().Single(); 16818foreach (var property in type.GetMembers().OfType<PropertySymbol>())
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (123)
Compilation\CompilationAPITests.cs (6)
2611Assert.Equal(1, type.GetMembers().OfType<IPropertySymbol>().Count()); 2613Assert.All(type.GetMembers().OfType<IPropertySymbol>().Select(p => p.Locations.FirstOrDefault()), 2632Assert.Equal(2, type.GetMembers().OfType<IPropertySymbol>().Count()); 2647Assert.Equal(2, type.GetMembers().OfType<IPropertySymbol>().Count()); 2649Assert.All(type.GetMembers().OfType<IPropertySymbol>().Select(p => p.Locations.FirstOrDefault()), 2714return type.GetMembers().OfType<IPropertySymbol>().SelectAsArray(p =>
Compilation\ReferenceManagerTests.cs (2)
2140compilation.GetTypeByMetadataName("System.Int32").GetMembers(); 2144Assert.Throws<ObjectDisposedException>(() => compilation.GetTypeByMetadataName("System.Int64").GetMembers());
Compilation\SemanticModelGetSemanticInfoTests.cs (3)
9286Assert.Empty(type.GetMembers()); 9287Assert.NotEmpty(constructedFrom.GetMembers()); 9290Assert.Equal(1, a.GetMembers().Length);
Compilation\SymbolVisitorTests.cs (3)
122VisitChildren(symbol.GetMembers()); 302VisitChildren(symbol.GetMembers()); 424VisitChildren(symbol.GetMembers(), argument);
DeclarationTests.cs (2)
304var method = (MethodSymbol)type.GetMembers().First(); 348var method = (MethodSymbol)type.GetMembers().First();
SymbolDisplay\SymbolDisplayTests.cs (6)
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(); 7176var members = semanticModel.GetDeclaredSymbol(declaration).GetMembers(); 7248var members = semanticModel.GetDeclaredSymbol(declaration).GetMembers(); 7508var members = semanticModel.GetDeclaredSymbol(declaration).GetMembers(); 7661var members = semanticModel.GetDeclaredSymbol(declaration).GetMembers();
Symbols\AnonymousTypesSemanticsTests.cs (1)
1406var properties = (from m in info0.Type.GetMembers() where m.Kind == SymbolKind.Property select m).ToArray();
Symbols\AnonymousTypesSymbolTests.cs (1)
1650var mems = info.Type.GetMembers();
Symbols\DefaultInterfaceImplementationTests.cs (39)
14737var p1 = i1.GetMembers().OfType<PropertySymbol>().ElementAt(0); 14760var p2 = i1.GetMembers().OfType<PropertySymbol>().ElementAt(1); 14783var p3 = i1.GetMembers().OfType<PropertySymbol>().ElementAt(2); 14810var p4 = i1.GetMembers().OfType<PropertySymbol>().ElementAt(3); 16341var test1P2 = test1.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith("I2.")).Single(); 16367var test1P3 = test1.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith("I3.")).Single(); 16592var test1P2 = test1.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith(i1.Name)).Single(); 17024var test2P1 = test2.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith("I1.")).Single(); 17050var test2P2 = test2.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith("I2.")).Single(); 17076var test2P3 = test2.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith("I3.")).Single(); 17274var test2P1 = test2.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith("I1.")).Single(); 17304var test2P2 = test2.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith("I2.")).Single(); 17330var test2P3 = test2.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith("I3.")).Single(); 17360var test2P4 = test2.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith("I4.")).Single(); 28236var p1 = i1.GetMembers().OfType<EventSymbol>().ElementAt(0); 28263var p2 = i1.GetMembers().OfType<EventSymbol>().ElementAt(1); 28290var p3 = i1.GetMembers().OfType<EventSymbol>().ElementAt(2); 28317var p4 = i1.GetMembers().OfType<EventSymbol>().ElementAt(3); 29734var test1P2 = test1.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith("I2.")).Single(); 29764var test1P3 = test1.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith("I3.")).Single(); 30005var test1P2 = test1.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith(i1.Name)).Single(); 30447var test2P1 = test2.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith("I1.")).Single(); 30477var test2P2 = test2.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith("I2.")).Single(); 30507var test2P3 = test2.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith("I3.")).Single(); 30668var test2P1 = test2.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith("I1.")).Single(); 30698var test2P2 = test2.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith("I2.")).Single(); 30728var test2P3 = test2.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith("I3.")).Single(); 30758var test2P4 = test2.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith("I4.")).Single(); 67148Assert.Empty(i1.GetMembers().OfType<MethodSymbol>().Single().ExplicitInterfaceImplementations); 67214Assert.Same(i2.GetMembers().OfType<MethodSymbol>().Single(), i1.GetMembers().OfType<MethodSymbol>().Single().ExplicitInterfaceImplementations.Single()); 67330var m = i1.GetMembers().OfType<PropertySymbol>().Single(); 67398var m1 = i1.GetMembers().OfType<PropertySymbol>().Single(); 67399var m2 = i2.GetMembers().OfType<PropertySymbol>().Single(); 67518var m = i1.GetMembers().OfType<EventSymbol>().Single(); 67589var m1 = i1.GetMembers().OfType<EventSymbol>().Single(); 67590var m2 = i2.GetMembers().OfType<EventSymbol>().Single(); 68010foreach (var p in c1.GetMembers().OfType<PropertySymbol>()) 68074foreach (var p in c1.GetMembers().OfType<PropertySymbol>())
Symbols\Metadata\MetadataMemberTests.cs (2)
662test1.GetMembers(); 673test2.GetMembers();
Symbols\Metadata\PE\LoadingFields.cs (1)
155var fields = readOnlySpanType.GetMembers().OfType<FieldSymbol>();
Symbols\Metadata\PE\LoadingMethods.cs (9)
1180foreach (var m in compilation.GetTypeByMetadataName("cls1").GetMembers()) 1185foreach (var m in compilation.GetTypeByMetadataName("Instance_vs_Static").GetMembers()) 1190foreach (var m in compilation.GetTypeByMetadataName("ReturnAValue1").GetMembers()) 1195foreach (var m in compilation.GetTypeByMetadataName("ReturnAValue2").GetMembers()) 1200foreach (var m in compilation.GetTypeByMetadataName("Generic1").GetMembers()) 1205foreach (var m in compilation.GetTypeByMetadataName("Generic2").GetMembers()) 1210foreach (var m in compilation.GetTypeByMetadataName("HasParameter").GetMembers()) 1215foreach (var m in compilation.GetTypeByMetadataName("Virtual").GetMembers()) 1242foreach (var m in compilation.GetTypeByMetadataName("Microsoft.FSharp.Control.IDelegateEvent`1").GetMembers())
Symbols\Retargeting\RetargetExplicitInterfaceImplementation.cs (1)
81foreach (var member in classC.GetMembers())
Symbols\Source\DeclaringSyntaxNodeTests.cs (10)
238foreach (IFieldSymbol f in c1.GetMembers().OfType<IFieldSymbol>()) 272foreach (ISymbol memb in localA1Type.GetMembers()) 354foreach (var member in localType.GetMembers()) 459foreach (IFieldSymbol f in c2.GetMembers().OfType<IFieldSymbol>()) 467foreach (IMethodSymbol m in c2.GetMembers().OfType<IMethodSymbol>()) 475foreach (IFieldSymbol f in c3.GetMembers().OfType<IFieldSymbol>()) 521foreach (ISymbol memb in e1.GetMembers()) 532foreach (ISymbol memb in c1.GetMembers()) 555foreach (ISymbol memb in constructedC1.GetMembers()) 575foreach (ISymbol memb in c2.GetMembers())
Symbols\Source\MethodTests.cs (1)
427var members = classTest.GetMembers();
Symbols\Source\NullablePublicAPITests.cs (10)
147return c.GetMembers().OfType<IFieldSymbol>().ToArray(); 214return c.GetMembers().OfType<IPropertySymbol>().ToArray(); 288return c.GetMembers().OfType<IMethodSymbol>().Where(m => m.Name.StartsWith("M")).ToArray(); 480var members = c.GetMembers().OfType<IMethodSymbol>().Where(m => m.Name.StartsWith("M")).ToArray(); 488members = e.GetMembers().OfType<IMethodSymbol>().Where(m => m.Name.StartsWith("M")).Select(m => m.ReduceExtensionMethod(m.Parameters[0].Type)).ToArray(); 637return c.GetMembers().OfType<IEventSymbol>().ToArray(); 693comp => ((INamedTypeSymbol)((Compilation)comp).GetMember("I")).GetMembers().OfType<IMethodSymbol>().Where(m => m.Name.StartsWith("F")).ToArray(), 757comp => ((INamedTypeSymbol)((Compilation)comp).GetMember("I")).GetMembers().OfType<IMethodSymbol>().Where(m => m.Name.StartsWith("F")).ToArray(), 822comp => ((INamedTypeSymbol)((Compilation)comp).GetMember("I")).GetMembers().OfType<IMethodSymbol>().Where(m => m.Name.StartsWith("F")).ToArray(), 889comp => ((INamedTypeSymbol)((Compilation)comp).GetMember("IB")).GetMembers().OfType<IMethodSymbol>().Where(m => m.Name.StartsWith("F")).ToArray(),
Symbols\Source\PropertyTests.cs (2)
395var mems = type01.GetMembers(); 414mems = type02.GetMembers();
Symbols\Source\TypeMapTests.cs (2)
145var c1OfByteChar_c2 = (NamedTypeSymbol)(c1OfByteChar.GetMembers()[0]); 187var c1OfByteChar_c2 = (NamedTypeSymbol)(c1OfByteChar.GetMembers()[0]);
Symbols\StaticAbstractMembersInInterfacesTests.cs (12)
4138foreach (MethodSymbol m01 in compilation1.GetTypeByMetadataName("I1").GetMembers()) 4151foreach (MethodSymbol m01 in compilation1.GetTypeByMetadataName("I2").GetMembers()) 4164foreach (MethodSymbol m01 in compilation1.GetTypeByMetadataName("I3").GetMembers()) 4384foreach (MethodSymbol m01 in compilation1.GetTypeByMetadataName("I1").GetMembers()) 4397foreach (MethodSymbol m01 in compilation1.GetTypeByMetadataName("I2").GetMembers()) 4410foreach (MethodSymbol m01 in compilation1.GetTypeByMetadataName("I3").GetMembers()) 4570foreach (MethodSymbol m01 in compilation1.GetTypeByMetadataName("I1").GetMembers()) 4583foreach (MethodSymbol m01 in compilation1.GetTypeByMetadataName("I2").GetMembers()) 4596foreach (MethodSymbol m01 in compilation1.GetTypeByMetadataName("I3").GetMembers()) 4810foreach (MethodSymbol m01 in compilation1.GetTypeByMetadataName("I1").GetMembers()) 4823foreach (MethodSymbol m01 in compilation1.GetTypeByMetadataName("I2").GetMembers()) 4836foreach (MethodSymbol m01 in compilation1.GetTypeByMetadataName("I3").GetMembers())
Symbols\SymbolEqualityTests.cs (6)
637var property1 = (IPropertySymbol)type1.GetMembers()[0]; 638var property2 = (IPropertySymbol)type2.GetMembers()[0]; 686var field1 = (IFieldSymbol)type1.GetMembers()[0]; 687var field2 = (IFieldSymbol)type2.GetMembers()[0]; 738var event1 = (IEventSymbol)type1.GetMembers()[2]; 739var event2 = (IEventSymbol)type2.GetMembers()[2];
Symbols\TypeTests.cs (4)
622foreach (var m in a.GetMembers()) 673var fields = v.GetMembers().OfType<FieldSymbol>().ToList(); 968var actual = string.Join(", ", typeSym.GetMembers().Select(symbol => symbol.ToTestDisplayString()).OrderBy(name => name)); 1018var actualSymbols = typeSym.GetMembers();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Parsing\RecordParsing.cs (1)
342Assert.Empty(comp.GetTypeByMetadataName("P").GetMembers());
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Recommendations\CSharpRecommendationServiceRunner.cs (1)
575.GetMembers()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Editing\CSharpImportAdder.cs (1)
118foreach (var member in type.GetMembers())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
553var indexers = type.GetMembers().OfType<IPropertySymbol>()
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (11)
CodeGeneration\SymbolEditorTests.cs (2)
1034var property = typeC.GetMembers().First(m => m.Kind == SymbolKind.Property); 1044var iproperty = typeI.GetMembers().First(m => m.Kind == SymbolKind.Property);
CodeGeneration\SyntaxGeneratorTests.cs (9)
989var conversion = gcHandleType.GetMembers().OfType<IMethodSymbol>().Single(m => 997conversion = doubleType.GetMembers().OfType<IMethodSymbol>().Single(m => 2495var method = type.GetMembers().Single(m => m is IMethodSymbol { MethodKind: MethodKind.ExplicitInterfaceImplementation }); 2496var property = type.GetMembers().Single(m => m is IPropertySymbol { IsIndexer: false }); 2497var indexer = type.GetMembers().Single(m => m is IPropertySymbol { IsIndexer: true }); 2498var ev = type.GetMembers().Single(m => m is IEventSymbol); 4278var method = symbolC.GetMembers().OfType<IMethodSymbol>().Single(m => m.MethodKind == MethodKind.Ordinary); 4279var indexer = symbolC.GetMembers().OfType<IPropertySymbol>().Single(m => m.IsIndexer); 4280var property = symbolC.GetMembers().OfType<IPropertySymbol>().Single(m => !m.IsIndexer);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
MoveStaticMembers\TestMoveStaticMembersService.cs (1)
52var selectedMembers = selectedType.GetMembers().WhereAsArray(symbol => SelectedMembers.Contains(symbol.Name));
PullMemberUp\TestPullMemberUpService.cs (1)
32var members = containingType.GetMembers().Where(member => MemberAndDestinationValidator.IsMemberValid(member));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
CodeGeneration\CodeGenerationTests.cs (1)
646var members = onlyGenerateMembers ? symbol.GetMembers().ToArray() : new[] { symbol };
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (1)
212var memberSymbol = namedTypeSymbol.GetMembers()
Microsoft.CodeAnalysis.Features (29)
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (1)
160if (!typeSymbol.GetMembers().OfType<IMethodSymbol>().Any(IsDebuggerDisplayMethod))
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (1)
533foreach (var methodSymbol in typeSymbol.GetMembers().OfType<IMethodSymbol>())
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (1)
323var originalProperties = anonymousType.GetMembers().OfType<IPropertySymbol>().ToImmutableArray();
ConvertAutoPropertyToFullProperty\AbstractConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (1)
59var fields = propertySymbol.ContainingType.GetMembers().OfType<IFieldSymbol>();
EditAndContinue\Utilities\Extensions.cs (3)
170=> property.ContainingType.GetMembers().Any(static (member, property) => member is IFieldSymbol field && field.AssociatedSymbol == property, property); 187=> (IFieldSymbol?)parameter.ContainingType.GetMembers().FirstOrDefault( 242=> type.GetMembers().Any(static member => member.ExplicitInterfaceImplementations().Any());
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexLanguageDetector.cs (1)
62from method in regexType.GetMembers().OfType<IMethodSymbol>()
ExtractInterface\AbstractExtractInterfaceService.cs (1)
103var extractableMembers = typeToExtractFrom.GetMembers().Where(IsExtractableMember);
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
28var allMembers = _symbol.GetMembers();
PullMemberUp\MembersPuller.cs (2)
511return overrideMembersSet.Intersect(destination.GetMembers(), SymbolEquivalenceComparer.Instance).Any(); 518foreach (var interfaceMember in destination.GetMembers())
ReplaceDocCommentTextWithTag\AbstractReplaceDocCommentTextWithTagCodeRefactoringProvider.cs (1)
95var childMember = namedType.GetMembers().FirstOrDefault(m => syntaxFacts.StringComparer.Equals(m.Name, singleWordText));
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (1)
100var setMethod = containingType.GetMembers()
Snippets\SnippetFunctionService.cs (1)
64var enumFields = typeSymbol.GetMembers().Where(m => m.Kind == SymbolKind.Field && m.IsStatic);
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (2)
118var members = ((INamedTypeSymbol)symbolEndContext.Symbol).GetMembers(); 143foreach (var member in namedType.GetMembers())
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (1)
155foreach (var member in enumType.GetMembers())
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (3)
230foreach (var member in namedType.GetMembers()) 472foreach (var member in namedType.GetMembers()) 691foreach (var member in namedTypeSymbol.GetMembers())
src\Analyzers\Core\Analyzers\SimplifyLinqExpression\AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
99foreach (var method in enumerableType.GetMembers().OfType<IMethodSymbol>())
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
129foreach (var member in namedType.GetMembers())
src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (1)
79foreach (var member in containingType.GetMembers())
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (2)
26var fields = namedType.GetMembers() 32var properties = namedType.GetMembers()
StackTraceExplorer\StackFrameLocalMethodResolver.cs (1)
38var candidateFunctions = type.GetMembers()
StackTraceExplorer\StackFrameMethodSymbolResolver.cs (1)
25.GetMembers()
UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (1)
368var constructorSpans = field.ContainingType.GetMembers()
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
2094members = namedType.GetMembers();
Microsoft.CodeAnalysis.VisualBasic (4)
SymbolDisplay\SymbolDisplayVisitor.Types.vb (1)
326Dim members = String.Join(", ", symbol.GetMembers().OfType(Of IPropertySymbol).Select(Function(p) CreateAnonymousTypeMember(p)))
Symbols\NamespaceOrTypeSymbol.vb (1)
268Private Function INamespaceOrTypeSymbol_GetMembers() As ImmutableArray(Of ISymbol) Implements INamespaceOrTypeSymbol.GetMembers
Symbols\TypedConstant.vb (2)
78Dim members = constant.Type.GetMembers() 142Dim members = constant.Type.GetMembers()
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Analyzers\VisualBasic\Analyzers\RemoveUnusedMembers\VisualBasicRemoveUnusedMembersDiagnosticAnalyzer.vb (1)
27For Each method In DirectCast(context.Symbol, INamedTypeSymbol).GetMembers().OfType(Of IMethodSymbol)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Editing\VisualBasicImportAdder.vb (2)
105For Each member In type.GetMembers() 115For Each member In type.GetMembers()
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (12)
CodeGen\CodeGenTuples.vb (11)
6898Assert.All(tupleWithoutNames.GetMembers().OfType(Of IFieldSymbol)().Select(Function(f) f.Locations.FirstOrDefault()), 6951Assert.All(tupleWithoutNames.GetMembers().OfType(Of IFieldSymbol)().Select(Function(f) f.Locations.FirstOrDefault()), 6971Assert.All(tupleWithoutNames.GetMembers().OfType(Of IFieldSymbol)().Select(Function(f) f.Locations.FirstOrDefault()), 6992Assert.All(tupleWithSomeNames.GetMembers().OfType(Of IFieldSymbol)().Select(Function(f) f.Locations.FirstOrDefault()), 7010Assert.All(tupleWithoutNames.GetMembers().OfType(Of IFieldSymbol)().Select(Function(f) f.Locations.FirstOrDefault()), 7035Assert.All(tuple8WithoutNames.GetMembers().OfType(Of IFieldSymbol)().Select(Function(f) f.Locations.FirstOrDefault()), 7060Assert.All(tuple8WithNames.GetMembers().OfType(Of IFieldSymbol)().Select(Function(f) f.Locations.FirstOrDefault()), 7085Assert.All(tuple9WithoutNames.GetMembers().OfType(Of IFieldSymbol)().Select(Function(f) f.Locations.FirstOrDefault()), 7110Assert.All(tuple9WithNames.GetMembers().OfType(Of IFieldSymbol)().Select(Function(f) f.Locations.FirstOrDefault()), 7135Assert.All(tuple9WithNames.GetMembers().OfType(Of IFieldSymbol)().Select(Function(f) f.Locations.FirstOrDefault()), 7159Assert.All(tupleWithoutNames.GetMembers().OfType(Of IFieldSymbol)().Select(Function(f) f.Locations.FirstOrDefault()),
PrivateProtected.vb (1)
134For Each member In bb.GetMembers()
Microsoft.CodeAnalysis.VisualBasic.Features (6)
Completion\CompletionProviders\ImplementsClauseCompletionProvider.vb (1)
188.AddRange([interface].GetMembers())
NavigationBar\VisualBasicNavigationBarItemService.vb (4)
133For Each member In type.GetMembers().OrderBy(Function(m) m.Name) 161Dim members = From member In type.GetMembers() 237Dim memberGroups = type.GetMembers().Where(AddressOf IncludeMember) _ 324Dim methodsImplementingEvents = containingType.GetMembers().OfType(Of IMethodSymbol) _
src\Analyzers\VisualBasic\Analyzers\RemoveUnusedMembers\VisualBasicRemoveUnusedMembersDiagnosticAnalyzer.vb (1)
27For Each method In DirectCast(context.Symbol, INamedTypeSymbol).GetMembers().OfType(Of IMethodSymbol)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (14)
Compilation\CompilationAPITests.vb (10)
1591Assert.Equal(2, type.GetMembers().OfType(Of IPropertySymbol).Count()) 1593Assert.All(type.GetMembers().OfType(Of IPropertySymbol)().Select(Function(p) p.Locations.FirstOrDefault()), 1613Assert.Equal(2, type.GetMembers().OfType(Of IPropertySymbol).Count()) 1638Assert.Equal(1, type.GetMembers().OfType(Of IPropertySymbol).Count()) 1640Assert.All(type.GetMembers().OfType(Of IPropertySymbol)().Select(Function(p) p.Locations.FirstOrDefault()), 1653Assert.Equal(1, type.GetMembers().OfType(Of IPropertySymbol).Count()) 1655Assert.All(type.GetMembers().OfType(Of IPropertySymbol)().Select(Function(p) p.Locations.FirstOrDefault()), 1667Assert.Equal(2, type.GetMembers().OfType(Of IPropertySymbol).Count()) 1669Assert.All(type.GetMembers().OfType(Of IPropertySymbol)().Select(Function(p) p.Locations.FirstOrDefault()), 1730Return type.GetMembers().OfType(Of IPropertySymbol)().SelectAsArray(Function(p) p.NullableAnnotation)
Compilation\ReferenceManagerTests.vb (2)
1655c.GetTypeByMetadataName("System.Int32").GetMembers() 1659Assert.Throws(Of ObjectDisposedException)(Function() c.GetTypeByMetadataName("System.Int64").GetMembers())
Diagnostics\GetDiagnosticsTests.vb (1)
722For Each field In namedType.GetMembers().OfType(Of IFieldSymbol)
Semantics\InitOnlyMemberTests.vb (1)
5269For Each m As MethodSymbol In d.GetMembers()
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (4)
SymbolsTests\AnonymousTypes\AnonymousTypesSemanticsTests.vb (1)
713Dim mems = typeInfo.Type.GetMembers()
SymbolsTests\ParamsCollectionTests.vb (2)
77Dim m1 = DirectCast(csCompilation, Compilation).GetTypeByMetadataName("C1").GetMembers().Where(Function(s) s.Name = "M1").Single() 78Dim m2 = DirectCast(csCompilation, Compilation).GetTypeByMetadataName("C1").GetMembers().Where(Function(s) s.Name = "M2").Single()
SymbolsTests\Source\OverridesTests.vb (1)
6728For Each member In namedType.GetMembers()
Microsoft.CodeAnalysis.VisualBasic.Workspaces (4)
Recommendations\VisualBasicRecommendationServiceRunner.vb (2)
483Return namedTypeSymbol.GetMembers() _ 531Return namedTypeSymbol.GetMembers() _
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Editing\VisualBasicImportAdder.vb (2)
105For Each member In type.GetMembers() 115For Each member In type.GetMembers()
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (2)
CodeGeneration\SyntaxGeneratorTests.vb (2)
1066Dim Conversion = gcHandleType.GetMembers().OfType(Of IMethodSymbol)().Single( 1075Conversion = doubleType.GetMembers().OfType(Of IMethodSymbol)().Single(
Microsoft.CodeAnalysis.Workspaces (40)
Editing\SyntaxGenerator.cs (4)
768members: type.GetMembers().Where(CanBeDeclared).Select(Declaration)), 776members: type.GetMembers().Where(CanBeDeclared).Select(Declaration)), 782members: type.GetMembers().Where(CanBeDeclared).Select(Declaration)), 789members: type.GetMembers().Where(s => s.Kind == SymbolKind.Field).Select(Declaration)),
FindSymbols\FindReferences\Finders\EventSymbolReferenceFinder.cs (1)
26var backingFields = symbol.ContainingType.GetMembers()
FindSymbols\FindReferences\Finders\PropertySymbolReferenceFinder.cs (1)
54foreach (var member in symbol.ContainingType.GetMembers())
Rename\RenameUtilities.cs (1)
199foreach (var member in containingType.GetMembers())
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
205foreach (var method in namedType.GetMembers().OfType<IMethodSymbol>())
Shared\Extensions\INamespaceSymbolExtensions.cs (1)
183var members = ns.GetMembers();
Shared\Extensions\ITypeSymbolExtensions.cs (1)
144from member in typeSymbol.GetMembers().OfType<TSymbol>()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (9)
198return type.GetMembers().WhereAsArray(m => m.DeclaredAccessibility == Accessibility.Public && 204return type.GetMembers(); 299return type.GetMembers().WhereAsArray(m => m.Kind != SymbolKind.NamedType && 304return type.GetMembers(); 461foreach (var member in type.GetMembers()) 515=> type.GetMembers(); 568foreach (var member in containingType.GetMembers()) 591foreach (var member in containingType.GetMembers()) 612foreach (var member in type.GetMembers())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IPropertySymbolExtensions.cs (1)
12=> property.ContainingType.GetMembers()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (6)
152from interfaceMember in iface.GetMembers() 550return ((INamedTypeSymbol)symbol).GetMembers().OfType<IPropertySymbol>().Where(p => p.CanBeReferencedByName); 671if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p.Name == WellKnownMemberNames.IsCompleted && p.Type.SpecialType == SpecialType.System_Boolean && p.GetMethod != null)) 676var methods = returnType.GetMembers().OfType<IMethodSymbol>(); 705.SelectMany(x => x.GetMembers()) 745.SelectMany(x => x.GetMembers())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (3)
440return types.SelectMany(x => x.GetMembers().OfType<T>().Where(m => m.IsAccessibleWithin(within))); 505return types.SelectMany(x => x.GetMembers().OfType<T>().Where(m => m.IsAccessibleWithin(within))); 693foreach (var member in type.GetMembers())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AnonymousTypeSymbolKey.cs (2)
22var properties = symbol.GetMembers().OfType<IPropertySymbol>().ToImmutableArray(); 39var contextualProperties = contextualSymbol?.GetMembers().OfType<IPropertySymbol>().ToImmutableArray() ?? [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
302? containingType.GetMembers()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
22var orderedExistingConstants = enumType.GetMembers()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (2)
176foreach (var field in enumType.GetMembers().OfType<IFieldSymbol>()) 195foreach (var field in enumType.GetMembers().OfType<IFieldSymbol>())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (2)
154return namedType.GetMembers(); 157return namedType.GetMembers()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\INamedTypeSymbolExtensions.cs (1)
32namedType.GetMembers().WhereAsArray(s => s is not INamedTypeSymbol),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
505return containingType.GetMembers()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (1)
165return (disposableType, disposableType?.GetMembers().OfType<IMethodSymbol>().FirstOrDefault(m => m.Parameters.Length == 0 && m.Name == methodName));
Microsoft.CodeAnalysis.Workspaces.UnitTests (5)
SymbolKeyTests.cs (5)
785var a_b_m = a_b.GetMembers().Single(s => s.Name == "M"); 793var a_string_b_m = a_string_b.GetMembers().Single(s => s.Name == "M"); 799var a_string_b_int_m = a_string_b_int.GetMembers().Single(s => s.Name == "M"); 807var a_b_int_m = a_b_int.GetMembers().Single(s => s.Name == "M"); 1538foreach (var member in container.GetMembers())
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Parser.cs (1)
649foreach (IFieldSymbol fs in currentClassType.GetMembers().OfType<IFieldSymbol>())
Microsoft.Extensions.Options.SourceGeneration (2)
Parser.cs (2)
276var members = modelType.GetMembers().ToList(); 286var baseMembers = baseType.GetMembers().Where(m => !addedMembers.Contains(m.Name));
Microsoft.Gen.ComplianceReports (3)
Parser.cs (3)
142foreach (var property in typeSymbol.GetMembers().OfType<IPropertySymbol>()) 147foreach (var field in typeSymbol.GetMembers().OfType<IFieldSymbol>()) 204var methods = typeSymbol.GetMembers().OfType<IMethodSymbol>();
Microsoft.Gen.ContextualOptions (1)
Parser.cs (1)
77.GetMembers()
Microsoft.Gen.Logging (4)
Parsing\Parser.cs (2)
326lt.AllMembers.AddRange(methodSymbol.ContainingType.GetMembers().Select(x => x.Name)); 647foreach (ISymbol ms in currentClassType.GetMembers())
Parsing\Parser.LogProperties.cs (1)
98var members = namedType.GetMembers();
Parsing\Parser.Records.cs (1)
47var members = namedType.GetMembers();
Microsoft.Gen.Logging.Unit.Tests (3)
LogParserUtilitiesTests.cs (3)
50.Setup(x => x.GetMembers()) 84.Setup(x => x.GetMembers()) 166.Setup(x => x.GetMembers())
Microsoft.Gen.Metrics (3)
Parser.cs (3)
636foreach (var member in strongTypeSymbol.GetMembers()) 881foreach (var member in namedTypeSymbol.GetMembers()) 912foreach (var member in parentObjectBase.GetMembers())
Microsoft.Gen.MetricsReports (3)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (3)
636foreach (var member in strongTypeSymbol.GetMembers()) 881foreach (var member in namedTypeSymbol.GetMembers()) 912foreach (var member in parentObjectBase.GetMembers())
Microsoft.Interop.ComInterfaceGenerator (2)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (1)
65foreach (var method in type.GetMembers().OfType<IMethodSymbol>().Where(m => !m.IsStatic && m.IsAbstract))
ComMethodInfo.cs (1)
43foreach (var member in data.ifaceSymbol.GetMembers())
Microsoft.Interop.SourceGeneration (1)
TypeSymbolExtensions.cs (1)
156foreach (IFieldSymbol field in type.GetMembers().OfType<IFieldSymbol>())
Microsoft.ML.InternalCodeAnalyzer (2)
BaseTestClassAnalyzer.cs (1)
74foreach (var member in namedType.GetMembers())
ContractsCheckNameofFixProvider.cs (1)
139foreach (IFieldSymbol s in type.GetMembers().Where(p => p.Kind == SymbolKind.Field))
Microsoft.VisualStudio.LanguageServices (9)
ExtractClass\VisualStudioExtractClassOptionsService.cs (1)
53var membersInType = selectedType.GetMembers().
Library\ObjectBrowser\AbstractListItemFactory.cs (2)
317var members = namedTypeSymbol.GetMembers(); 375foreach (var member in namedTypeSymbol.GetMembers())
MoveStaticMembers\VisualStudioMoveStaticMembersOptionsService.cs (1)
101var membersInType = selectedType.GetMembers().
Progression\SymbolContainment.cs (1)
72foreach (var member in namedType.GetMembers())
ProjectSystem\AbstractEntryPointFinder.cs (1)
27foreach (var member in symbol.GetMembers())
PullMemberUp\VisualStudioPullMemberUpService.cs (1)
44var membersInType = containingType.GetMembers().
Venus\ContainedLanguageCodeSupport.cs (2)
109var methods = type.GetMembers().OfType<IMethodSymbol>().Where(m => m.CompatibleSignatureToDelegate((INamedTypeSymbol)eventType)); 301: type.GetMembers();
Microsoft.VisualStudio.LanguageServices.UnitTests (4)
CommonControls\MemberSelectionViewModelTests.vb (1)
185Dim membersInType = memberSymbol.ContainingType.GetMembers().WhereAsArray(Function(member) MemberAndDestinationValidator.IsMemberValid(member))
CommonControls\NewTypeDestinationSelectionViewModelTests.vb (1)
238Dim extractableMembers = DirectCast(symbol, INamedTypeSymbol).GetMembers().Where(Function(s) Not (TypeOf s Is IMethodSymbol) OrElse DirectCast(s, IMethodSymbol).MethodKind <> MethodKind.Constructor)
ExtractInterface\ExtractInterfaceViewModelTests.vb (1)
301Dim extractableMembers = DirectCast(symbol, INamedTypeSymbol).GetMembers().Where(Function(s) Not (TypeOf s Is IMethodSymbol) OrElse DirectCast(s, IMethodSymbol).MethodKind <> MethodKind.Constructor)
PullMemberUp\PullMemberUpViewModelTest.vb (1)
258Dim membersInType = memberSymbol.ContainingType.GetMembers().WhereAsArray(Function(member) MemberAndDestinationValidator.IsMemberValid(member))
Mvc.Api.Analyzers.Test (4)
ActualApiResponseMetadataFactoryTest.cs (2)
76var method = (IMethodSymbol)returnType.GetMembers().First(); 412var method = (IMethodSymbol)returnType.GetMembers().First();
SymbolApiResponseMetadataProviderTest.cs (2)
296var method = (IMethodSymbol)controller.GetMembers().First(); 318var method = (IMethodSymbol)controller.GetMembers().First();
SemanticSearch.BuildTask (1)
GenerateFilteredReferenceAssembliesTask.cs (1)
214Recurse(type.GetMembers());
System.Private.CoreLib.Generators (1)
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (1)
152foreach (var member in typeSymbol.GetMembers())
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
926ImmutableArray<ISymbol> members = currentType.GetMembers();
System.Text.RegularExpressions.Generator (2)
UpgradeToGeneratedRegexAnalyzer.cs (1)
69ImmutableArray<ISymbol> allMembers = regexTypeSymbol.GetMembers();
UpgradeToGeneratedRegexCodeFixer.cs (1)
246foreach (ISymbol member in symbol.GetMembers())
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationAnalyzer.cs (1)
62.GetMembers()
System.Windows.Forms.Analyzers.VisualBasic (1)
Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationDiagnosticAnalyzer.vb (1)
64Dim shouldSerializeMethod As IMethodSymbol = classSymbol.GetMembers().
System.Windows.Forms.PrivateSourceGenerators (1)
System\Windows\Forms\SourceGenerators\EnumValidationInfo.cs (1)
18foreach (ISymbol member in enumType.GetMembers())