4 implementations of IsExtensionMethod
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractMethodSymbol.cs (1)
83public virtual bool IsExtensionMethod => false;
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\MethodSymbol.cs (1)
313bool IMethodSymbol.IsExtensionMethod => _underlying.IsExtensionMethod;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\MethodSymbol.vb (1)
917Private ReadOnly Property IMethodSymbol_IsExtensionMethod As Boolean Implements IMethodSymbol.IsExtensionMethod
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractMethodSymbol.cs (1)
83public virtual bool IsExtensionMethod => false;
49 references to IsExtensionMethod
ConfigurationSchemaGenerator (2)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (1)
86Debug.Assert(targetMethod.IsExtensionMethod);
RuntimeSource\Configuration.Binder\Parser\BinderInvocation.cs (1)
56IsExtensionMethod: true,
Microsoft.AspNetCore.App.Analyzers (1)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
185else if (invocation.TargetMethod.IsExtensionMethod && !invocation.TargetMethod.Parameters.IsEmpty)
Microsoft.AspNetCore.Mvc.Analyzers (2)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
185else if (invocation.TargetMethod.IsExtensionMethod && !invocation.TargetMethod.Parameters.IsEmpty)
ViewFeaturesAnalyzerContext.cs (1)
30if (!method.IsExtensionMethod)
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
185else if (invocation.TargetMethod.IsExtensionMethod && !invocation.TargetMethod.Parameters.IsEmpty)
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (4)
HubClientProxyGenerator.Parser.cs (2)
62if (!symbol.IsExtensionMethod) 155if (!methodSymbol.IsExtensionMethod)
HubServerProxyGenerator.Parser.cs (2)
62if (!symbol.IsExtensionMethod) 145if (!methodSymbol.IsExtensionMethod)
Microsoft.CodeAnalysis.CodeStyle (2)
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UpdateExpressionState.cs (1)
263useSpread = method.GetOriginalUnreducedDefinition() is not IMethodSymbol { IsExtensionMethod: true, Parameters: [_, { Type: ITypeParameterSymbol }] };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
261=> symbol is IMethodSymbol { IsExtensionMethod: true };
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (1)
241if (containingMethod.IsExtensionMethod && parameterIndex == 0)
Microsoft.CodeAnalysis.CSharp (2)
SymbolDisplay\SymbolDisplayVisitor.Members.cs (2)
293if (symbol.IsExtensionMethod && Format.ExtensionMethodStyle != SymbolDisplayExtensionMethodStyle.Default) 782hasThisParameter: symbol.IsExtensionMethod && symbol.MethodKind != MethodKind.ReducedExtension,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ParameterGenerator.cs (1)
82methodSymbol.IsExtensionMethod)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Editing\CSharpImportAdder.cs (1)
120if (member is IMethodSymbol method && method.IsExtensionMethod)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\OperatorTests.cs (2)
7651Assert.False(symbol1.IsExtensionMethod); 8425Assert.False(symbol1.IsExtensionMethod);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (2)
1722symbol.Kind == SymbolKind.Method && (((IMethodSymbol)symbol).IsExtensionMethod || ((IMethodSymbol)symbol).MethodKind == MethodKind.ReducedExtension); 1885symbol.Kind == SymbolKind.Method && (((IMethodSymbol)symbol).IsExtensionMethod || ((IMethodSymbol)symbol).MethodKind == MethodKind.ReducedExtension);
Symbols\ExtensionMethodTests.cs (2)
228Assert.True(gooSymbol.IsExtensionMethod); 231Assert.True(gooOriginal.IsExtensionMethod);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
CompilationTestUtils.cs (2)
122Assert.True(reducedFrom.IsExtensionMethod); 123Assert.True(reducedMethod.IsExtensionMethod);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ParameterGenerator.cs (1)
82methodSymbol.IsExtensionMethod)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Editing\CSharpImportAdder.cs (1)
120if (member is IMethodSymbol method && method.IsExtensionMethod)
Microsoft.CodeAnalysis.Features (7)
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (1)
535if (methodSymbol.IsExtensionMethod)
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.SymbolComputer.cs (1)
400if (!method.IsExtensionMethod || method.Parameters.IsEmpty || !IsAccessible(method, internalsVisible))
InlineMethod\AbstractInlineMethodRefactoringProvider.cs (1)
103if (!calleeMethodSymbol.IsOrdinaryMethod() && !calleeMethodSymbol.IsExtensionMethod)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (1)
629var extension = method.IsExtensionMethod || method.MethodKind == MethodKind.ReducedExtension;
Shared\Extensions\ISymbolExtensions_2.cs (1)
104else if (methodSymbol.IsExtensionMethod ||
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UpdateExpressionState.cs (1)
263useSpread = method.GetOriginalUnreducedDefinition() is not IMethodSymbol { IsExtensionMethod: true, Parameters: [_, { Type: ITypeParameterSymbol }] };
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (1)
241if (containingMethod.IsExtensionMethod && parameterIndex == 0)
Microsoft.CodeAnalysis.VisualBasic (3)
SymbolDisplay\SymbolDisplayVisitor.Members.vb (2)
169If symbol.IsExtensionMethod AndAlso Format.ExtensionMethodStyle <> SymbolDisplayExtensionMethodStyle.Default Then 427AddParametersIfRequired(isExtensionMethod:=method.IsExtensionMethod AndAlso method.MethodKind <> MethodKind.ReducedExtension,
Symbols\MethodSymbol.vb (1)
917Private ReadOnly Property IMethodSymbol_IsExtensionMethod As Boolean Implements IMethodSymbol.IsExtensionMethod
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Editing\VisualBasicImportAdder.vb (1)
107If method?.IsExtensionMethod Then
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
Classification\SyntaxClassification\NameSyntaxClassifier.vb (1)
283If methodSymbol IsNot Nothing AndAlso methodSymbol.IsExtensionMethod Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Editing\VisualBasicImportAdder.vb (1)
107If method?.IsExtensionMethod Then
Microsoft.CodeAnalysis.Workspaces (2)
Editing\SyntaxGenerator.cs (1)
329isExtension: symbol is { Ordinal: 0, ContainingSymbol: IMethodSymbol { IsExtensionMethod: true } },
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
261=> symbol is IMethodSymbol { IsExtensionMethod: true };
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Parser.cs (1)
246IsExtensionMethod = logMethodSymbol.IsExtensionMethod,
Microsoft.Gen.Logging (1)
Parsing\Parser.cs (1)
380IsExtensionMethod = methodSymbol.IsExtensionMethod,
Microsoft.Gen.Metrics (1)
Parser.cs (1)
450IsExtensionMethod = methodSymbol.IsExtensionMethod,
Microsoft.Gen.MetricsReports (1)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (1)
450IsExtensionMethod = methodSymbol.IsExtensionMethod,
Microsoft.VisualStudio.LanguageServices (1)
Progression\GraphBuilder.cs (1)
515if (symbol.IsExtensionMethod)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
ObjectBrowser\DescriptionBuilder.cs (1)
228if (methodSymbol.IsExtensionMethod)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
GlyphExtensionsTests.cs (1)
228methodTypeMock.SetupGet(s => s.IsExtensionMethod).Returns(isExtensionMethod);