25 overrides of MethodKind
Microsoft.CodeAnalysis.CSharp (25)
Lowering\IteratorRewriter\IteratorFinallyMethodSymbol.cs (1)
70public override MethodKind MethodKind
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.ConstructorSymbol.cs (1)
43public override MethodKind MethodKind
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.EqualsMethodSymbol.cs (1)
28public override MethodKind MethodKind
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.GetHashCodeMethodSymbol.cs (1)
32public override MethodKind MethodKind
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertyAccessorSymbol.cs (1)
29public override MethodKind MethodKind
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.ToStringMethodSymbol.cs (1)
32public override MethodKind MethodKind
Symbols\ErrorMethodSymbol.cs (1)
203public override MethodKind MethodKind
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
772public override MethodKind MethodKind => MethodKind.FunctionPointerSignature;
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
1131public override MethodKind MethodKind
Symbols\ReducedExtensionMethodSymbol.cs (1)
470public override MethodKind MethodKind
Symbols\SignatureOnlyMethodSymbol.cs (1)
93public override MethodKind MethodKind { get { return _methodKind; } }
Symbols\Source\LambdaSymbol.cs (1)
80public override MethodKind MethodKind
Symbols\Source\LocalFunctionSymbol.cs (1)
341public override MethodKind MethodKind => MethodKind.LocalFunction;
Symbols\Source\SourceMemberMethodSymbol.cs (1)
554public sealed override MethodKind MethodKind
Symbols\Synthesized\SynthesizedDelegateSymbol.cs (1)
96public override MethodKind MethodKind
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (1)
153public override MethodKind MethodKind
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (1)
248public override MethodKind MethodKind
Symbols\Synthesized\SynthesizedImplementationMethod.cs (1)
138public override MethodKind MethodKind
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (1)
188public sealed override MethodKind MethodKind
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (1)
129public override MethodKind MethodKind
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (1)
67public override MethodKind MethodKind
Symbols\Synthesized\SynthesizedPropertySymbol.cs (1)
59public override MethodKind MethodKind => MethodKind.PropertyGet;
Symbols\Synthesized\SynthesizedSealedPropertyAccessor.cs (1)
133public override MethodKind MethodKind
Symbols\Synthesized\SynthesizedStaticConstructor.cs (1)
191public override MethodKind MethodKind
Symbols\Wrapped\WrappedMethodSymbol.cs (1)
276public override MethodKind MethodKind
247 references to MethodKind
Microsoft.CodeAnalysis.CSharp (247)
Binder\Binder.cs (1)
787return symbol.IsExtensionBlockMember() && (symbol.IsStatic || symbol.MethodKind != MethodKind.Ordinary);
Binder\Binder.ValueChecks.cs (3)
1733canModifyReadonly = (containingMethod.MethodKind == desiredMethodKind) || 2204if (method.MethodKind == MethodKind.Constructor || method.IsInitOnly) 2878if (method.MethodKind == MethodKind.Constructor)
Binder\Binder_Await.cs (1)
179if (method.MethodKind == MethodKind.AnonymousFunction)
Binder\Binder_Conversions.cs (6)
2747Debug.Assert(analysis.Operator is { ParameterCount: 1 } and ({ MethodKind: MethodKind.Constructor } or { MethodKind: MethodKind.Ordinary, IsStatic: true, ContainingType.IsInterface: true })); 2749Debug.Assert(TypeSymbol.Equals(destination.StrippedType(), analysis.Operator.MethodKind == MethodKind.Constructor ? analysis.Operator.ContainingType : analysis.Operator.ReturnType, TypeCompareKind.AllIgnoreOptions)); 2766if (analysis.Operator.MethodKind == MethodKind.Constructor) 3372Debug.Assert(memberSymbol is not MethodSymbol { MethodKind: not MethodKind.Constructor } || 3377if (receiverOpt != null || memberSymbol is not MethodSymbol { MethodKind: MethodKind.Constructor })
Binder\Binder_Crefs.cs (1)
977MethodKind candidateMethodKind = candidateMethod.MethodKind;
Binder\Binder_Expressions.cs (9)
1567ContainingMember() is MethodSymbol { MethodKind: MethodKind.PropertyGet or MethodKind.PropertySet, AssociatedSymbol: PropertySymbol { IsIndexer: false } }) 2049return (containingMethod.MethodKind == MethodKind.AnonymousFunction || containingMethod.MethodKind == MethodKind.LocalFunction) && !IsInsideNameof; // false in EE evaluation method 2087(this.ContainingMember() is MethodSymbol { MethodKind: MethodKind.Constructor } containingMember && (object)containingMember != primaryCtor)) && // We are in a non-primary instance constructor 2160this.ContainingMemberOrLambda is MethodSymbol { MethodKind: MethodKind.AnonymousFunction or MethodKind.LocalFunction } && 4912Debug.Assert(constructor.MethodKind == MethodKind.Constructor || 4913constructor.MethodKind == MethodKind.StaticConstructor); // error scenario: constructor initializer on static constructor 6780Debug.Assert(constructor.MethodKind == MethodKind.Constructor || constructor.MethodKind == MethodKind.StaticConstructor);
Binder\Binder_Invocation.cs (2)
839if (result is null && finalApplicableCandidates[0].LeastOverriddenMember.MethodKind != MethodKind.LocalFunction) 928if (singleCandidate.MethodKind != MethodKind.LocalFunction)
Binder\Binder_Lookup.cs (1)
1448else if ((options & LookupOptions.MustBeOperator) != 0 && unwrappedSymbol is not MethodSymbol { MethodKind: MethodKind.UserDefinedOperator })
Binder\Binder_Statements.cs (2)
1839return (member as MethodSymbol)?.MethodKind == (isStatic ? 3886if (constructor.MethodKind != MethodKind.Constructor || constructor.IsExtern)
Binder\InMethodBinder.cs (3)
88internal override bool IsNestedFunctionBinder => _methodSymbol.MethodKind == MethodKind.LocalFunction; 273if (((MethodSymbol)newSymbol).MethodKind == MethodKind.LocalFunction) 309if (((MethodSymbol)newSymbol).MethodKind == MethodKind.LocalFunction)
Binder\LockBinder.cs (1)
126MethodKind: MethodKind.Ordinary,
Binder\MethodGroupResolution.cs (1)
104MethodGroup.Methods[0].MethodKind == MethodKind.LocalFunction;
Binder\Semantics\AccessCheck.cs (1)
196case SymbolKind.Method when ((MethodSymbol)symbol).MethodKind == MethodKind.LocalFunction:
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
4594Debug.Assert(candidate is MethodSymbol { MethodKind: MethodKind.UserDefinedOperator });
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
535Debug.Assert(firstSupported.Member is MethodSymbol { MethodKind: MethodKind.Constructor });
BoundTree\BoundBinaryOperator.UncommonData.cs (1)
74Debug.Assert(method is null or ErrorMethodSymbol { ParameterCount: 0 } or { MethodKind: MethodKind.UserDefinedOperator } or { ParameterCount: 2 });
BoundTree\BoundExpressionExtensions.cs (1)
145if (expr is BoundMethodGroup { Methods: not [{ MethodKind: MethodKind.LocalFunction }] } &&
BoundTree\BoundNodeExtensions.cs (1)
62return method.MethodKind == MethodKind.Constructor &&
CodeGen\CodeGenerator_HasHome.cs (2)
252return containingSymbol is MethodSymbol { MethodKind: MethodKind.StaticConstructor } or FieldSymbol { IsStatic: true }; 256return (containingSymbol is MethodSymbol { MethodKind: MethodKind.Constructor } or FieldSymbol { IsStatic: false } or MethodSymbol { IsInitOnly: true }) &&
CodeGen\EmitExpression.cs (1)
2218if (method.IsEffectivelyReadOnly && method.MethodKind != MethodKind.Constructor)
Compilation\CSharpCompilation.cs (1)
3188if (symbol.Kind == SymbolKind.Method && symbol.IsImplicitlyDeclared && ((MethodSymbol)symbol).MethodKind == MethodKind.Constructor)
Compilation\CSharpSemanticModel.cs (2)
1811case MethodSymbol { MethodKind: MethodKind.LambdaMethod }: 4806if (call.InvokedAsExtensionMethod && method.IsExtensionMethod && method.MethodKind != MethodKind.ReducedExtension)
Compilation\MemberSemanticModel.cs (1)
2382Debug.Assert(symbol is LocalSymbol or ParameterSymbol or MethodSymbol { MethodKind: MethodKind.LambdaMethod });
Compilation\MethodBodySemanticModel.cs (1)
240if (MemberSymbol is MethodSymbol methodSymbol && methodSymbol.MethodKind == MethodKind.Constructor &&
Compilation\SyntaxTreeSemanticModel.cs (1)
2452Debug.Assert(symbol is LocalSymbol or ParameterSymbol or MethodSymbol { MethodKind: MethodKind.LambdaMethod });
Compiler\ClsComplianceChecker.cs (1)
736if (method.MethodKind == MethodKind.DelegateInvoke)
Compiler\MethodBodySynthesizer.cs (1)
534Debug.Assert(method.MethodKind == MethodKind.Destructor);
Compiler\MethodCompiler.cs (7)
548(method.MethodKind == MethodKind.Constructor || method.IsScriptInitializer) ? processedInstanceInitializers : 549method.MethodKind == MethodKind.StaticConstructor ? processedStaticInitializers : 1123if ((methodSymbol.MethodKind == MethodKind.Constructor || methodSymbol.MethodKind == MethodKind.StaticConstructor) && 1911if (method.MethodKind == MethodKind.StaticConstructor && 2087if (method.MethodKind == MethodKind.Destructor && body != null) 2489if (method.MethodKind == MethodKind.Constructor && !method.IsExtern)
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (1)
115if (symbol.MethodKind == MethodKind.Conversion)
Emitter\Model\MethodSymbolAdapter.cs (5)
408return AdaptedMethodSymbol.MethodKind == MethodKind.Constructor; 657return this.MethodKind == MethodKind.Constructor 658|| this.MethodKind == MethodKind.StaticConstructor; 667Debug.Assert(this.MethodKind != MethodKind.Destructor); 671!(this.IsVirtual || this.IsOverride || this.IsAbstract || this.MethodKind == MethodKind.Destructor));
Emitter\Model\NamedTypeSymbolAdapter.cs (3)
361else if (method.MethodKind == MethodKind.Destructor && AdaptedNamedTypeSymbol.SpecialType != SpecialType.System_Object) 372if ((object)objectMethod != null && objectMethod.MethodKind == MethodKind.Destructor) 634if ((alwaysIncludeConstructors && method.MethodKind == MethodKind.Constructor) || method.GetCciAdapter().ShouldInclude(context))
Emitter\NoPia\EmbeddedMethod.cs (1)
70return UnderlyingMethod.AdaptedMethodSymbol.MethodKind == MethodKind.Constructor;
FlowAnalysis\AbstractFlowPass.cs (2)
1470if (method is null || method.MethodKind != MethodKind.Constructor) 1567Debug.Assert(method?.OriginalDefinition.MethodKind != MethodKind.LocalFunction);
FlowAnalysis\DefiniteAssignment.cs (6)
103&& CurrentSymbol is MethodSymbol { MethodKind: MethodKind.Constructor, ContainingType.TypeKind: TypeKind.Struct }; 1211Debug.Assert(CurrentSymbol is MethodSymbol { MethodKind: MethodKind.Constructor, ContainingType.TypeKind: TypeKind.Struct }); 1264if (CurrentSymbol is not MethodSymbol { MethodKind: MethodKind.Constructor, ContainingType.TypeKind: TypeKind.Struct }) 2328(currentMethod.MethodKind == MethodKind.AnonymousFunction || 2329currentMethod.MethodKind == MethodKind.LocalFunction) && 2371if (method.MethodKind == MethodKind.LocalFunction)
FlowAnalysis\DefiniteAssignment.LocalFunctions.cs (1)
163((MethodSymbol)symbol).MethodKind == MethodKind.LocalFunction)
FlowAnalysis\DefiniteAssignment.VariableIdentifier.cs (1)
36SymbolKind.Method when symbol is MethodSymbol m && m.MethodKind == MethodKind.LocalFunction => true,
FlowAnalysis\FlowAnalysisPass.cs (2)
76Debug.Assert(method.MethodKind != MethodKind.AnonymousFunction); 116Debug.Assert(method.MethodKind == MethodKind.Constructor);
FlowAnalysis\NullableWalker.cs (9)
516Debug.Assert(baseOrThisInitializer is null or { MethodKind: MethodKind.Constructor }); 1591return constructorBody is BoundConstructorMethodBody { Initializer: BoundExpressionStatement { Expression: BoundCall { Method: { MethodKind: MethodKind.Constructor } initializerMethod } } } 2291while (enclosingMemberMethod?.MethodKind is MethodKind.AnonymousFunction or MethodKind.LocalFunction) 7106|| method.MethodKind != MethodKind.Ordinary 9145if (((MethodSymbol)symbol).MethodKind == MethodKind.LocalFunction) 10603Debug.Assert(analysis.Operator is { ParameterCount: 1 } and ({ MethodKind: MethodKind.Constructor } or { MethodKind: MethodKind.Ordinary, IsStatic: true, ContainingType.IsInterface: true })); 10605Debug.Assert(TypeSymbol.Equals(targetTypeWithNullability.Type.StrippedType(), analysis.Operator.MethodKind == MethodKind.Constructor ? analysis.Operator.ContainingType : analysis.Operator.ReturnType, TypeCompareKind.AllIgnoreOptions)); 10680Debug.Assert(factory.MethodKind == MethodKind.Constructor);
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (2)
460if (node.Method.MethodKind == MethodKind.LocalFunction) 471if (node.MethodOpt?.MethodKind == MethodKind.LocalFunction)
Lowering\ClosureConversion\ClosureConversion.cs (10)
194_seenBaseCall = method.MethodKind != MethodKind.Constructor; // only used for ctors 208(localOrParameter as MethodSymbol)?.MethodKind == MethodKind.LocalFunction); 450originalMethod.MethodKind == MethodKind.LambdaMethod && 804if (_currentMethod.MethodKind == MethodKind.Constructor && 873var loweredSymbol = (node.Method.MethodKind is MethodKind.LambdaMethod or MethodKind.LocalFunction) ? 891Debug.Assert(localFunc.MethodKind == MethodKind.LocalFunction); 1086if (node.Method.MethodKind == MethodKind.LocalFunction) 1351if (node.MethodOpt?.MethodKind == MethodKind.LocalFunction) 1377if (node.TargetMethod.MethodKind == MethodKind.LocalFunction) 1687_currentMethod.MethodKind != MethodKind.StaticConstructor &&
Lowering\ClosureConversion\SynthesizedClosureMethod.cs (2)
39originalMethod is { MethodKind: MethodKind.LocalFunction } 108Debug.Assert(originalMethod is not { MethodKind: MethodKind.LocalFunction } || !originalMethod.IsStatic || IsStatic);
Lowering\DiagnosticsPass_ExpressionTrees.cs (4)
197var diagnostic = _staticLocalOrAnonymousFunction.MethodKind == MethodKind.LocalFunction 212var diagnostic = _staticLocalOrAnonymousFunction.MethodKind == MethodKind.LocalFunction 354else if (method.MethodKind == MethodKind.LocalFunction) 949if ((node.LookupSymbolOpt as MethodSymbol)?.MethodKind == MethodKind.LocalFunction)
Lowering\DiagnosticsPass_Warnings.cs (1)
367if ((object)op == null || op.MethodKind != MethodKind.UserDefinedOperator) continue;
Lowering\ExtensionMethodBodyRewriter.cs (1)
151switch (symbol?.MethodKind)
Lowering\ExtensionMethodReferenceRewriter.cs (1)
77Debug.Assert(node.Method.MethodKind == MethodKind.LocalFunction || node.Method.IsStatic || node.ReceiverOpt is not null);
Lowering\InitializerRewriter.cs (2)
22Debug.Assert((method.MethodKind == MethodKind.Constructor) || (method.MethodKind == MethodKind.StaticConstructor));
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (2)
143Debug.Assert(method.MethodKind != MethodKind.LocalFunction && method.MethodKind != MethodKind.AnonymousFunction);
Lowering\Instrumentation\ModuleCancellationInstrumenter.cs (5)
50if (method.MethodKind is not (MethodKind.Constructor or MethodKind.StaticConstructor) && 84if (isMethodBody && _factory.TopLevelMethod.MethodKind == MethodKind.StaticConstructor) 156if (method.MethodKind is not (MethodKind.Ordinary or MethodKind.Constructor)) 188methodDefinition.MethodKind == overload.MethodKind &&
Lowering\Instrumentation\StackOverflowProbingInstrumenter.cs (2)
40if (method.MethodKind is not (MethodKind.Constructor or MethodKind.StaticConstructor) && 74if (isMethodBody && _factory.TopLevelMethod.MethodKind == MethodKind.StaticConstructor)
Lowering\LocalRewriter\DelegateCacheRewriter.cs (2)
128if (targetMethod.MethodKind == MethodKind.LocalFunction) 167Debug.Assert(targetMethod.MethodKind == MethodKind.Ordinary);
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (3)
155node.Method.MethodKind == MethodKind.LocalFunction || 216if (conversion.Method.MethodKind == MethodKind.LocalFunction) 240node.MethodOpt?.MethodKind == MethodKind.LocalFunction;
Lowering\LocalRewriter\LocalRewriter_Call.cs (2)
194if (method.MethodKind is not MethodKind.Ordinary) 677var requiresInstanceReceiver = methodOrIndexer.RequiresInstanceReceiver() && methodOrIndexer is not MethodSymbol { MethodKind: MethodKind.Constructor } and not FunctionPointerMethodSymbol;
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (1)
1054if (asSpanMethod is MethodSymbol { MethodKind: MethodKind.Constructor } constructor)
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (7)
588&& _factory.TopLevelMethod.MethodKind != MethodKind.StaticConstructor // Avoid caching twice if people do it manually. 962Debug.Assert(analysis.Operator is { ParameterCount: 1 } and ({ MethodKind: MethodKind.Constructor } or { MethodKind: MethodKind.Ordinary, IsStatic: true, ContainingType.IsInterface: true })); 964Debug.Assert(TypeSymbol.Equals(rewrittenType.StrippedType(), analysis.Operator.MethodKind == MethodKind.Constructor ? analysis.Operator.ContainingType : analysis.Operator.ReturnType, TypeCompareKind.AllIgnoreOptions)); 1560Debug.Assert(conversion.Method is { ParameterCount: 1 } and ({ MethodKind: MethodKind.Constructor } or { MethodKind: MethodKind.Ordinary, IsStatic: true, ContainingType.IsInterface: true })); 1567if (factory is { MethodKind: MethodKind.Constructor } constructor)
Lowering\LocalRewriter\LocalRewriter_Literal.cs (1)
72if ((curMethod.MethodKind != MethodKind.SharedConstructor ||
Lowering\LocalRewriter\LocalRewriter_Range.cs (2)
165switch (constructionMethod.MethodKind) 198throw ExceptionUtilities.UnexpectedValue(constructionMethod.MethodKind);
Lowering\SyntheticBoundNodeFactory.cs (4)
77value.MethodKind != MethodKind.AnonymousFunction && 78value.MethodKind != MethodKind.LocalFunction) 146CurrentFunction.MethodKind == MethodKind.AnonymousFunction || 147CurrentFunction.MethodKind == MethodKind.LocalFunction ||
Symbols\Compilation_WellKnownMembers.cs (1)
312MethodKind methodKind = method.MethodKind;
Symbols\Extensions\SourceExtensionImplementationMethodSymbol.cs (1)
45public sealed override bool IsExtensionMethod => !_originalMethod.IsStatic && _originalMethod.MethodKind is MethodKind.Ordinary;
Symbols\MemberSymbolExtensions.cs (6)
419return methodSymbol.MethodKind == MethodKind.UserDefinedOperator || methodSymbol.MethodKind == MethodKind.Conversion; 439return symbol.Kind == SymbolKind.Method && ((MethodSymbol)symbol).MethodKind == MethodKind.Conversion; 606switch (method.MethodKind) 621if ((object)method != null && method.MethodKind == MethodKind.Constructor) 686return method.MethodKind == MethodKind.Constructor && method.ParameterCount == 0;
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
1399method.MethodKind == MethodKind.Destructor);
Symbols\Metadata\PE\PEParameterSymbol.cs (1)
908|| ContainingSymbol is MethodSymbol { MethodKind: MethodKind.Constructor or MethodKind.DelegateInvoke }
Symbols\MethodSymbol.cs (10)
382protected bool IsValidReadOnlyTarget => !IsStatic && ContainingType.IsStructType() && MethodKind != MethodKind.Constructor && !IsInitOnly; 602internal bool HasSetsRequiredMembers => MethodKind == MethodKind.Constructor && HasSetsRequiredMembersImpl; 668return MethodKind == MethodKind.Constructor && ContainingType.IsScriptClass; 684return ((MethodKind == MethodKind.Constructor || MethodKind == MethodKind.StaticConstructor) && IsImplicitlyDeclared); 695return MethodKind == MethodKind.Constructor && IsImplicitlyDeclared; 773if (!this.IsExtensionMethod || this.MethodKind == MethodKind.ReducedExtension || receiverType.IsVoidType()) 789return (this.IsExtensionMethod && this.MethodKind != MethodKind.ReducedExtension) ? ReducedExtensionMethodSymbol.Create(this) : null; 1057if (!IsStatic || IsAbstract || IsVirtual || MethodKind is not (MethodKind.Ordinary or MethodKind.LocalFunction)) 1217MethodKind is MethodKind.Ordinary
Symbols\MethodSymbolExtensions.cs (6)
24return method.IsImplicitlyDeclared && method.MethodKind == MethodKind.AnonymousFunction; 53if (!skipFirstMethodKindCheck && method.MethodKind == MethodKind.Destructor) 100if (hiddenMethod.MethodKind == MethodKind.Destructor) 126switch (method.MethodKind) 135return !method.IsStatic && hidingMember is MethodSymbol { IsStatic: false, MethodKind: MethodKind.UserDefinedOperator }; 223method.MethodKind is (MethodKind.Ordinary or MethodKind.ExplicitInterfaceImplementation or MethodKind.PropertyGet or MethodKind.PropertySet or MethodKind.UserDefinedOperator) &&
Symbols\NamedTypeSymbol.cs (8)
222if (candidate is MethodSymbol { MethodKind: MethodKind.UserDefinedOperator or MethodKind.Conversion } method) 233if (candidate is MethodSymbol { MethodKind: MethodKind.UserDefinedOperator or MethodKind.Conversion } method) 294Debug.Assert(method.MethodKind == MethodKind.Constructor); 302Debug.Assert(method.MethodKind == MethodKind.StaticConstructor); 374Debug.Assert(method.MethodKind != MethodKind.ReducedExtension); 487if ((options & LookupOptions.MustBeOperator) != 0 && member is not MethodSymbol { MethodKind: MethodKind.UserDefinedOperator }) 1963MethodKind: MethodKind.Ordinary, 2001Debug.Assert(ctor.MethodKind is MethodKind.Constructor);
Symbols\NativeIntegerTypeSymbol.cs (1)
100switch (underlyingMethod.MethodKind)
Symbols\OverriddenOrHiddenMembersHelpers.cs (3)
246bool accessorIsGetter = accessor.MethodKind == MethodKind.PropertyGet; 338bool accessorIsAdder = accessor.MethodKind == MethodKind.EventAdd; 881return MethodSymbol.CanOverrideOrHide(methodSymbol.MethodKind) && ReferenceEquals(methodSymbol, methodSymbol.ConstructedFrom);
Symbols\PublicModel\MethodSymbol.cs (2)
38switch (_underlying.MethodKind) 75throw ExceptionUtilities.UnexpectedValue(_underlying.MethodKind);
Symbols\ReducedExtensionMethodSymbol.cs (3)
40Debug.Assert(method.IsExtensionMethod && method.MethodKind != MethodKind.ReducedExtension); 75Debug.Assert(method.IsExtensionMethod && method.MethodKind != MethodKind.ReducedExtension); 117Debug.Assert(method.MethodKind != MethodKind.ReducedExtension);
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
1018method.MethodKind,
Symbols\Source\ExplicitInterfaceHelpers.cs (2)
101if (method.MethodKind != MethodKind.ExplicitInterfaceImplementation) 270(interfaceMethod.MethodKind is MethodKind.UserDefinedOperator or MethodKind.Conversion) != isOperator)
Symbols\Source\ParameterHelpers.cs (3)
227Debug.Assert(methodOwner?.MethodKind != MethodKind.LambdaMethod); 229methodOwner?.MethodKind == MethodKind.LocalFunction; 1124if (method.MethodKind != MethodKind.AnonymousFunction)
Symbols\Source\SourceComplexParameterSymbol.cs (1)
1389|| ContainingSymbol is MethodSymbol { MethodKind: MethodKind.Constructor or MethodKind.DelegateInvoke or MethodKind.LambdaMethod }
Symbols\Source\SourceMemberContainerSymbol.cs (17)
2272if (symbol is MethodSymbol { MethodKind: MethodKind.Conversion } conversion) 2381var methodKind = method1.MethodKind == MethodKind.Constructor ? MessageID.IDS_SK_CONSTRUCTOR : MessageID.IDS_SK_METHOD; 2394var methodName = (method1.MethodKind == MethodKind.Destructor && method2.MethodKind == MethodKind.Destructor) ? 2844if (member.Kind != SymbolKind.Method || ((MethodSymbol)member).MethodKind != MethodKind.Destructor) 4015if (member is MethodSymbol { IsImplicitlyDeclared: false, MethodKind: not (MethodKind.Constructor or MethodKind.StaticConstructor or MethodKind.Destructor or MethodKind.ExplicitInterfaceImplementation) } method && 4555if ((methodSymbol.MethodKind == MethodKind.Ordinary) && 4594if ((methodSymbol.MethodKind == MethodKind.Ordinary) && 4747switch (meth.MethodKind) 4770throw ExceptionUtilities.UnexpectedValue(meth.MethodKind); 4809switch (meth.MethodKind) 4825throw ExceptionUtilities.UnexpectedValue(meth.MethodKind); 4858if (m.MethodKind == MethodKind.Constructor && m.ParameterCount == 0) 4900if (hasInitializers && !builder.NonTypeMembersWithPartialImplementations.Any(member => member is MethodSymbol { MethodKind: MethodKind.Constructor })) 5045case MethodSymbol { MethodKind: not (MethodKind.Ordinary or MethodKind.Constructor) }: 5657switch (method.MethodKind) 6279if (member is MethodSymbol { MethodKind: MethodKind.Ordinary })
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (3)
552if (MethodSymbol.CanOverrideOrHide(method.MethodKind) && !method.IsAccessor()) 568else if (method.MethodKind == MethodKind.Destructor) 907!(overridingMemberIsMethod && ((MethodSymbol)overriddenMember).MethodKind == MethodKind.Destructor)) //destructors are metadata virtual
Symbols\Source\SourceMethodSymbol.cs (1)
289if (target.MethodKind == MethodKind.UserDefinedOperator && !target.IsStatic)
Symbols\Source\SourceMethodSymbolWithAttributes.cs (11)
153switch (MethodKind) 750else if (!this.CanBeReferencedByName || this.MethodKind == MethodKind.Destructor) 765else if (this is { MethodKind: MethodKind.LocalFunction, IsStatic: false }) 962if (MethodKind != MethodKind.Ordinary || this.IsExtensionBlockMember()) 1372if (MethodKind != MethodKind.Ordinary) 1489switch (this.MethodKind) 1519var errorCode = (this.MethodKind == MethodKind.Constructor || this.MethodKind == MethodKind.StaticConstructor) ? 1571if (this.MethodKind != MethodKind.LambdaMethod) 1673switch (this.MethodKind) 1757if (this.ContainingType.IsComImport && this.MethodKind == MethodKind.Constructor)
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1941&& !GetMembers().All(m => m is not MethodSymbol { MethodKind: MethodKind.Constructor, ObsoleteKind: ObsoleteAttributeKind.None } method
Symbols\Source\SourcePropertySymbolBase.cs (1)
1217Debug.Assert(thisAccessor.MethodKind == MethodKind.PropertySet);
Symbols\Source\ThisParameterSymbol.cs (1)
162if (_containingMethod?.MethodKind == MethodKind.Constructor)
Symbols\Symbol.cs (3)
674switch (method.MethodKind) 735switch (method.MethodKind) 1255this is MethodSymbol method && method.MethodKind == MethodKind.FunctionPointerSignature ?
Symbols\Symbol_Attributes.cs (2)
56switch (method.MethodKind) 678Debug.Assert(!binder.InAttributeArgument || this is MethodSymbol { MethodKind: MethodKind.LambdaMethod or MethodKind.LocalFunction }, "Possible cycle in attribute binding");
Symbols\SymbolExtensions.cs (5)
151if (method.MethodKind != MethodKind.AnonymousFunction && method.MethodKind != MethodKind.LocalFunction) break; 171if (method.MethodKind == MethodKind.AnonymousFunction || method.MethodKind == MethodKind.LocalFunction) 816=> method is { MethodKind: MethodKind.Constructor, HasSetsRequiredMembers: false };
Symbols\Synthesized\Records\SynthesizedRecordCopyCtor.cs (1)
135if (member is MethodSymbol { ContainingType.IsRecord: true, MethodKind: MethodKind.Constructor } method)
Symbols\Synthesized\SynthesizedExplicitImplementationForwardingMethod.cs (1)
43_implementingMethod.MethodKind :
Symbols\Synthesized\SynthesizedSealedPropertyAccessor.cs (1)
137return _overriddenAccessor.MethodKind;
Symbols\TypeMap.cs (2)
188stopAt?.MethodKind == MethodKind.StaticConstructor || 189stopAt?.MethodKind == MethodKind.Constructor);
Symbols\TypeSymbol.cs (6)
1571switch (interfaceMethod.MethodKind) 1586throw ExceptionUtilities.UnexpectedValue(interfaceMethod.MethodKind); 1612interfaceMethod.MethodKind, 1706else if (implicitImplMethod.IsStatic && implicitImplMethod.MethodKind == MethodKind.Ordinary && implicitImplMethod.GetUnmanagedCallersOnlyAttributeData(forceComplete: true) is not null) 2206isOperator = interfaceMethod.MethodKind is MethodKind.UserDefinedOperator or MethodKind.Conversion; 2214(((MethodSymbol)member).MethodKind is MethodKind.UserDefinedOperator or MethodKind.Conversion) != isOperator.GetValueOrDefault())
Symbols\Wrapped\WrappedMethodSymbol.cs (1)
280return UnderlyingMethod.MethodKind;