6 implementations of GetMembers
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceOrTypeSymbol.cs (1)
33public ImmutableArray<ISymbol> GetMembers(string name)
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\NamespaceOrTypeSymbol.cs (1)
18ImmutableArray<ISymbol> INamespaceOrTypeSymbol.GetMembers(string name)
Microsoft.CodeAnalysis.Features (2)
MetadataAsSource\AbstractMetadataAsSourceService.AbstractWrappedNamespaceOrTypeSymbol.cs (1)
25public abstract ImmutableArray<ISymbol> GetMembers(string name);
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
108public override ImmutableArray<ISymbol> GetMembers(string name)
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\NamespaceOrTypeSymbol.vb (1)
272Private Function INamespaceOrTypeSymbol_GetMembers(name As String) As ImmutableArray(Of ISymbol) Implements INamespaceOrTypeSymbol.GetMembers
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceOrTypeSymbol.cs (1)
33public ImmutableArray<ISymbol> GetMembers(string name)
852 references to GetMembers
ConfigurationSchemaGenerator (5)
ConfigSchemaEmitter.cs (1)
388propertySymbol = typeSymbol.GetMembers(property.Name).FirstOrDefault() as IPropertySymbol;
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (4)
859if (current.GetMembers("Add").Any(member => 875if (current.GetMembers("Add").Any(member => 942_emitGenericParseEnum = _typeSymbols.Enum.GetMembers("Parse").Any(m => m is IMethodSymbol methodSymbol && methodSymbol.IsGenericMethod); 952var throwIfNullMethods = _typeSymbols.ArgumentNullException.GetMembers("ThrowIfNull");
ILLink.RoslynAnalyzer (9)
DataFlow\LocalDataFlowVisitor.cs (1)
179 var method = assemblyType.GetMembers (methodName).OfType<IMethodSymbol> ().SingleOrDefault ();
RequiresAssemblyFilesAnalyzer.cs (6)
72 var isDynamicCodeSupportedProperty = runtimeFeaturesType.GetMembers ("IsAssemblyFilesSupported").OfType<IPropertySymbol> ().FirstOrDefault (); 86 ImmutableArrayOperations.AddIfNotNull (dangerousPatternsBuilder, ImmutableArrayOperations.TryGetSingleSymbol<IPropertySymbol> (assemblyType.GetMembers ("Location"))); 89 dangerousPatternsBuilder.AddRange (assemblyType.GetMembers ("GetFile").OfType<IMethodSymbol> ()); 90 dangerousPatternsBuilder.AddRange (assemblyType.GetMembers ("GetFiles").OfType<IMethodSymbol> ()); 95 ImmutableArrayOperations.AddIfNotNull (dangerousPatternsBuilder, ImmutableArrayOperations.TryGetSingleSymbol<IPropertySymbol> (assemblyNameType.GetMembers ("CodeBase"))); 96 ImmutableArrayOperations.AddIfNotNull (dangerousPatternsBuilder, ImmutableArrayOperations.TryGetSingleSymbol<IPropertySymbol> (assemblyNameType.GetMembers ("EscapedCodeBase")));
RequiresDynamicCodeAnalyzer.cs (1)
132 var isDynamicCodeSupportedProperty = runtimeFeaturesType.GetMembers ("IsDynamicCodeSupported").OfType<IPropertySymbol> ().FirstOrDefault ();
RequiresUnreferencedCodeAnalyzer.cs (1)
75 var isDynamicCodeSupportedProperty = runtimeFeaturesType.GetMembers ("IsUnreferencedCodeSupported").OfType<IPropertySymbol> ().FirstOrDefault ();
Microsoft.Analyzers.Extra (17)
CallAnalysis\Arrays.cs (2)
86foreach (var method in freezer.GetMembers("ToFrozenDictionary").OfType<IMethodSymbol>().Where(m => m.TypeParameters.Length == 2)) 95foreach (var method in freezer.GetMembers("ToFrozenSet").OfType<IMethodSymbol>().Where(m => m.TypeParameters.Length == 1))
CallAnalysis\CallAnalyzer.Registrar.cs (3)
75foreach (var method in type.GetMembers(m).OfType<IMethodSymbol>()) 153foreach (var prop in type.GetMembers(m).OfType<IPropertySymbol>()) 209foreach (var method in type.GetMembers(m).OfType<IMethodSymbol>())
CallAnalysis\LegacyLogging.cs (7)
22legacyMethods.AddRange(loggerExtensions.GetMembers("LogTrace").OfType<IMethodSymbol>()); 23legacyMethods.AddRange(loggerExtensions.GetMembers("LogDebug").OfType<IMethodSymbol>()); 24legacyMethods.AddRange(loggerExtensions.GetMembers("LogInformation").OfType<IMethodSymbol>()); 25legacyMethods.AddRange(loggerExtensions.GetMembers("LogWarning").OfType<IMethodSymbol>()); 26legacyMethods.AddRange(loggerExtensions.GetMembers("LogError").OfType<IMethodSymbol>()); 27legacyMethods.AddRange(loggerExtensions.GetMembers("LogCritical").OfType<IMethodSymbol>()); 28legacyMethods.AddRange(loggerExtensions.GetMembers("Log").OfType<IMethodSymbol>());
CallAnalysis\Split.cs (1)
18if (memExt == null || memExt.GetMembers("Split").IsEmpty)
CallAnalysis\StartsEndsWith.cs (2)
22var startsWith = stringType.GetMembers("StartsWith").OfType<IMethodSymbol>() 28var endsWith = stringType.GetMembers("EndsWith").OfType<IMethodSymbol>()
CallAnalysis\ValueTuple.cs (1)
32foreach (var method in type.GetMembers("Create").OfType<IMethodSymbol>())
Utilities\CompilationExtensions.cs (1)
13return type != null && type.GetMembers("ProcessPath").Length > 0;
Microsoft.Analyzers.Local (5)
CallAnalysis\CallAnalyzer.Registrar.cs (3)
75foreach (var method in type.GetMembers(m).OfType<IMethodSymbol>()) 153foreach (var prop in type.GetMembers(m).OfType<IPropertySymbol>()) 209foreach (var method in type.GetMembers(m).OfType<IMethodSymbol>())
CallAnalysis\ToInvariantString.cs (2)
30foreach (var method in reg.Compilation.GetSpecialType(type).GetMembers("ToString").OfType<IMethodSymbol>()) 47var invariantCulture = cultureInfo?.GetMembers("InvariantCulture").OfType<IPropertySymbol>().SingleOrDefault();
Microsoft.AspNetCore.Analyzers.Test (4)
StartupFactsTest.cs (4)
119var methods = type.GetMembers(methodName).Cast<IMethodSymbol>(); 144var methods = type.GetMembers(methodName).Cast<IMethodSymbol>(); 167var methods = type.GetMembers(methodName).Cast<IMethodSymbol>(); 189var methods = type.GetMembers(methodName).Cast<IMethodSymbol>();
Microsoft.AspNetCore.App.Analyzers (3)
RouteEmbeddedLanguage\Infrastructure\MvcDetector.cs (1)
31var members = disposable.GetMembers(nameof(IDisposable.Dispose));
src\Shared\RoslynUtils\ParsabilityHelper.cs (2)
75.SelectMany(t => t.GetMembers("TryParse")) 182var baseTypeBindAsyncMethods = candidate.GetMembers("BindAsync");
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
src\Shared\RoslynUtils\ParsabilityHelper.cs (2)
75.SelectMany(t => t.GetMembers("TryParse")) 182var baseTypeBindAsyncMethods = candidate.GetMembers("BindAsync");
Microsoft.AspNetCore.Mvc.Analyzers (2)
TagHelpersInCodeBlocksAnalyzer.cs (1)
161var members = tagHelperRunnerType.GetMembers(SymbolNames.RunAsyncMethodName);
TopLevelParameterNameAnalyzer.cs (1)
278var members = disposable?.GetMembers(nameof(IDisposable.Dispose));
Microsoft.AspNetCore.Mvc.Api.Analyzers (3)
ApiControllerSymbolCache.cs (2)
91var statusCodeActionResultStatusProperty = (IPropertySymbol?)statusCodeActionResult?.GetMembers("StatusCode")[0]; 98var members = disposable?.GetMembers(nameof(IDisposable.Dispose));
SymbolApiResponseMetadataProvider.cs (1)
110var conventionMethod = conventionType.GetMembers(conventionMethodName)
Microsoft.CodeAnalysis (12)
CodeGen\PermissionSetAttribute.cs (1)
85Debug.Assert(((INamedTypeSymbol)iSymbol).GetMembers(HexPropertyName).Any(
DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (2)
110var candidateMembers = containingSymbol.GetMembers(segment); 583var candidateMembers = containingSymbol.GetMembers(segment);
DocumentationCommentId.cs (7)
1165var members = container.GetMembers(memberName); 1190var members = container.GetMembers(memberName); 1211var members = container.GetMembers(memberName); 1232var members = containers[i].GetMembers(memberName); 1300var members = containers[i].GetMembers(memberName); 1351var members = containers[i].GetMembers(memberName); 1367var members = containers[i].GetMembers(memberName);
Operations\ControlFlowGraphBuilder.cs (1)
3338foreach (ISymbol candidate in valueType.GetMembers(method.Name))
Symbols\ISymbolExtensions.cs (1)
174var members = type.GetMembers(name);
Microsoft.CodeAnalysis.CodeStyle (17)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
43if (objectType?.GetMembers(nameof(GetHashCode)).FirstOrDefault() is not IMethodSymbol objectGetHashCodeMethod)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
885methodSymbol.ContainingType.GetMembers(suffix).Any(static m => m is IPropertySymbol);
src\Analyzers\Core\Analyzers\SimplifyLinqExpression\AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
80foreach (var whereMethodSymbol in enumerableType.GetMembers(nameof(Enumerable.Where)).OfType<IMethodSymbol>())
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (2)
156operation.OperatorMethod.ContainingType.GetMembers(WellKnownMemberNames.IncrementOperatorName).Length > 0) 176operation.OperatorMethod.ContainingType.GetMembers(WellKnownMemberNames.DecrementOperatorName).Length > 0)
src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (1)
37var referenceEqualsMethod = objectType.GetMembers(nameof(ReferenceEquals))
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (1)
87var referenceEqualsMethod = objectType?.GetMembers(nameof(ReferenceEquals))
src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (2)
110var candidateMembers = containingSymbol.GetMembers(segment); 583var candidateMembers = containingSymbol.GetMembers(segment);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\CompilationExtensions.cs (1)
77foreach (var candidateMember in candidateTopLevelType.GetMembers(WellKnownMemberNames.TopLevelStatementsEntryPointMethodName))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (1)
71return type.GetBaseTypesAndThis().SelectMany(t => t.GetMembers(symbol.Name))
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\IParameterSymbolExtensions.cs (1)
42foreach (var member in containingType.GetMembers(parameter.Name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
108foreach (var member in baseType.GetMembers(symbol.Name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
515return types.SelectMany(x => x.GetMembers(memberName).OfType<T>().Where(m => m.IsAccessibleWithin(within)));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
94var implementedInterfaceMembersWithSameName = implementedInterface.GetMembers(symbol.Name);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
303: containingType.GetMembers(metadataName);
Microsoft.CodeAnalysis.CodeStyle.Fixes (10)
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.State.cs (1)
61var existingMembers = TypeToGenerateIn.GetMembers(IdentifierToken.ValueText);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.State.cs (1)
82.GetMembers(IdentifierToken.ValueText)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (2)
144var existingMembers = TypeToGenerateIn.GetMembers(IdentifierToken.ValueText) 174&& ContainingType.GetMembers(WellKnownMemberNames.TopLevelStatementsEntryPointMethodName).IsEmpty;
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (1)
252foreach (var member in idisposable.GetMembers(nameof(IDisposable.Dispose)))
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
357baseTypes.Any(ts => ts.GetMembers(memberName)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
266baseName, n => containingType.GetMembers(n).IsEmpty);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
78.GetMembers(EqualsName)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (2)
132.GetMembers(nameof(IAsyncDisposable.DisposeAsync)) 148.GetMembers(nameof(IDisposable.Dispose))
Microsoft.CodeAnalysis.CSharp.CodeStyle (8)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.InfoCache.cs (3)
46var substringMethod = stringType.GetMembers(nameof(string.Substring)) 102.GetMembers(method.Name) 157sliceLikeMethod.ContainingType.GetMembers(nameof(Span<int>.Slice))
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs (3)
27=> type.GetMembers(name) 128=> type.GetMembers(WellKnownMemberNames.Indexer) 145: method.ContainingType.GetMembers(method.Name)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
490if (namedType.GetMembers(leftIdentifier.Identifier.ValueText).IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
937foreach (var sym in type.GetMembers(opName))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (2)
1103equatableType.GetMembers(nameof(Equals)).FirstOrDefault() is IMethodSymbol equatableEquals && 1110var objectEquals = objectType?.GetMembers(nameof(Equals)).FirstOrDefault() as IMethodSymbol;
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
88type.GetMembers("None").FirstOrDefault() is IFieldSymbol field && IsZero(field.ConstantValue))
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (14)
SymbolKey\SymbolKeyCompilationsTests.cs (5)
132var definition = type.GetMembers("M").First() as IMethodSymbol; 159var definition = type.GetMembers("M").First() as IMethodSymbol; 187var definition = type.GetMembers("Prop").First() as IPropertySymbol; 547var originalSymbols = typeSym1.GetMembers(WellKnownMemberNames.Indexer); 550var newSymbols = typeSym2.GetMembers(WellKnownMemberNames.Indexer);
SymbolKey\SymbolKeyMetadataVsSourceTests.cs (7)
74var member01 = (typesym.GetMembers("myEvent").Single() as IEventSymbol).Type; 77var member02 = (typesym.GetMembers("Prop").Single() as IPropertySymbol).Type; 83var member04 = (typesym.GetMembers("M").Single() as IMethodSymbol).Parameters[0].Type; 86var member05 = (typesym.GetMembers(WellKnownMemberNames.Indexer).Single() as IPropertySymbol).Type; 240var mem20_1 = typeA.GetMembers("GetFileInfo").Single() as IMethodSymbol; 241var mem20_2 = typeA.GetMembers("PrintInfo").Single() as IMethodSymbol; 255var mem40 = typeTest.GetMembers("Main").Single() as IMethodSymbol;
SymbolKey\SymbolKeyTests.cs (2)
122var type = compilation.GlobalNamespace.GetMembers("C").Single().GetMembers("Inner").Single(); 169var method = type.GetMembers("GetValue").OfType<IMethodSymbol>().Single();
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (25)
CodeGen\CodeGenDeconstructTests.cs (1)
259var firstDeconstructMethod = ((CSharpCompilation)comp.Compilation).GetTypeByMetadataName("C").GetMembers(WellKnownMemberNames.DeconstructMethodName)
CodeGen\CodeGenTupleTest.cs (23)
4492var stringItem1 = vt2.GetMembers("Item1")[0]; 4496var intItem2 = vt2.GetMembers("Item2")[0]; 5920Assert.Equal(loc1, tuple.GetMembers("i1").Single().Locations.Single()); 5921Assert.Equal(loc2, tuple.GetMembers("i2").Single().Locations.Single()); 6374Assert.True(tupleWithoutNames.GetMembers("Item1").Single().Locations.IsEmpty); 6399Assert.Equal(loc1, tuple.GetMembers("Item1").Single().Locations.Single()); 6400Assert.Equal(loc2, tuple.GetMembers("Item2").Single().Locations.Single()); 20500var members = c.GetMembers("I1<System.ValueTuple<System.Int32,System.Int32>>.M"); 20716var members = c.GetMembers("I1<System.ValueTuple<T,T>>.M"); 23448var m = (MethodSymbol)(((CSharpCompilation)comp.Compilation).GetTypeByMetadataName("ConsoleApplication5.C2").GetMembers("Goo").First()); 23504var m = (IMethodSymbol)(comp.Compilation.GetTypeByMetadataName("ConsoleApplication5.C2").GetMembers("Goo").First()); 23850var m = (MethodSymbol)(comp.GetTypeByMetadataName("ConsoleApplication5.C2").GetMembers("Goo").First()); 23903var m = (PropertySymbol)(((CSharpCompilation)comp.Compilation).GetTypeByMetadataName("ConsoleApplication5.C2").GetMembers("Goo").First()); 27397VerifyTypeFromCSharp((NamedTypeSymbol)((FieldSymbol)containingType.GetMembers("F0").Single()).Type, TupleUnderlyingTypeValue.Same, TupleUnderlyingTypeValue.Null, TupleUnderlyingTypeValue.Same, TupleUnderlyingTypeValue.Null, "System.ValueTuple", "()"); 27398VerifyTypeFromCSharp((NamedTypeSymbol)((FieldSymbol)containingType.GetMembers("F1").Single()).Type, TupleUnderlyingTypeValue.Same, TupleUnderlyingTypeValue.Null, TupleUnderlyingTypeValue.Same, TupleUnderlyingTypeValue.Null, "(System.Int32, System.Int32)", "(System.Int32, System.Int32)"); 27399VerifyTypeFromCSharp((NamedTypeSymbol)((FieldSymbol)containingType.GetMembers("F2").Single()).Type, TupleUnderlyingTypeValue.Distinct, TupleUnderlyingTypeValue.Distinct, TupleUnderlyingTypeValue.Same, TupleUnderlyingTypeValue.Null, "(System.Int32 A, System.Int32 B)", "(A As System.Int32, B As System.Int32)"); 27400VerifyTypeFromCSharp((NamedTypeSymbol)((FieldSymbol)containingType.GetMembers("F3").Single()).Type, TupleUnderlyingTypeValue.Same, TupleUnderlyingTypeValue.Null, TupleUnderlyingTypeValue.Null, TupleUnderlyingTypeValue.Null, "(System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object)", "(System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object)"); 27401VerifyTypeFromCSharp((NamedTypeSymbol)((FieldSymbol)containingType.GetMembers("F4").Single()).Type, TupleUnderlyingTypeValue.Distinct, TupleUnderlyingTypeValue.Distinct, TupleUnderlyingTypeValue.Null, TupleUnderlyingTypeValue.Null, "(System.Object, System.Object B, System.Object, System.Object D, System.Object, System.Object F, System.Object, System.Object H)", "(System.Object, B As System.Object, System.Object, D As System.Object, System.Object, F As System.Object, System.Object, H As System.Object)"); 27419VerifyTypeFromVisualBasic((INamedTypeSymbol)((IFieldSymbol)containingType.GetMembers("F0").Single()).Type, TupleUnderlyingTypeValue.Null, "System.ValueTuple", "System.ValueTuple"); 27420VerifyTypeFromVisualBasic((INamedTypeSymbol)((IFieldSymbol)containingType.GetMembers("F1").Single()).Type, TupleUnderlyingTypeValue.Distinct, "(System.Int32, System.Int32)", "(System.Int32, System.Int32)"); 27421VerifyTypeFromVisualBasic((INamedTypeSymbol)((IFieldSymbol)containingType.GetMembers("F2").Single()).Type, TupleUnderlyingTypeValue.Distinct, "(System.Int32 A, System.Int32 B)", "(A As System.Int32, B As System.Int32)"); 27422VerifyTypeFromVisualBasic((INamedTypeSymbol)((IFieldSymbol)containingType.GetMembers("F3").Single()).Type, TupleUnderlyingTypeValue.Distinct, "(System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object)", "(System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object)"); 27423VerifyTypeFromVisualBasic((INamedTypeSymbol)((IFieldSymbol)containingType.GetMembers("F4").Single()).Type, TupleUnderlyingTypeValue.Distinct, "(System.Object, System.Object B, System.Object, System.Object D, System.Object, System.Object F, System.Object, System.Object H)", "(System.Object, B As System.Object, System.Object, D As System.Object, System.Object, F As System.Object, System.Object, H As System.Object)");
CodeGen\FixedSizeBufferTests.cs (1)
576var f = (FieldSymbol)comp2.GlobalNamespace.GetTypeMembers("S")[0].GetMembers("x")[0];
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
OverloadResolutionPriorityTests.cs (3)
694var ms = c.GetMembers("M"); 987var ctors = attr!.GetMembers(".ctor"); 1477var indexers = c.GetMembers("this[]");
Microsoft.CodeAnalysis.CSharp.Features (16)
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (2)
321MethodDeclarationSyntax method => namedType.GetMembers(method.Identifier.ValueText).OfType<IMethodSymbol>().ToImmutableArray(), 322ConstructorDeclarationSyntax constructor => namedType.GetMembers(WellKnownMemberNames.InstanceConstructorName).OfType<IMethodSymbol>().ToImmutableArray(),
ConvertAutoPropertyToFullProperty\CSharpConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (1)
46return NameGenerator.GenerateUniqueName(fieldName, n => !(property.ContainingType.Name == n || property.ContainingType.GetMembers(n).Any()));
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (2)
1129var oldSynthesizedAutoProperty = (IPropertySymbol?)oldSymbol?.ContainingType.GetMembers(oldSymbol.Name).FirstOrDefault(m => m.IsSynthesizedAutoProperty()); 1130var newSynthesizedAutoProperty = (IPropertySymbol?)newSymbol?.ContainingType.GetMembers(newSymbol.Name).FirstOrDefault(m => m.IsSynthesizedAutoProperty());
GenerateConstructorFromMembers\CSharpGenerateConstructorFromMembersCodeRefactoringProvider.cs (1)
72return property.ContainingType.GetMembers(accessedMemberName).FirstOrDefault() as IFieldSymbol;
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.InfoCache.cs (3)
46var substringMethod = stringType.GetMembers(nameof(string.Substring)) 102.GetMembers(method.Name) 157sliceLikeMethod.ContainingType.GetMembers(nameof(Span<int>.Slice))
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs (3)
27=> type.GetMembers(name) 128=> type.GetMembers(WellKnownMemberNames.Indexer) 145: method.ContainingType.GetMembers(method.Name)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
490if (namedType.GetMembers(leftIdentifier.Identifier.ValueText).IsEmpty)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (2)
1103equatableType.GetMembers(nameof(Equals)).FirstOrDefault() is IMethodSymbol equatableEquals && 1110var objectEquals = objectType?.GetMembers(nameof(Equals)).FirstOrDefault() as IMethodSymbol;
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
88type.GetMembers("None").FirstOrDefault() is IFieldSymbol field && IsZero(field.ConstantValue))
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (2)
IOperation\IOperationTests_ICompoundAssignmentOperation.cs (1)
85var implicitSymbols = typeSymbol.GetMembers("op_Implicit").Cast<MethodSymbol>();
IOperation\IOperationTests_IFieldReferenceExpression.cs (1)
709var fieldSym = classSym.GetMembers("_field").Single();
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
InteractiveSessionTests.cs (1)
511return lookupType(c, typeName).GetMembers(memberName).Single();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (57)
Semantics\AccessCheckTests.cs (21)
747INamedTypeSymbol classK = classA.GetMembers("K").Single() as INamedTypeSymbol; 748IFieldSymbol privField = classA.GetMembers("priv").Single() as IFieldSymbol; 749IFieldSymbol pubField = classA.GetMembers("pub").Single() as IFieldSymbol; 750IFieldSymbol protField = classA.GetMembers("prot").Single() as IFieldSymbol; 751ITypeSymbol karrayType = (classA.GetMembers("karray").Single() as IFieldSymbol).Type; 752ITypeSymbol aarrayType = (classA.GetMembers("aarray").Single() as IFieldSymbol).Type; 753ITypeSymbol kptrType = (classA.GetMembers("kptr").Single() as IFieldSymbol).Type; 754ITypeSymbol aptrType = (classA.GetMembers("aptr").Single() as IFieldSymbol).Type; 755ITypeSymbol kinreturnfuncptrType = (classA.GetMembers("kinreturnfuncptr").Single() as IFieldSymbol).Type; 756ITypeSymbol kinparamfuncptr1Type = (classA.GetMembers("kinparamfuncptr1").Single() as IFieldSymbol).Type; 757ITypeSymbol kinparamfuncptr2Type = (classA.GetMembers("kinparamfuncptr2").Single() as IFieldSymbol).Type; 758ITypeSymbol afuncptrType = (classA.GetMembers("afuncptr").Single() as IFieldSymbol).Type; 759ITypeSymbol kenumType = (classA.GetMembers("kenum").Single() as IFieldSymbol).Type; 760ITypeSymbol aenumType = (classA.GetMembers("aenum").Single() as IFieldSymbol).Type; 764ITypeSymbol unknownType = (classA.GetMembers("unknowntype").Single() as IFieldSymbol).Type; 902INamedTypeSymbol Outer_Inner = Outer.GetMembers("Inner").Single() as INamedTypeSymbol; 903IFieldSymbol Outer_Inner_Field = Outer_Inner.GetMembers("Field").Single() as IFieldSymbol; 904IFieldSymbol Outer_Pointer = Outer.GetMembers("Pointer").Single() as IFieldSymbol; 905IFieldSymbol Outer_Protected = Outer.GetMembers("Protected").Single() as IFieldSymbol; 906IFieldSymbol Outer_ProtectedInternal = Outer.GetMembers("ProtectedInternal").Single() as IFieldSymbol; 907IFieldSymbol Outer_PrivateProtected = Outer.GetMembers("PrivateProtected").Single() as IFieldSymbol;
Semantics\BindingAsyncTests.cs (1)
34var method = (SourceMemberMethodSymbol)compilation.GlobalNamespace.GetTypeMembers("C").Single().GetMembers("M").Single();
Semantics\BindingTests.cs (6)
2600var t = (FieldSymbol)c.GetMembers("T").Single(); 2601var foo = (MethodSymbol)c.GetMembers("Foo").Single(); 2631var t = (FieldSymbol)c.GetMembers("T").Single(); 2632var foo = (MethodSymbol)c.GetMembers("Foo").Single(); 2660var t = (FieldSymbol)c.GetMembers("T").Single(); 2661var foo = (MethodSymbol)c.GetMembers("Foo").Single();
Semantics\ConstantTests.cs (2)
2951var symbol = compilation.GlobalNamespace.GetTypeMembers("c1").First().GetMembers("Z1").First(); 2954symbol = compilation.GlobalNamespace.GetTypeMembers("c1").First().GetMembers("Z2").First();
Semantics\ImplicitlyTypeArraysTests.cs (1)
36var method = (SourceMemberMethodSymbol)compilation.GlobalNamespace.GetTypeMembers("C").Single().GetMembers("F").Single();
Semantics\LambdaTests.cs (14)
1983Assert.Equal("void System.EventHandler.Invoke(System.Object sender, System.EventArgs e)", model.GetTypeInfo(node1).ConvertedType.GetMembers("Invoke").Single().ToTestDisplayString()); 2126Assert.NotEmpty(typeInfo.Type.GetMembers("SomePublicMember")); 2172Assert.NotEmpty(typeInfo.Type.GetMembers("Replace")); 2218Assert.NotEmpty(typeInfo.Type.GetMembers("Replace")); 2264Assert.NotEmpty(typeInfo.Type.GetMembers("Replace")); 2310Assert.NotEmpty(typeInfo.Type.GetMembers("Replace")); 2340Assert.NotEmpty(typeInfo.Type.GetMembers("IsHighSurrogate")); // check it is the char we know and love 2367Assert.NotEmpty(typeInfo.Type.GetMembers("Replace")); 2422Assert.NotEmpty(typeInfo.Type.GetMembers("Replace")); 2468Assert.NotEmpty(typeInfo.Type.GetMembers("Replace")); 2514Assert.NotEmpty(typeInfo.Type.GetMembers("Replace")); 2547Assert.NotEmpty(typeInfo.Type.GetMembers("Replace")); 2580Assert.NotEmpty(typeInfo.Type.GetMembers("Replace")); 2617Assert.NotEmpty(typeInfo.Type.GetMembers("Replace"));
Semantics\LookupTests.cs (3)
2008var ms = comp.GlobalNamespace.GetTypeMembers("Program").Single().GetMembers("M").OfType<MethodSymbol>(); 2039var m = comp.GlobalNamespace.GetTypeMembers("Program").Single().GetMembers("M").Single(); 2069var m = comp.GlobalNamespace.GetTypeMembers("Program").Single().GetMembers("M").Single();
Semantics\NameOfTests.cs (2)
3065Assert.Empty(typeofType.GetMembers("Count")); 3066Assert.Single(nameofType.GetMembers("Count"));
Semantics\NativeIntegerTests.cs (1)
522var members = type.GetMembers(memberName);
Semantics\OperatorTests.cs (1)
3202var method = (SourceMemberMethodSymbol)compilation.GlobalNamespace.GetTypeMembers("C").Single().GetMembers("M").Single();
Semantics\OverloadResolutionTestBase.cs (1)
35var method = (SourceMemberMethodSymbol)compilation.GlobalNamespace.GetTypeMembers("C").Single().GetMembers("M").Single();
Semantics\ReadOnlyStructsTests.cs (3)
1227static IMethodSymbol getMethod(INamedTypeSymbol symbol, string name) => (IMethodSymbol)symbol.GetMembers(name).Single(); 1228static IPropertySymbol getProperty(INamedTypeSymbol symbol, string name) => (IPropertySymbol)symbol.GetMembers(name).Single(); 1229static IEventSymbol getEvent(INamedTypeSymbol symbol, string name) => (IEventSymbol)symbol.GetMembers(name).Single();
Semantics\StructConstructorTests.cs (1)
4896var members = type.GetMembers(".ctor");
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (214)
Compilation\CompilationAPITests.cs (2)
2633Assert.Equal(loc1, type.GetMembers("m1").Single().Locations.Single()); 2634Assert.Equal(loc2, type.GetMembers("m2").Single().Locations.Single());
Compilation\ForEachStatementInfoTests.cs (8)
38var ge1 = (IMethodSymbol)e1.GetMembers("GetEnumerator").Single(); 39var mn1 = (IMethodSymbol)e1.GetMembers("MoveNext").Single(); 40var cur1 = (IPropertySymbol)e1.GetMembers("Current").Single(); 41var disp1 = (IMethodSymbol)e1.GetMembers("Dispose").Single(); 45var ge2 = (IMethodSymbol)e2.GetMembers("GetEnumerator").Single(); 46var mn2 = (IMethodSymbol)e2.GetMembers("MoveNext").Single(); 47var cur2 = (IPropertySymbol)e2.GetMembers("Current").Single(); 48var disp2 = (IMethodSymbol)e2.GetMembers("Dispose").Single();
Compilation\SemanticModelAPITests.cs (3)
469var v = a.GetMembers("v").Single() as FieldSymbol; 868var pMethodSym = pTypeSym.GetMembers("PM").Single(); 4452var method = (IMethodSymbol)comp.GetTypeByMetadataName("C").GetMembers("M").Single().GetPublicSymbol();
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (6)
2972var mems = sym1.GetMembers("M"); 2980var sym2 = sym1.GetMembers("IGoo").First() as INamedTypeSymbol; 2985var sym3 = sym1.GetMembers("SGoo").First() as INamedTypeSymbol; 2991var mems2 = sym3.GetMembers("M"); 3144var prop = typeA.GetMembers("Prop1").FirstOrDefault() as IPropertySymbol; 3152prop = typeA.GetMembers("Prop2").FirstOrDefault() as IPropertySymbol;
SymbolDisplay\SymbolDisplayTests.cs (12)
4675var goo = a.GetMembers("Goo").Single(); 4867var type = outer.GetMembers("Inner").Single(); 4868var method = outer.GetMembers("M").Single(); 4869var property = outer.GetMembers("P").Single(); 4870var field = outer.GetMembers("F").Single(); 4871var @event = outer.GetMembers("E").Single(); 4872var @delegate = outer.GetMembers("D").Single(); 4873var error = outer.GetMembers("Error").Single(); 5516var method = type.GetMembers("F").Single(); 5517var property = type.GetMembers("P").Single(); 5720var method = type.GetMembers("F").Single(); 5721var property = type.GetMembers("P").Single();
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (1)
1053var disposeMethod = (IMethodSymbol)compilation.GetSpecialType(SpecialType.System_IDisposable).GetMembers("Dispose").Single();
Symbols\DefaultInterfaceImplementationTests.cs (2)
6039var indexers = i1.GetMembers("this[]"); 44648Assert.Empty(compilation1.GetTypeByMetadataName("I1").GetMembers("I1"));
Symbols\InterfaceImplementationTests.cs (4)
1062var classDMethod1 = (MethodSymbol)classD.GetMembers("Method1").Single(); 1063var classDMethod2 = (MethodSymbol)classD.GetMembers("Method2").Single(); 1067var interfaceMethod1 = (MethodSymbol)@interface.GetMembers("Method1").Single(); 1068var interfaceMethod2 = (MethodSymbol)@interface.GetMembers("Method2").Single();
Symbols\Metadata\MetadataMemberTests.cs (22)
399Assert.Equal(1, classC.GetMembers(WellKnownMemberNames.StaticConstructorName).Length); 736Assert.NotEmpty(c.GetMembers("P1")); 737Assert.Empty(c.GetMembers("P2")); 738Assert.Empty(c.GetMembers("P3")); 743Assert.NotEmpty(c.GetMembers("P1")); 744Assert.NotEmpty(c.GetMembers("P2")); 745Assert.Empty(c.GetMembers("P3")); 750Assert.NotEmpty(c.GetMembers("P1")); 751Assert.NotEmpty(c.GetMembers("P2")); 752Assert.NotEmpty(c.GetMembers("P3")); 757Assert.NotEmpty(c.GetMembers("P1")); 758Assert.NotEmpty(c.GetMembers("P2")); 759Assert.Empty(c.GetMembers("P3")); 798Assert.NotEmpty(c.GetMembers("P1")); 799Assert.NotEmpty(c.GetMembers("P2")); 800Assert.Empty(c.GetMembers("P3")); 805Assert.NotEmpty(c.GetMembers("P1")); 806Assert.NotEmpty(c.GetMembers("P2")); 807Assert.NotEmpty(c.GetMembers("P3")); 812Assert.NotEmpty(c.GetMembers("P1")); 813Assert.NotEmpty(c.GetMembers("P2")); 814Assert.Empty(c.GetMembers("P3"));
Symbols\Metadata\PE\HasUnsupportedMetadata.cs (8)
166var f1 = c3.GetMembers("F1").Single(); 170var m1 = c3.GetMembers("M1").Single(); 178var e1 = c3.GetMembers("E1").Single(); 182var p1 = c3.GetMembers("P1").Single(); 370var f1 = c3.GetMembers("F1").Single(); 374var m1 = c3.GetMembers("M1").Single(); 382var e1 = c3.GetMembers("E1").Single(); 386var p1 = c3.GetMembers("P1").Single();
Symbols\Metadata\PE\NoPia.cs (3)
1236var varI5_Foo = varI5.GetMembers("Foo").OfType<MethodSymbol>().Single(); 1246var varI7_Foo = varI7.GetMembers("Foo").OfType<MethodSymbol>().Single(); 1247var varI7_Bar = varI7.GetMembers("Bar").OfType<MethodSymbol>().Single();
Symbols\MethodEqualityTests.cs (8)
37var class1Method1 = (MethodSymbol)class1.GetMembers("Method1").Single(); 38var class1Method2 = (MethodSymbol)class1.GetMembers("Method2").Single(); 41var class2Method1 = (MethodSymbol)class2.GetMembers("Method1").Single(); 84var baseClassMethod1 = (MethodSymbol)baseClass.GetMembers("Method").First(); 85var baseClassMethod2 = (MethodSymbol)baseClass.GetMembers("Method").Last(); 144var baseClassMethod1 = (MethodSymbol)baseClass.GetMembers("Method").First(); 145var baseClassMethod2 = (MethodSymbol)baseClass.GetMembers("Method").Last(); 203var classMethodDeclaration = (IMethodSymbol)@class.GetMembers("Method").Single();
Symbols\OverriddenOrHiddenMembersTests.cs (1)
2868var finalize = (MethodSymbol)obj.GetMembers("Finalize").Single();
Symbols\Retargeting\RetargetCustomAttributes.cs (6)
209FieldSymbol testField = testClass.GetMembers("testField").OfType<FieldSymbol>().Single(); 219PropertySymbol testProperty = testClass.GetMembers("TestProperty").OfType<PropertySymbol>().Single(); 233MethodSymbol testMethod = testClass.GetMembers("TestMethod").OfType<MethodSymbol>().Single(); 243MethodSymbol testMethod = testClass.GetMembers("TestMethod").OfType<MethodSymbol>().Single(); 255MethodSymbol testMethod = testClass.GetMembers("TestMethod").OfType<MethodSymbol>().Single(); 267MethodSymbol testMethod = testClass.GetMembers("TestMethod").OfType<MethodSymbol>().Single();
Symbols\Retargeting\RetargetCustomModifiers.cs (8)
47FieldSymbol f0 = modifiers.GetMembers("F0").OfType<FieldSymbol>().Single(); 57MethodSymbol m1 = modifiers.GetMembers("F1").OfType<MethodSymbol>().Single(); 59ParameterSymbol p2 = modifiers.GetMembers("F2").OfType<MethodSymbol>().Single().Parameters[0]; 61MethodSymbol m5 = modifiers.GetMembers("F5").OfType<MethodSymbol>().Single(); 64ParameterSymbol p6 = modifiers.GetMembers("F6").OfType<MethodSymbol>().Single().Parameters[0]; 66MethodSymbol m7 = modifiers.GetMembers("F7").OfType<MethodSymbol>().Single(); 165FieldSymbol volatileFld = modifiers.GetMembers("volatileFld").OfType<FieldSymbol>().Single(); 192MethodSymbol m1 = modifiers.GetMembers("F1").OfType<MethodSymbol>().Single();
Symbols\Retargeting\RetargetExplicitInterfaceImplementation.cs (24)
61var interfaceV1Method1 = (MethodSymbol)interfaceV1.GetMembers("Method1").Single(); 62var interfaceV1Method2 = (MethodSymbol)interfaceV1.GetMembers("Method2").Single(); 63var interfaceV1Method3 = (MethodSymbol)interfaceV1.GetMembers("Method3").Single(); 64var interfaceV1Method4 = (MethodSymbol)interfaceV1.GetMembers("Method4").Single(); 66var interfaceV1Property1 = (PropertySymbol)interfaceV1.GetMembers("Property1").Single(); 67var interfaceV1Property2 = (PropertySymbol)interfaceV1.GetMembers("Property2").Single(); 68var interfaceV1Property3 = (PropertySymbol)interfaceV1.GetMembers("Property3").Single(); 69var interfaceV1Property4 = (PropertySymbol)interfaceV1.GetMembers("Property4").Single(); 76var interfaceV1Event1 = (EventSymbol)interfaceV1.GetMembers("Event1").Single(); 77var interfaceV1Event2 = (EventSymbol)interfaceV1.GetMembers("Event2").Single(); 78var interfaceV1Event3 = (EventSymbol)interfaceV1.GetMembers("Event3").Single(); 79var interfaceV1Event4 = (EventSymbol)interfaceV1.GetMembers("Event4").Single(); 127var interfaceV2Method1 = (MethodSymbol)interfaceV2.GetMembers("Method1").Single(); 129var interfaceV2Method3 = (MethodSymbol)interfaceV2.GetMembers("Method3").Single(); 130var interfaceV2Method4 = (MethodSymbol)interfaceV2.GetMembers("Method4").Single(); 132var interfaceV2Property1 = (PropertySymbol)interfaceV2.GetMembers("Property1").Single(); 134var interfaceV2Property3 = (PropertySymbol)interfaceV2.GetMembers("Property3").Single(); 135var interfaceV2Property4 = (PropertySymbol)interfaceV2.GetMembers("Property4").Single(); 142var interfaceV2Event1 = (EventSymbol)interfaceV2.GetMembers("Event1").Single(); 144var interfaceV2Event3 = (EventSymbol)interfaceV2.GetMembers("Event3").Single(); 145var interfaceV2Event4 = (EventSymbol)interfaceV2.GetMembers("Event4").Single(); 389var interfaceV2Method1 = interfaceV2.GetMembers("Method1").Single(); 390var interfaceV2Property1 = interfaceV2.GetMembers("Property1").Single(); 391var interfaceV2Event1 = interfaceV2.GetMembers("Event1").Single();
Symbols\Source\DeclaringSyntaxNodeTests.cs (5)
203var f = s1.GetMembers("f").Single() as IFieldSymbol; 360var members = symbol.GetMembers(member.Name); 529var ev1 = c1.GetMembers("ev1").Single() as IEventSymbol; 530var prop3 = c1.GetMembers("Prop3").Single() as IPropertySymbol; 552var fieldT = c1.GetMembers("t").Single() as IFieldSymbol;
Symbols\Source\DelegateTests.cs (2)
73var d = a.GetMembers("D")[0] as NamedTypeSymbol; 108var field = a.GetMembers("Field")[0] as FieldSymbol;
Symbols\Source\FieldTests.cs (12)
63var sym = a.GetMembers("F").Single() as FieldSymbol; 91var f = a.GetMembers("F").Single() as FieldSymbol; 95var gs = a.GetMembers("G"); 120var fs = a.GetMembers("F"); 144var n1 = a.GetMembers("N1").Single() as FieldSymbol; 150var n2 = a.GetMembers("N2").Single() as FieldSymbol; 159var n3 = a.GetMembers("N3").Single() as FieldSymbol; 178var sym = a.GetMembers("F").Single() as FieldSymbol; 203var s = type2.GetMembers("M").Single() as MethodSymbol; 207var sym = type2.GetMembers("field1").Single() as FieldSymbol; 212sym = type2.GetMembers("field2").Single() as FieldSymbol; 217sym = type2.GetMembers("field3").Single() as FieldSymbol;
Symbols\Source\MethodTests.cs (16)
36var m = a.GetMembers("M").Single() as MethodSymbol; 141var m = a.GetMembers("M").Single() as MethodSymbol; 168var m1 = a.GetMembers("M1").Single() as MethodSymbol; 170var m2 = b.GetMembers("M2").Single() as MethodSymbol; 191var add = mylist.GetMembers("Add").Single() as MethodSymbol; 212var m = a.GetMembers("M"); 231var m = (MethodSymbol)a.GetMembers("M").Single(); 259var m = (MethodSymbol)a.GetMembers("M").Single(); 284var m = (MethodSymbol)a.GetMembers("M").Single(); 305var m = (MethodSymbol)a.GetMembers("M").Single(); 327var m = a.GetMembers("M").Single() as MethodSymbol; 343var m = a.GetMembers("M").Single() as MethodSymbol; 360var m = a.GetMembers("M").Single() as MethodSymbol; 404var m = a.GetMembers("M").Single() as MethodSymbol; 446var method = classTest.GetMembers("MethodWithRefOutArray").Single() as MethodSymbol; 1410var f1 = c.GetMembers("F1").Single() as MethodSymbol;
Symbols\Source\ModifierTests.cs (24)
50var m1 = a.GetMembers("M1").Single() as MethodSymbol; 53var m2 = a.GetMembers("M2").Single() as MethodSymbol; 55var m3 = a.GetMembers("M3").Single() as MethodSymbol; 57var m4 = a.GetMembers("M4").Single() as MethodSymbol; 59var m5 = a.GetMembers("M5").Single() as MethodSymbol; 61var m5_1 = a.GetMembers("M5_1").Single() as MethodSymbol; 64var m5_2 = a.GetMembers("M5_2").Single() as MethodSymbol; 67var m6 = a.GetMembers("M6").Single() as MethodSymbol; 69var m7 = a.GetMembers("M7").Single() as MethodSymbol; 71var m8 = a.GetMembers("M8").Single() as MethodSymbol; 75var m8_1 = a.GetMembers("M8_1").Single() as MethodSymbol; 79var m8_2 = a.GetMembers("M8_2").Single() as MethodSymbol; 83var m9 = a.GetMembers("M9").Single() as MethodSymbol; 86var m10 = a.GetMembers("M10").Single() as MethodSymbol; 89var m11 = a.GetMembers("M11").Single() as MethodSymbol; 92var m12 = a.GetMembers("M12").Single() as MethodSymbol; 113var m1 = script.GetMembers("M1").Single() as MethodSymbol; 115var m2 = script.GetMembers("M2").Single() as MethodSymbol; 117var m3 = script.GetMembers("M3").Single() as MethodSymbol; 119var m4 = script.GetMembers("M4").Single() as MethodSymbol; 121var m5 = script.GetMembers("M5").Single() as MethodSymbol; 123var m6 = script.GetMembers("M6").Single() as MethodSymbol; 125var m7 = script.GetMembers("M7").Single() as MethodSymbol; 127var m12 = script.GetMembers("M12").Single() as MethodSymbol;
Symbols\Source\NullablePublicAPITests.cs (2)
377return c.GetMembers("M1").OfType<IMethodSymbol>().Single().Parameters.ToArray(); 825ITypeParameterSymbol typeParameterSymbol = ((INamedTypeSymbol)((INamedTypeSymbol)method.ReturnType).GetMembers("B").Single()).TypeParameters.Single();
Symbols\Source\PropertyTests.cs (6)
362var p = a.GetMembers("P").SingleOrDefault() as PropertySymbol; 366p = a.GetMembers("P2").SingleOrDefault() as PropertySymbol; 370var q = i.GetMembers("Q").SingleOrDefault() as PropertySymbol; 410var prop = type01.GetMembers("Prop").Single() as PropertySymbol; 429prop = type02.GetMembers("Prop").Single() as PropertySymbol; 1925var xs = a.GetMembers("X");
Symbols\Source\SourcePlusMetadataTests.cs (2)
232var srcSym = classC.GetMembers("I1.Method").Single(); 237var metaSym = metaType.GetMembers("I1.Method").First();
Symbols\SymbolEqualityTests.cs (5)
170var nonNullSubstituted = nonNullM.ContainingType.GetMembers("M").Single(); 171var nullSubstituted = nullM.ContainingType.GetMembers("M").Single(); 781var field1 = (IFieldSymbol)((INamedTypeSymbol)model.GetDeclaredSymbol(member1Syntax)).GetMembers("field").Single(); // A<T!>! A<T>.field 832var method1 = (IMethodSymbol)((INamedTypeSymbol)model.GetDeclaredSymbol(member1Syntax)).GetMembers("M").Single(); // A<T!>! A<T>.M(A<T!>! t) 893var event1 = (IEventSymbol)((INamedTypeSymbol)model.GetDeclaredSymbol(member1Syntax)).GetMembers("MyEvent").Single(); // System.EventHandler<T!>! A<T>.MyEvent
Symbols\TypeTests.cs (22)
41var x = c.GetMembers("x").Single() as FieldSymbol; 468var field1 = classTest.GetMembers("intAryField").Single(); 483field1 = classTest.GetMembers("ulongAryField").Single(); 493var method = classTest.GetMembers("MethodWithArray").Single() as MethodSymbol; 639var obj = a.GetMembers("field1").Single(); 647var dyn = a.GetMembers("field2").Single(); 906var varA = classTest.GetMembers("a").First() as FieldSymbol; 929var memSym = typeSym.GetMembers("Main").First(); 1388var iGooGetGoo = comp.GetTypeByMetadataName("Bar+IGoo").GetMembers("GetGoo").Single(); 1506var mem = topType.GetMembers("field01").Single(); 1515mem = topType.GetMembers("field02").Single(); 1524mem = topType.GetMembers("Prop01").Single(); 1533mem = topType.GetMembers(WellKnownMemberNames.Indexer).Single(); 1549mem = topType.GetMembers("Method01").Single(); 1565mem = topType.GetMembers("Method02").Single(); 1615var mem = topType.GetMembers("efield").Single(); 1630mem = topType.GetMembers(WellKnownMemberNames.ImplicitConversionName).Single(); 1642mem = topType.GetMembers(WellKnownMemberNames.AdditionOperatorName).Single(); 1805var Dynamic = (Goo.GetMembers("X")[0] as FieldSymbol).Type; 1806var Object = (Goo.GetMembers("Y")[0] as FieldSymbol).Type; 1807var Func_Dynamic = (Goo.GetMembers("Z")[0] as FieldSymbol).Type; 1808var Func_Object = (Goo.GetMembers("W")[0] as FieldSymbol).Type;
Microsoft.CodeAnalysis.CSharp.Test.Utilities (5)
CompilingTestBase.cs (1)
26var method = (MethodSymbol)compilation.GlobalNamespace.GetTypeMembers(typeName).Single().GetMembers(methodName).Single();
Extensions.cs (4)
203return type.GetMembers("Equals").OfType<IMethodSymbol>().Single(m => m.Parameters is [{ Type: var parameterType }] && parameterType.Equals(type, SymbolEqualityComparer.Default)); 214return primaryConstructor.ContainingType.GetMembers("Deconstruct").OfType<IMethodSymbol>().Single( 269return lastContainer.GetMembers(string.Join(".", parts.Skip(i))); 277return lastContainer.GetMembers(parts[parts.Length - 1]);
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Rename\CSharpRenameRewriterLanguageService.cs (2)
803AddSymbolSourceSpans(conflicts, namedType.GetMembers(renamedSymbol.Name), reverseMappedLocations); 914if (renamedSymbol.ContainingType != null && renamedSymbol.ContainingType.GetMembers(renamedSymbol.Name).Contains(renamedSymbol))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
937foreach (var sym in type.GetMembers(opName))
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (49)
CodeGeneration\SymbolEditorTests.cs (25)
83Assert.Equal(1, newSymbol.GetMembers("m").Length); 115Assert.Equal(1, newSymbol.GetMembers("m").Length); 116Assert.Equal(0, newSymbol.GetMembers("m2").Length); 119Assert.Equal(1, newSymbol.GetMembers("m").Length); 120Assert.Equal(1, newSymbol.GetMembers("m2").Length); 152Assert.Equal(1, newSymbol.GetMembers("m").Length); 153Assert.Equal(0, newSymbol.GetMembers("m2").Length); 156Assert.Equal(1, newSymbol.GetMembers("m").Length); 157Assert.Equal(1, newSymbol.GetMembers("m2").Length); 199Assert.Equal(1, newSymbolA.GetMembers("ma").Length); 202Assert.Equal(1, newSymbolB.GetMembers("mb").Length); 245Assert.Equal(1, newSymbolA.GetMembers("ma").Length); 248Assert.Equal(1, newSymbolB.GetMembers("mb").Length); 360Assert.Equal(1, newSymbol.GetMembers("m").Length); 397Assert.Equal(1, newSymbol.GetMembers("m").Length); 438Assert.Equal(1, newSymbol.GetMembers("m").Length); 442Assert.Equal(1, newSymbol2.GetMembers("m").Length); 443Assert.Equal(1, newSymbol2.GetMembers("m2").Length); 484Assert.Equal(1, newSymbol.GetMembers("m").Length); 489Assert.Equal(1, newSymbol2.GetMembers("m").Length); 490Assert.Equal(1, newSymbol2.GetMembers("m2").Length); 530var member = symbol.GetMembers("m").First(); 534Assert.Equal(1, newSymbol.GetMembers("m").Length); 712var symbolX = symbol.GetMembers("X").First(); 713var symbolY = symbol.GetMembers("Y").First();
CodeGeneration\SyntaxGeneratorTests.cs (24)
981var operatorSymbol = (IMethodSymbol)comp.GetTypeByMetadataName("C").GetMembers(WellKnownMemberNames.CheckedIncrementOperatorName).Single(); 2168_emptyCompilation.GetTypeByMetadataName("System.IntPtr").GetMembers("ToPointer").Single()), 2227var method = type.GetMembers("M").Single(); 2248var method = type.GetMembers("M").Single(); 2269var method = type.GetMembers("M").Single(); 2290var method = type.GetMembers("M").Single(); 2311var method = type.GetMembers(WellKnownMemberNames.InstanceConstructorName).Single(); 2333var property = type.GetMembers("Prop").Single(); 2351var property = type.GetMembers("Prop").Single(); 2374var property = type.GetMembers("Accept").Single(); 2402var property = type.GetMembers("Accept").Single(); 2430var property = type.GetMembers("Accept").Single(); 2461var property = type.GetMembers("Accept").Single(); 2538var field = type.GetMembers("F").Single(); 2561var field = type.GetMembers("F").Single(); 2571var field = _emptyCompilation.GetSpecialType(SpecialType.System_UInt32).GetMembers(nameof(UInt32.MaxValue)).Single(); 2591var method = type.GetMembers(WellKnownMemberNames.DestructorName).Single(); 3783var symbolX = (IFieldSymbol)symbolC.GetMembers("X").First(); 3784var symbolY = (IFieldSymbol)symbolC.GetMembers("Y").First(); 3785var symbolZ = (IFieldSymbol)symbolC.GetMembers("Z").First(); 4691var symbol = comp.GlobalNamespace.GetMembers("C").First().GetMembers("M").First(); 4709var symbol = comp.GlobalNamespace.GetMembers("C").First().GetMembers("X").First(); 4726var symbol = comp.GlobalNamespace.GetMembers("C").First().GetMembers("MyEvent").First(); 4751var symbol = comp.GlobalNamespace.GetMembers("C2").First().GetMembers("MyEvent").First();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (141)
SymbolFinder\DependentTypeFinderTests.cs (1)
758var methodSymbol = classSymbol.GetMembers("M").Single();
Utilities\SymbolEquivalenceComparerTests.cs (140)
54var intField1 = (IFieldSymbol)type.GetMembers("intField1").Single(); 55var intArrayField1 = (IFieldSymbol)type.GetMembers("intArrayField1").Single(); 56var stringArrayField1 = (IFieldSymbol)type.GetMembers("stringArrayField1").Single(); 57var intArrayArrayField1 = (IFieldSymbol)type.GetMembers("intArrayArrayField1").Single(); 58var intArrayRank2Field1 = (IFieldSymbol)type.GetMembers("intArrayRank2Field1").Single(); 59var int32Field1 = (IFieldSymbol)type.GetMembers("int32Field1").Single(); 61var intField2 = (IFieldSymbol)type.GetMembers("intField2").Single(); 62var intArrayField2 = (IFieldSymbol)type.GetMembers("intArrayField2").Single(); 63var stringArrayField2 = (IFieldSymbol)type.GetMembers("stringArrayField2").Single(); 64var intArrayArrayField2 = (IFieldSymbol)type.GetMembers("intArrayArrayField2").Single(); 65var intArrayRank2Field2 = (IFieldSymbol)type.GetMembers("intArrayRank2Field2").Single(); 66var int32Field2 = (IFieldSymbol)type.GetMembers("int32Field2").Single(); 127var csharpIntField1 = (IFieldSymbol)csharpType.GetMembers("intField1").Single(); 128var csharpIntArrayField1 = (IFieldSymbol)csharpType.GetMembers("intArrayField1").Single(); 129var csharpStringArrayField1 = (IFieldSymbol)csharpType.GetMembers("stringArrayField1").Single(); 130var csharpIntArrayArrayField1 = (IFieldSymbol)csharpType.GetMembers("intArrayArrayField1").Single(); 131var csharpIntArrayRank2Field1 = (IFieldSymbol)csharpType.GetMembers("intArrayRank2Field1").Single(); 132var csharpInt32Field1 = (IFieldSymbol)csharpType.GetMembers("int32Field1").Single(); 134var vbIntField1 = (IFieldSymbol)vbType.GetMembers("intField1").Single(); 135var vbIntArrayField1 = (IFieldSymbol)vbType.GetMembers("intArrayField1").Single(); 136var vbStringArrayField1 = (IFieldSymbol)vbType.GetMembers("stringArrayField1").Single(); 137var vbIntArrayArrayField1 = (IFieldSymbol)vbType.GetMembers("intArrayArrayField1").Single(); 138var vbIntArrayRank2Field1 = (IFieldSymbol)vbType.GetMembers("intArrayRank2Field1").Single(); 139var vbInt32Field1 = (IFieldSymbol)vbType.GetMembers("int32Field1").Single(); 199var field1_v1 = type1_v1.GetMembers("field1").Single(); 200var field1_v2 = type1_v2.GetMembers("field1").Single(); 201var field2_v1 = type1_v1.GetMembers("field2").Single(); 202var field2_v2 = type2_v2.GetMembers("field2").Single(); 203var field3_v1 = type2_v1.GetMembers("field3").Single(); 204var field3_v2 = type2_v2.GetMembers("field3").Single(); 205var field4_v1 = type2_v1.GetMembers("field4").Single(); 206var field4_v2 = type1_v2.GetMembers("field4").Single(); 250var field1_v1 = type1_v1.GetMembers("field1").Single(); 251var field1_v2 = type1_v2.GetMembers("field1").Single(); 252var field2_v1 = type1_v1.GetMembers("field2").Single(); 253var field2_v2 = type2_v2.GetMembers("field2").Single(); 254var field3_v1 = type2_v1.GetMembers("field3").Single(); 255var field3_v2 = type2_v2.GetMembers("field3").Single(); 256var field4_v1 = type2_v1.GetMembers("field4").Single(); 257var field4_v2 = type1_v2.GetMembers("field4").Single(); 287var intInstantiation1 = (IFieldSymbol)typeC.GetMembers("intInstantiation1").Single(); 288var stringInstantiation = (IFieldSymbol)typeC.GetMembers("stringInstantiation").Single(); 289var instanceInstantiation = (IFieldSymbol)typeC.GetMembers("instanceInstantiation").Single(); 290var intInstantiation2 = (IFieldSymbol)typeD.GetMembers("intInstantiation2").Single(); 292var goo = typeC.GetMembers("goo").Single(); 293var goo_intInstantiation1 = intInstantiation1.Type.GetMembers("goo").Single(); 294var goo_stringInstantiation = stringInstantiation.Type.GetMembers("goo").Single(); 295var goo_instanceInstantiation = instanceInstantiation.Type.GetMembers("goo").Single(); 296var goo_intInstantiation2 = intInstantiation2.Type.GetMembers("goo").Single(); 331var method_v1 = type1_v1.GetMembers("Goo").Single(); 332var method_v2 = type1_v2.GetMembers("Goo").Single(); 356var method_v1 = type1_v1.GetMembers("Goo").Single(); 357var method_v2 = type1_v2.GetMembers("Goo1").Single(); 381var method_v1 = type1_v1.GetMembers("Goo").Single(); 382var method_v2 = type1_v2.GetMembers("Goo").Single(); 406var method_v1 = type1_v1.GetMembers("Goo").Single(); 407var method_v2 = type1_v2.GetMembers("Goo").Single(); 431var method_v1 = type1_v1.GetMembers("Goo").Single(); 432var method_v2 = type1_v2.GetMembers("Goo").Single(); 458var method_v1 = type1_v1.GetMembers("Goo").Single(); 459var method_v2 = type1_v2.GetMembers("Goo").Single(); 485var method_v1 = type1_v1.GetMembers("Goo").Single(); 486var method_v2 = type1_v2.GetMembers("Goo").Single(); 512var method_v1 = type1_v1.GetMembers("Goo").Single(); 513var method_v2 = type1_v2.GetMembers("Goo").Single(); 537var method_v1 = type1_v1.GetMembers("Goo").Single(); 538var method_v2 = type1_v2.GetMembers("Goo").Single(); 562var method_v1 = type1_v1.GetMembers("Goo").Single(); 563var method_v2 = type1_v2.GetMembers("Goo").Single(); 589var method_v1 = type1_v1.GetMembers("Goo").Single(); 590var method_v2 = type1_v2.GetMembers("Goo").Single(); 623var csharpGooMethod = csharpType1.GetMembers("Goo").Single(); 624var csharpBarMethod = csharpType1.GetMembers("Bar").Single(); 625var vbGooMethod = vbType1.GetMembers("Goo").Single(); 626var vbQuuxMethod = vbType1.GetMembers("Quux").Single(); 668var csharpGooMethod = csharpType1.GetMembers("Goo").Single(); 669var csharpBarMethod = csharpType1.GetMembers("Bar").Single(); 670var vbGooMethod = vbType1.GetMembers("Goo").Single(); 671var vbBarMethod = vbType1.GetMembers("Bar").Single(); 698var field1_v1 = type1_v1.GetMembers("field1").Single(); 699var field2_v1 = type1_v1.GetMembers("field2").Single(); 725var method_v1 = type1_v1.GetMembers("Goo").Single(); 726var method_v2 = type1_v2.GetMembers("Goo").Single(); 760var method_v1 = type1_v1.GetMembers("Goo").Single(); 761var method_v2 = type1_v2.GetMembers("Goo").Single(); 793var method_v1 = type1_v1.GetMembers("Goo").Single(); 794var method_v2 = type1_v2.GetMembers("Goo").Single(); 828var method_v1 = type1_v1.GetMembers("Goo").Single(); 829var method_v2 = type1_v2.GetMembers("Goo").Single(); 1084var method_v1 = type1_v1.GetMembers("Goo").Single(); 1085var method_v2 = type1_v2.GetMembers("Goo").Single(); 1115var method_v1 = type1_v1.GetMembers("M").Single(); 1116var method_v2 = type1_v2.GetMembers("M").Single(); 1155var method_v1 = type1_v1.GetMembers("M").Single(); 1156var method_v2 = type1_v2.GetMembers("M").Single(); 1185var method_v1 = type1_v1.GetMembers("M").Single(); 1186var method_v2 = type1_v2.GetMembers("M").Single(); 1215var method_v1 = type1_v1.GetMembers("M").Single(); 1216var method_v2 = type1_v2.GetMembers("M").Single(); 1246var method_v1 = type1_v1.GetMembers("M").Single(); 1247var method_v2 = type1_v2.GetMembers("M").Single(); 1277var method_v1 = type1_v1.GetMembers("M").Single(); 1278var method_v2 = type1_v2.GetMembers("M").Single(); 1309var method_v1 = type1_v1.GetMembers("M").Single(); 1310var method_v2 = type1_v2.GetMembers("M").Single(); 1346var a1 = ((IFieldSymbol)t1.GetMembers("A").Single()).Type; 1347var b1 = ((IFieldSymbol)t1.GetMembers("B").Single()).Type; 1348var c1 = ((IFieldSymbol)t1.GetMembers("C").Single()).Type; 1349var d1 = ((IFieldSymbol)t1.GetMembers("D").Single()).Type; 1350var a2 = ((IFieldSymbol)t2.GetMembers("A").Single()).Type; 1351var b2 = ((IFieldSymbol)t2.GetMembers("B").Single()).Type; 1352var c2 = ((IFieldSymbol)t2.GetMembers("C").Single()).Type; 1353var d2 = ((IFieldSymbol)t2.GetMembers("D").Single()).Type; 1410var a1 = ((IFieldSymbol)t1.GetMembers("A").Single()).Type; 1411var b1 = ((IFieldSymbol)t1.GetMembers("B").Single()).Type; 1412var c1 = ((IFieldSymbol)t1.GetMembers("C").Single()).Type; 1413var d1 = ((IFieldSymbol)t1.GetMembers("D").Single()).Type; 1414var a2 = ((IFieldSymbol)t2.GetMembers("A").Single()).Type; 1415var b2 = ((IFieldSymbol)t2.GetMembers("B").Single()).Type; 1416var c2 = ((IFieldSymbol)t2.GetMembers("C").Single()).Type; 1417var d2 = ((IFieldSymbol)t2.GetMembers("D").Single()).Type; 1473var a1 = ((IFieldSymbol)t1.GetMembers("A").Single()).Type; 1474var b1 = ((IFieldSymbol)t1.GetMembers("B").Single()).Type; 1475var c1 = ((IFieldSymbol)t1.GetMembers("C").Single()).Type; 1476var d1 = ((IFieldSymbol)t1.GetMembers("D").Single()).Type; 1477var a2 = ((IFieldSymbol)t2.GetMembers("A").Single()).Type; 1478var b2 = ((IFieldSymbol)t2.GetMembers("B").Single()).Type; 1479var c2 = ((IFieldSymbol)t2.GetMembers("C").Single()).Type; 1480var d2 = ((IFieldSymbol)t2.GetMembers("D").Single()).Type; 1536var a1 = ((IFieldSymbol)t1.GetMembers("A").Single()).Type; 1537var b1 = ((IFieldSymbol)t1.GetMembers("B").Single()).Type; 1538var c1 = ((IFieldSymbol)t1.GetMembers("C").Single()).Type; 1539var d1 = ((IFieldSymbol)t1.GetMembers("D").Single()).Type; 1540var a2 = ((IFieldSymbol)t2.GetMembers("A").Single()).Type; 1541var b2 = ((IFieldSymbol)t2.GetMembers("B").Single()).Type; 1542var c2 = ((IFieldSymbol)t2.GetMembers("C").Single()).Type; 1543var d2 = ((IFieldSymbol)t2.GetMembers("D").Single()).Type; 1840var f1 = type1.GetMembers("F"); 1841var f2 = type2.GetMembers("F"); 1888var method = type1.GetMembers(methodName).Single();
Microsoft.CodeAnalysis.Features (30)
AddImport\SymbolReferenceFinder.cs (1)
329return namedType.GetMembers(fieldOrPropertyName)
ChangeSignature\DelegateInvokeMethodReferenceFinder.cs (1)
48var beginInvoke = symbol.ContainingType.GetMembers(WellKnownMemberNames.DelegateBeginInvokeName).FirstOrDefault();
EditAndContinue\Utilities\Extensions.cs (1)
207=> (IMethodSymbol?)constructor.ContainingType.GetMembers(WellKnownMemberNames.DeconstructMethodName).FirstOrDefault(
EmbeddedLanguages\EmbeddedLanguageDetector.cs (1)
189.GetMembers(nameof(IFormattable.ToString))
FullyQualify\AbstractFullyQualifyService.cs (1)
206var member = container.GetMembers(name).FirstOrDefault();
GenerateComparisonOperators\GenerateComparisonOperatorsCodeRefactoringProvider.cs (2)
124foreach (var member in comparableType.GetMembers(nameof(IComparable<int>.CompareTo))) 243foreach (var member in containingType.GetMembers(GetOperatorName(kind)))
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (1)
126=> containingType.GetMembers(operatorName)
InitializeParameter\InitializeParameterHelpersCore.cs (1)
71baseName, n => containingType.GetMembers(n).IsEmpty);
PullMemberUp\MembersPuller.cs (1)
502return destination.GetMembers(fieldSymbol.Name).Any();
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (1)
64n => !methodSymbol.ContainingType.GetMembers(n).Any())
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (3)
144property.ContainingType.GetMembers(GetPrefix + name) 154.GetMembers(SetPrefix + name) 177n => !property.ContainingType.GetMembers(n).Any());
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
43if (objectType?.GetMembers(nameof(GetHashCode)).FirstOrDefault() is not IMethodSymbol objectGetHashCodeMethod)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
885methodSymbol.ContainingType.GetMembers(suffix).Any(static m => m is IPropertySymbol);
src\Analyzers\Core\Analyzers\SimplifyLinqExpression\AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
80foreach (var whereMethodSymbol in enumerableType.GetMembers(nameof(Enumerable.Where)).OfType<IMethodSymbol>())
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (2)
156operation.OperatorMethod.ContainingType.GetMembers(WellKnownMemberNames.IncrementOperatorName).Length > 0) 176operation.OperatorMethod.ContainingType.GetMembers(WellKnownMemberNames.DecrementOperatorName).Length > 0)
src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (1)
37var referenceEqualsMethod = objectType.GetMembers(nameof(ReferenceEquals))
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (1)
87var referenceEqualsMethod = objectType?.GetMembers(nameof(ReferenceEquals))
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.State.cs (1)
61var existingMembers = TypeToGenerateIn.GetMembers(IdentifierToken.ValueText);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.State.cs (1)
82.GetMembers(IdentifierToken.ValueText)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (2)
144var existingMembers = TypeToGenerateIn.GetMembers(IdentifierToken.ValueText) 174&& ContainingType.GetMembers(WellKnownMemberNames.TopLevelStatementsEntryPointMethodName).IsEmpty;
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (1)
252foreach (var member in idisposable.GetMembers(nameof(IDisposable.Dispose)))
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
357baseTypes.Any(ts => ts.GetMembers(memberName)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
266baseName, n => containingType.GetMembers(n).IsEmpty);
src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (2)
110var candidateMembers = containingSymbol.GetMembers(segment); 583var candidateMembers = containingSymbol.GetMembers(segment);
Microsoft.CodeAnalysis.Rebuild (1)
CompilationFactory.cs (1)
183.GetMembers(mainMethodName)
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\NamespaceOrTypeSymbol.vb (1)
272Private Function INamespaceOrTypeSymbol_GetMembers(name As String) As ImmutableArray(Of ISymbol) Implements INamespaceOrTypeSymbol.GetMembers
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicFlagsEnumGenerator.vb (1)
41Return enumType.GetMembers(name).Length = 1
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (4)
CodeGen\CodeGenTuples.vb (4)
6931Assert.Equal(loc1, tuple.GetMembers("i1").Single.Locations.Single()) 6932Assert.Equal(loc2, tuple.GetMembers("i2").Single.Locations.Single()) 7282Assert.Equal(loc1, tuple.GetMembers("i1").Single().Locations.Single()) 7283Assert.Equal(loc2, tuple.GetMembers("i2").Single().Locations.Single())
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (1)
Symbols\PlaceholderLocalSymbol.vb (1)
152Dim members = type.GetMembers(methodName)
Microsoft.CodeAnalysis.VisualBasic.Features (3)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (1)
375If targetType.GetMembers(handlesClauseItem.EventMember.Identifier.ValueText).Any() Then
Debugging\BreakpointResolver.vb (1)
22Dim members = type.GetMembers(name)
NavigationBar\VisualBasicNavigationBarItemService.vb (1)
225Dim finalizeMethods = type.GetMembers(WellKnownMemberNames.DestructorName)
Microsoft.CodeAnalysis.VisualBasic.Scripting.UnitTests (1)
InteractiveSessionTests.vb (1)
159Return lookupType(c, typeName).GetMembers(memberName).Single()
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Compilation\CompilationAPITests.vb (2)
1614Assert.Equal(loc1, type.GetMembers("m1").Single().Locations.Single()) 1615Assert.Equal(loc2, type.GetMembers("m2").Single().Locations.Single())
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (17)
SymbolDisplay\SymbolDisplayTests.vb (8)
4749Dim goo = a.GetMembers("Goo").Single() 4839Dim type = outer.GetMembers("Inner").Single() 4840Dim method = outer.GetMembers("M").Single() 4841Dim [property] = outer.GetMembers("P").Single() 4842Dim field = outer.GetMembers("F").Single() 4843Dim [event] = outer.GetMembers("E").Single() 4844Dim [delegate] = outer.GetMembers("D").Single() 4845Dim [error] = outer.GetMembers("Error").Single()
SymbolsTests\AnonymousTypes\AnonymousTypesSemanticsTests.vb (1)
162Dim members = symbol.GetMembers(member.Name)
SymbolsTests\Retargeting\RetargetCustomModifiers.vb (8)
38Dim f0 As FieldSymbol = modifiers.GetMembers("F0").OfType(Of FieldSymbol)().Single() 44Dim m1 As MethodSymbol = modifiers.GetMembers("F1").OfType(Of MethodSymbol)().Single() 46Dim p2 As ParameterSymbol = modifiers.GetMembers("F2").OfType(Of MethodSymbol)().Single().Parameters(0) 47Dim m5 As MethodSymbol = modifiers.GetMembers("F5").OfType(Of MethodSymbol)().Single() 49Dim p6 As ParameterSymbol = modifiers.GetMembers("F6").OfType(Of MethodSymbol)().Single().Parameters(0) 50Dim m7 As MethodSymbol = modifiers.GetMembers("F7").OfType(Of MethodSymbol)().Single() 117Dim volatileFld As FieldSymbol = modifiers.GetMembers("volatileFld").OfType(Of FieldSymbol)().Single() 135Dim m1 As MethodSymbol = modifiers.GetMembers("F1").OfType(Of MethodSymbol)().Single()
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
Rename\VisualBasicRenameRewriterLanguageService.vb (1)
784If renamedSymbol.ContainingType IsNot Nothing AndAlso renamedSymbol.ContainingType.GetMembers(renamedSymbol.Name).Contains(renamedSymbol) Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicFlagsEnumGenerator.vb (1)
41Return enumType.GetMembers(name).Length = 1
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (9)
CodeGeneration\SyntaxGeneratorTests.vb (9)
1093Dim additionOperatorSymbol = DirectCast(compilation.GetTypeByMetadataName("C").GetMembers(WellKnownMemberNames.AdditionOperatorName).Single(), IMethodSymbol) 2376Dim method = type.GetMembers("M").Single() 2397Dim method = type.GetMembers("Prop").Single() 2423Dim method = type.GetMembers("Prop").Single() 2444Dim method = type.GetMembers(WellKnownMemberNames.DestructorName).Single() 2464Dim field = type.GetMembers("F").Single() 3470Dim symbolX = DirectCast(symbolC.GetMembers("X").First(), IFieldSymbol) 3471Dim symbolY = DirectCast(symbolC.GetMembers("Y").First(), IFieldSymbol) 3472Dim symbolZ = DirectCast(symbolC.GetMembers("Z").First(), IFieldSymbol)
Microsoft.CodeAnalysis.Workspaces (27)
Editing\SyntaxGenerator.cs (2)
528var invoke = symbol.Type.GetMembers("Invoke").FirstOrDefault(m => m.Kind == SymbolKind.Method) as IMethodSymbol; 791TypeKind.Delegate => type.GetMembers(WellKnownMemberNames.DelegateInvokeName) is [IMethodSymbol invoke, ..]
FindSymbols\FindReferences\BaseTypeFinder.cs (1)
41foreach (var member in type.GetMembers(symbol.Name))
FindSymbols\FindReferences\Finders\NamedTypeSymbolReferenceFinder.cs (1)
42Add(result, symbol.GetMembers(WellKnownMemberNames.DestructorName));
FindSymbols\FindReferences\Finders\ParameterSymbolReferenceFinder.cs (1)
216var beginInvokeMethod = containingType.GetMembers(WellKnownMemberNames.DelegateBeginInvokeName)
FindSymbols\SymbolFinder_Hierarchy.cs (1)
64foreach (var m in type.GetMembers(symbol.Name))
Recommendations\AbstractRecommendationServiceRunner.cs (1)
218var methods = type.GetMembers(WellKnownMemberNames.DelegateInvokeName);
Rename\ConflictEngine\ConflictResolver.cs (2)
242var otherThingsNamedTheSame = renamedSymbol.ContainingType.GetMembers(renamedSymbol.Name) 277var otherThingsNamedTheSame = ((INamespaceOrTypeSymbol)renamedSymbol.ContainingSymbol).GetMembers(renamedSymbol.Name)
Rename\ConflictEngine\DeclarationConflictHelpers.cs (2)
18renamedMethod.ContainingType.GetMembers(renamedMethod.Name) 29renamedProperty.ContainingType.GetMembers(renamedProperty.Name)
Shared\Extensions\ITypeSymbolExtensions.cs (2)
97constructedInterface.GetMembers(interfaceMember.Name).FirstOrDefault( 167from member in baseType.GetMembers(constructedInterfaceMember.Name).OfType<TSymbol>()
Shared\Extensions\SemanticModelExtensions.cs (1)
61var mapped = containingType.GetMembers(methodSymbol.Name)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\CompilationExtensions.cs (1)
77foreach (var candidateMember in candidateTopLevelType.GetMembers(WellKnownMemberNames.TopLevelStatementsEntryPointMethodName))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (1)
71return type.GetBaseTypesAndThis().SelectMany(t => t.GetMembers(symbol.Name))
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\IParameterSymbolExtensions.cs (1)
42foreach (var member in containingType.GetMembers(parameter.Name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
108foreach (var member in baseType.GetMembers(symbol.Name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
515return types.SelectMany(x => x.GetMembers(memberName).OfType<T>().Where(m => m.IsAccessibleWithin(within)));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
94var implementedInterfaceMembersWithSameName = implementedInterface.GetMembers(symbol.Name);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
303: containingType.GetMembers(metadataName);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (2)
78.GetMembers(EqualsName) 443from method in baseType.GetMembers(EqualsName).OfType<IMethodSymbol>()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (1)
205from method in baseType.GetMembers(GetHashCodeName).OfType<IMethodSymbol>()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (2)
132.GetMembers(nameof(IAsyncDisposable.DisposeAsync)) 148.GetMembers(nameof(IDisposable.Dispose))
Microsoft.CodeAnalysis.Workspaces.UnitTests (14)
FindAllDeclarationsTests.cs (1)
185var expectedSymbol = (await solution.GetProject(submission0Id).GetCompilationAsync()).GlobalNamespace.GetMembers("Outer").SingleOrDefault().GetMembers("Inner").SingleOrDefault();
FindReferencesTests.cs (9)
104var symbol = (await project.GetCompilationAsync()).GetTypeByMetadataName("C").GetMembers("X").First(); 129var symbol = (IFieldSymbol)(await project.GetCompilationAsync()).GetTypeByMetadataName("C").GetMembers("X").First(); 328var boo = typeB.GetMembers("Boo").First(); 339boo = typeC.GetMembers("Boo").First(); 350boo = typeA.GetMembers("Boo").First(); 391var interfaceMethod = (IMethodSymbol)(await netStandardProject.GetCompilationAsync()).GetTypeByMetadataName("N.I").GetMembers("Get").First(); 437var nameProperty = compilation.GetTypeByMetadataName("A.C").GetMembers("Uri").Single(); 481var baseVirtualMethodSymbol = baseType.GetMembers("SomeMethod").Single(); 485var overriddenMethodSymbol = derivedType.GetMembers("SomeMethod").Single();
SymbolKeyTests.cs (3)
419var b = ((IMethodSymbol)compilation1.GlobalNamespace.GetTypeMembers("C").Single().GetMembers("M").Single()).Parameters[1]; 443var b = ((IMethodSymbol)compilation1.GlobalNamespace.GetTypeMembers("C").Single().GetMembers("M").Single()).Parameters[1]; 840.Where(n => !n.IsImplicitlyDeclared).Single().GetMembers("M").OfType<IMethodSymbol>().Single().TypeParameters.Single();
UtilityTest\DocumentationCommentIdTests.cs (1)
337var method = outerType.GetMembers("M").First() as IMethodSymbol;
Microsoft.Extensions.Options.SourceGeneration (4)
Emitter.cs (1)
92ImmutableArray<ISymbol> members = validatorTypeSymbol.GetMembers("TryValidateValue");
Parser.cs (1)
200.GetMembers("Validate")
ParserUtilities.cs (2)
81if (type.GetMembers(propertyName).OfType<IPropertySymbol>().Any(property => 95if (interfaceType.GetMembers(propertyName).OfType<IPropertySymbol>().Any(property =>
Microsoft.Gen.Logging (4)
Parsing\Parser.TagProvider.cs (1)
88var methodSymbols = providerType.GetMembers(providerMethodName).Where(m => m.Kind == SymbolKind.Method).Cast<IMethodSymbol>();
Parsing\TypeSymbolExtensions.cs (3)
20foreach (var member in sym.GetMembers("ToString")) 43foreach (var member in sym.GetMembers("ToString")) 82if (current.GetMembers("ToString").Where(m => m.Kind == SymbolKind.Method && m.DeclaredAccessibility == Accessibility.Public).Cast<IMethodSymbol>().Any(m => m.Parameters.Length == 0))
Microsoft.Interop.ComInterfaceGenerator (11)
Analyzers\RuntimeComApiUsageWithSourceGeneratedComAnalyzer.cs (11)
59methodsOfInterest.Add(marshalType.GetMembers("SetComObjectData")[0], firstArgumentTypeLookupOnly); 60methodsOfInterest.Add(marshalType.GetMembers("GetComObjectData")[0], firstArgumentTypeLookupOnly); 61methodsOfInterest.Add(marshalType.GetMembers("ReleaseComObject")[0], firstArgumentTypeLookupOnly); 62methodsOfInterest.Add(marshalType.GetMembers("FinalReleaseComObject")[0], firstArgumentTypeLookupOnly); 64foreach (var createAggregatedObject in marshalType.GetMembers("CreateAggregatedObject")) 76foreach (var createWrapperOfType in marshalType.GetMembers("CreateWrapperOfType")) 88methodsOfInterest.Add(marshalType.GetMembers("GetTypedObjectForIUnknown")[0], ImmutableArray.Create(CreateTypeOfArgumentTypeLookup(1))); 89methodsOfInterest.Add(marshalType.GetMembers("GetIUnknownForObject")[0], firstArgumentTypeLookupOnly); 90methodsOfInterest.Add(marshalType.GetMembers("GetIDispatchForObject")[0], firstArgumentTypeLookupOnly); 92foreach (var getComInterfaceForObject in marshalType.GetMembers("GetComInterfaceForObject")) 137var getObjectForIUnknown = marshalType.GetMembers("GetObjectForIUnknown")[0];
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\CustomMarshallerAttributeAnalyzer.cs (1)
985if (marshallerType.GetMembers(ShapeMemberNames.BufferSize).OfType<IPropertySymbol>().FirstOrDefault(prop => prop is { ReturnsByRef: false, ReturnsByRefReadonly: false, GetMethod: not null }) is null)
Microsoft.Interop.SourceGeneration (28)
MarshallerShape.cs (28)
207return type.GetMembers(ShapeMemberNames.Free) 217return type.GetMembers(ShapeMemberNames.GetPinnableReference) 260return type.GetMembers(ShapeMemberNames.Value.Stateless.ConvertToUnmanaged) 272IEnumerable<IMethodSymbol> methods = type.GetMembers(ShapeMemberNames.Value.Stateless.ConvertToUnmanaged) 291return type.GetMembers(ShapeMemberNames.Value.Stateless.ConvertToManaged) 300return type.GetMembers(ShapeMemberNames.Value.Stateless.ConvertToManagedFinally) 312return type.GetMembers(ShapeMemberNames.LinearCollection.Stateless.AllocateContainerForUnmanagedElements) 323IEnumerable<IMethodSymbol> methods = type.GetMembers(ShapeMemberNames.LinearCollection.Stateless.AllocateContainerForUnmanagedElements) 344return type.GetMembers(ShapeMemberNames.LinearCollection.Stateless.GetManagedValuesSource) 354return type.GetMembers(ShapeMemberNames.LinearCollection.Stateless.GetUnmanagedValuesDestination) 364return type.GetMembers(ShapeMemberNames.LinearCollection.Stateless.AllocateContainerForManagedElements) 374return type.GetMembers(ShapeMemberNames.LinearCollection.Stateless.AllocateContainerForManagedElementsFinally) 384return type.GetMembers(ShapeMemberNames.LinearCollection.Stateless.GetManagedValuesDestination) 394return type.GetMembers(ShapeMemberNames.LinearCollection.Stateless.GetUnmanagedValuesSource) 563return type.GetMembers(ShapeMemberNames.Value.Stateful.FromManaged) 574IEnumerable<IMethodSymbol> methods = type.GetMembers(ShapeMemberNames.Value.Stateful.FromManaged) 592return type.GetMembers(ShapeMemberNames.Value.Stateful.ToManaged) 600return type.GetMembers(ShapeMemberNames.Value.Stateful.ToManagedFinally) 608return type.GetMembers(ShapeMemberNames.Value.Stateful.ToUnmanaged) 615return type.GetMembers(ShapeMemberNames.Value.Stateful.FromUnmanaged) 654return type.GetMembers(ShapeMemberNames.Value.Stateful.Free) 661return type.GetMembers(ShapeMemberNames.Value.Stateful.OnInvoked) 668return type.GetMembers(ShapeMemberNames.GetPinnableReference) 677return type.GetMembers(ShapeMemberNames.GetPinnableReference) 688return type.GetMembers(ShapeMemberNames.LinearCollection.Stateful.GetManagedValuesSource) 697return type.GetMembers(ShapeMemberNames.LinearCollection.Stateful.GetUnmanagedValuesDestination) 706return type.GetMembers(ShapeMemberNames.LinearCollection.Stateful.GetManagedValuesDestination) 716return type.GetMembers(ShapeMemberNames.LinearCollection.Stateful.GetUnmanagedValuesSource)
Microsoft.VisualStudio.LanguageServices (2)
Venus\ContainedLanguageCodeSupport.cs (2)
425var membersOfName = type.GetMembers(memberName); 465var members = type.GetMembers(memberName).Where(m => m.Kind == SymbolKind.Method);
Mvc.Analyzers.Test (22)
CodeAnalysisExtensionsTest.cs (13)
27var method = (IMethodSymbol)testClass.GetMembers("Method").First(); 55var method = (IMethodSymbol)testClass.GetMembers("Method").First(); 92var method = (IMethodSymbol)testClass.GetMembers("Method").First(); 129var method = (IMethodSymbol)testClass.GetMembers("Method").First(); 166var method = (IMethodSymbol)testClass.GetMembers("Method").First(); 211var method = (IMethodSymbol)testClass.GetMembers("VirtualMethod").First(); 254var method = (IMethodSymbol)testClass.GetMembers("NotVirtualMethod").First(); 475var testMethod = (IMethodSymbol)testClass.GetMembers("SomeMethod").First(); 476var testProperty = (IPropertySymbol)testClass.GetMembers("SomeProperty").First(); 592var method = (IMethodSymbol)testClass.GetMembers("SomeMethod").First(); 626var method = (IMethodSymbol)testClass.GetMembers("SomeMethod").First(); 657var property = (IPropertySymbol)testClass.GetMembers("SomeProperty").First(); 691var property = (IPropertySymbol)testClass.GetMembers("SomeProperty").First();
TopLevelParameterNameAnalyzerTest.cs (9)
322var method = (IMethodSymbol)modelType.GetMembers("ActionMethod").First(); 412var method = (IMethodSymbol)modelType.GetMembers("ActionMethod").First(); 437var method = (IMethodSymbol)type.GetMembers("Action").First(); 462var method = (IMethodSymbol)type.GetMembers("Action").First(); 486var method = (IMethodSymbol)type.GetMembers("Action").First(); 510var method = (IMethodSymbol)type.GetMembers("Action").First(); 534var method = (IMethodSymbol)type.GetMembers("Action").First(); 557var method = (IMethodSymbol)type.GetMembers("Action").First(); 580var method = (IMethodSymbol)type.GetMembers("Action").First();
Mvc.Api.Analyzers.Test (37)
ActualApiResponseMetadataFactoryTest.cs (2)
370var method = (IMethodSymbol)type.GetMembers(methodName).First(); 393var method = (IMethodSymbol)Assert.Single(controllerType.GetMembers(test));
ApiControllerFactsTest.cs (6)
37var method = (IMethodSymbol)compilation.GetTypeByMetadataName("TestNamespace.TestController").GetMembers("Get").First(); 53var method = (IMethodSymbol)type.GetMembers(nameof(ApiConventionAnalyzerTest_IndexModel.OnGet)).First(); 69var method = (IMethodSymbol)type.GetMembers(nameof(ApiConventionAnalyzerTest_NotApiController.Index)).First(); 85var method = (IMethodSymbol)type.GetMembers(nameof(ApiConventionAnalyzerTest_NotAction.Index)).First(); 101var method = (IMethodSymbol)type.GetMembers(nameof(ApiConventionAnalyzerTest_Valid.Index)).First(); 117var method = (IMethodSymbol)type.GetMembers(nameof(IsApiControllerAction_ReturnsTrue_IfAttributeIsDeclaredOnAssemblyController.Action)).First();
MvcFactsTest.cs (4)
153var method = (IMethodSymbol)typeSymbol.GetMembers(methodName).First(); 185var method = typeSymbol.GetMembers(nameof(IDisposable.Dispose)).OfType<IMethodSymbol>().First(f => !f.ReturnsVoid); 200var method = (IMethodSymbol)typeSymbol.GetMembers(methodName).First(); 212return (IMethodSymbol)type.GetMembers(nameof(IDisposable.Dispose)).First();
SymbolApiConventionMatcherTest.cs (8)
432var method = (IMethodSymbol)testController.GetMembers(methodName).First(); 433var conventionMethod = (IMethodSymbol)testConvention.GetMembers(conventionMethodName).First(); 451var method = testConvention.GetMembers(nameof(TestConvention.MethodWithoutMatchBehavior)).First(); 469var method = testConvention.GetMembers(nameof(TestConvention.MethodWithRandomAttributes)).First(); 487var method = testConvention.GetMembers(nameof(TestConvention.Get)).First(); 505var method = (IMethodSymbol)testConvention.GetMembers(nameof(TestConvention.Get)).First(); 524var method = (IMethodSymbol)testConvention.GetMembers(nameof(TestConvention.MethodParameterWithRandomAttributes)).First(); 543var method = (IMethodSymbol)testConvention.GetMembers(nameof(TestConvention.MethodWithAnyTypeMatchBehaviorParameter)).First();
SymbolApiResponseMetadataProviderTest.cs (17)
19var method = (IMethodSymbol)controller.GetMembers(nameof(GetResponseMetadata_ControllerWithoutConvention.GetPerson)).First(); 37var method = (IMethodSymbol)controller.GetMembers(nameof(GetResponseMetadata_ControllerWithoutConvention.PostPerson)).First(); 55var method = (IMethodSymbol)controller.GetMembers(nameof(GetResponseMetadata_ControllerActionWithAttributes.ActionWithProducesAttribute)).First(); 73var method = (IMethodSymbol)controller.GetMembers(nameof(GetResponseMetadata_ControllerActionWithAttributes.ActionWithProducesResponseType_StatusCodeInConstructor)).First(); 96var method = (IMethodSymbol)controller.GetMembers(nameof(GetResponseMetadata_ControllerActionWithAttributes.ActionWithProducesResponseType_StatusCodeAndTypeInConstructor)).First(); 119var method = (IMethodSymbol)controller.GetMembers(nameof(GetResponseMetadata_ControllerActionWithAttributes.ActionWithProducesResponseType_StatusCodeInConstructorAndProperty)).First(); 142var method = (IMethodSymbol)controller.GetMembers(nameof(GetResponseMetadata_ControllerActionWithAttributes.ActionWithProducesResponseType_StatusCodeAndTypeInConstructorAndProperty)).First(); 165var method = (IMethodSymbol)controller.GetMembers(nameof(GetResponseMetadata_ControllerActionWithAttributes.ActionWithCustomProducesResponseTypeAttributeWithArguments)).First(); 187var method = (IMethodSymbol)controller.GetMembers(nameof(GetResponseMetadata_ControllerActionWithAttributes.GetResponseMetadata_ReturnsValuesFromApiConventionMethodAttribute)).First(); 218var method = (IMethodSymbol)controller.GetMembers(nameof(GetResponseMetadata_ControllerActionWithAttributes.GetResponseMetadata_WithProducesResponseTypeAndApiConventionMethod)).First(); 240var method = (IMethodSymbol)controller.GetMembers(nameof(GetResponseMetadata_ControllerActionWithAttributes.ActionWithCustomApiResponseMetadataProvider)).First(); 273var method = (IMethodSymbol)controller.GetMembers(methodName).First(); 392var method = (IMethodSymbol)controller.GetMembers(actionName).First(); 408var method = (IMethodSymbol)type.GetMembers("Action").First(); 426var method = (IMethodSymbol)type.GetMembers("Action").First(); 444var method = (IMethodSymbol)type.GetMembers("Action").First(); 462var method = (IMethodSymbol)type.GetMembers("Action").First();