2599 references to MethodKind
Microsoft.CodeAnalysis (14)
CodeGen\CompilationTestData.cs (1)
128var format = (iMethod.MethodKind == MethodKind.UserDefinedOperator) ?
Compilation\Compilation.cs (2)
1508/// cref="MethodKind.BuiltinOperator"/> for a binary operator. Built-in operators are commonly created for 1536/// cref="MethodKind.BuiltinOperator"/> for a unary operator. Built-in operators are commonly created for
Operations\ControlFlowGraph.cs (1)
57Debug.Assert(method.MethodKind == MethodKind.LocalFunction);
Operations\ControlFlowGraphBuilder.RegionBuilder.cs (2)
98Debug.Assert(symbol.MethodKind == MethodKind.LocalFunction); 117Debug.Assert(others.All(((IMethodSymbol m, ILocalFunctionOperation _) tuple) => tuple.m.MethodKind == MethodKind.LocalFunction));
SymbolDisplay\SymbolDisplayExtensionMethodStyle.cs (1)
15/// Displays the extension method based on its <see cref="MethodKind"/>.
Symbols\IMethodSymbol.cs (6)
26MethodKind MethodKind { get; } 223/// Modifier types that are considered part of the calling convention of this method, if the <see cref="MethodKind"/> is <see cref="MethodKind.FunctionPointerSignature"/> 233/// If this method has <see cref="MethodKind"/> of <see cref="MethodKind.PropertyGet"/> or <see cref="MethodKind.PropertySet"/>, 235/// If this method has <see cref="MethodKind"/> of <see cref="MethodKind.EventAdd"/> or <see cref="MethodKind.EventRemove"/>,
Symbols\ISymbolExtensions.cs (1)
17if (method.MethodKind != MethodKind.ReducedExtension)
Microsoft.CodeAnalysis.CodeStyle (90)
AbstractQualifyMemberAccessDiagnosticAnalyzer.cs (1)
155return symbol == null || symbol.IsStatic || symbol is IMethodSymbol { MethodKind: MethodKind.LocalFunction };
AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (3)
603/// 4. If method, then it is a constructor OR a method with <see cref="MethodKind.Ordinary"/>, 623case MethodKind.Constructor: 643case MethodKind.Ordinary:
AbstractSpeculationAnalyzer.cs (3)
374if (methodSymbol.MethodKind == MethodKind.LocalFunction && newMethodSymbol.MethodKind == MethodKind.LocalFunction) 839((IMethodSymbol)symbol).MethodKind == MethodKind.DelegateInvoke;
AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
292if (((IMethodSymbol)symbolInfo.Symbol).MethodKind == MethodKind.LocalFunction)
AccessibilityExtensions.cs (2)
39case MethodKind.AnonymousFunction: 40case MethodKind.LocalFunction:
DeserializationConstructorCheck.cs (1)
26methodSymbol.MethodKind == MethodKind.Constructor &&
EditorConfigNamingStyleParser_SymbolSpec.cs (4)
130private static readonly SymbolKindOrTypeKind _method = new(MethodKind.Ordinary); 131private static readonly SymbolKindOrTypeKind _localFunction = new(MethodKind.LocalFunction); 370case MethodKind.Ordinary: 373case MethodKind.LocalFunction:
IMethodSymbolExtensions.cs (1)
49if (symbol.MethodKind == MethodKind.BuiltinOperator)
INamedTypeSymbolExtensions.cs (5)
233if (member is IMethodSymbol { IsStatic: true, IsAbstract: true, MethodKind: MethodKind.UserDefinedOperator } method) 416where m.Kind != SymbolKind.Method || ((IMethodSymbol)m).MethodKind is MethodKind.Ordinary or MethodKind.UserDefinedOperator or MethodKind.Conversion 572IMethodSymbol { MethodKind: MethodKind.Ordinary, CanBeReferencedByName: true } => true,
IParameterSymbolExtensions.cs (2)
30MethodKind: MethodKind.Constructor, 62MethodKind: MethodKind.Constructor,
ISemanticFactsExtensions.cs (1)
113methodSymbol.MethodKind == MethodKind.UserDefinedOperator;
ISymbolExtensions.cs (19)
138if (methodSymbol.MethodKind is MethodKind.Ordinary or 139MethodKind.PropertyGet or 140MethodKind.PropertySet or 141MethodKind.UserDefinedOperator or 142MethodKind.Conversion) 178=> symbol is IMethodSymbol { MethodKind: MethodKind.AnonymousFunction }; 205=> symbol is IMethodSymbol { MethodKind: MethodKind.ReducedExtension }; 214=> symbol is IMethodSymbol { MethodKind: MethodKind.LocalFunction }; 223=> symbol is IMethodSymbol { MethodKind: MethodKind.Constructor }; 226=> symbol is IMethodSymbol { MethodKind: MethodKind.StaticConstructor }; 229=> symbol is IMethodSymbol { MethodKind: MethodKind.Destructor }; 232=> symbol is IMethodSymbol { MethodKind: MethodKind.UserDefinedOperator }; 235=> symbol is IMethodSymbol { MethodKind: MethodKind.Conversion }; 238=> symbol is IMethodSymbol { MethodKind: MethodKind.Ordinary }; 241=> symbol is IMethodSymbol { MethodKind: MethodKind.Ordinary or MethodKind.LocalFunction }; 552=> symbol is IMethodSymbol { MethodKind: MethodKind.EventAdd or MethodKind.EventRaise or MethodKind.EventRemove };
ISymbolExtensions_Accessibility.cs (3)
154((IMethodSymbol)symbol).MethodKind == MethodKind.BuiltinOperator && 163Debug.Assert(!(symbol.IsKind(SymbolKind.Method) && ((IMethodSymbol)symbol).MethodKind == MethodKind.BuiltinOperator && symbol.ContainingSymbol.IsKind(SymbolKind.FunctionPointerType))); 165((IMethodSymbol)symbol).MethodKind == MethodKind.BuiltinOperator &&
MethodKindExtensions.cs (3)
9public static bool IsPropertyAccessor(this MethodKind kind) 10=> kind is MethodKind.PropertyGet or MethodKind.PropertySet;
NamingStyleRules.cs (2)
54return method.MethodKind is MethodKind.Ordinary or 55MethodKind.LocalFunction;
SymbolEquivalenceComparer.cs (2)
184if (x.MethodKind == MethodKind.DelegateInvoke && 190else if (x.MethodKind == MethodKind.FunctionPointerSignature)
SymbolEquivalenceComparer.EquivalenceVisitor.cs (11)
178if (x.MethodKind == MethodKind.ReducedExtension) 197if (x.MethodKind is MethodKind.AnonymousFunction or 198MethodKind.LocalFunction) 250private static bool AreCompatibleMethodKinds(MethodKind kind1, MethodKind kind2) 257if ((kind1 == MethodKind.Ordinary && kind2.IsPropertyAccessor()) || 258(kind1.IsPropertyAccessor() && kind2 == MethodKind.Ordinary)) 264if ((kind1 == MethodKind.BuiltinOperator && kind2 == MethodKind.UserDefinedOperator) || 265(kind1 == MethodKind.UserDefinedOperator && kind2 == MethodKind.BuiltinOperator))
SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
115if (x.MethodKind == MethodKind.AnonymousFunction)
SymbolKey.cs (2)
73/// cref="IRangeVariableSymbol"/> and <see cref="MethodKind.LocalFunction"/> <see cref="IMethodSymbol"/>s can also 326IMethodSymbol { MethodKind: MethodKind.LocalFunction } => true,
SymbolKey.MethodSymbolKey.cs (1)
144if (symbol.MethodKind == MethodKind.Conversion)
SymbolKey.SymbolKeyWriter.cs (4)
370case MethodKind.AnonymousFunction: 375case MethodKind.BuiltinOperator: 380case MethodKind.ReducedExtension: 385case MethodKind.LocalFunction:
SymbolSpecification.cs (15)
83new SymbolKindOrTypeKind(MethodKind.Ordinary), 84new SymbolKindOrTypeKind(MethodKind.LocalFunction), 318foreach (var methodKindElement in symbolKindListElement.Elements(nameof(MethodKind))) 387public SymbolKindOrTypeKind(MethodKind methodKind) 394public MethodKind? MethodKind => (_category == SymbolCategory.Method) ? (MethodKind)_kind : null; 401SymbolCategory.Method => symbol is IMethodSymbol method && method.MethodKind == (MethodKind)_kind, 410SymbolCategory.Method => new XElement(nameof(MethodKind), GetMethodKindString((MethodKind)_kind)), 426private static string GetMethodKindString(MethodKind methodKind) 433CodeAnalysis.MethodKind.SharedConstructor => nameof(CodeAnalysis.MethodKind.StaticConstructor), 434CodeAnalysis.MethodKind.AnonymousFunction => nameof(CodeAnalysis.MethodKind.LambdaMethod), 466=> new((MethodKind)Enum.Parse(typeof(MethodKind), methodKindElement.Value));
SymbolUsageAnalysis.Walker.cs (3)
298case MethodKind.AnonymousFunction: 299case MethodKind.DelegateInvoke: 311case MethodKind.LocalFunction:
Microsoft.CodeAnalysis.CodeStyle.Fixes (23)
AbstractAddParameterCodeFixProvider.cs (1)
128var isConstructorInitializer = candidates.All(m => m.MethodKind == MethodKind.Constructor);
AddParameterService.cs (1)
132if (method.MethodKind == MethodKind.ReducedExtension && insertionIndex < existingParameters.Count)
CodeGenerationAbstractMethodSymbol.cs (2)
77public virtual MethodKind MethodKind => MethodKind.Ordinary;
CodeGenerationConstructorSymbol.cs (2)
39public override MethodKind MethodKind => MethodKind.Constructor;
CodeGenerationConversionSymbol.cs (2)
46public override MethodKind MethodKind => MethodKind.Conversion;
CodeGenerationDestructorSymbol.cs (2)
30public override MethodKind MethodKind => MethodKind.Destructor;
CodeGenerationMethodSymbol.cs (5)
25public override MethodKind MethodKind { get; } 40MethodKind methodKind = MethodKind.Ordinary, 47Debug.Assert(!isInitOnly || methodKind == MethodKind.PropertySet); 48this.IsInitOnly = methodKind == MethodKind.PropertySet && isInitOnly;
CodeGenerationNamedTypeSymbol.cs (2)
174this.GetMembers().OfType<IMethodSymbol>().Where(m => m.MethodKind == MethodKind.Constructor && !m.IsStatic)); 184this.GetMembers().OfType<IMethodSymbol>().Where(m => m.MethodKind == MethodKind.StaticConstructor && m.IsStatic));
CodeGenerationOperatorSymbol.cs (2)
45public override MethodKind MethodKind => MethodKind.UserDefinedOperator;
CodeGenerationSymbolFactory.cs (4)
165MethodKind methodKind = MethodKind.Ordinary, 186MethodKind methodKind = MethodKind.Ordinary,
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (6)
NamingStylesTestOptionSets.cs (6)
119case MethodKind methodKind: 299ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(MethodKind.Ordinary)), 330ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(MethodKind.Ordinary)), 551ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(MethodKind.LocalFunction)), 768new SymbolSpecification.SymbolKindOrTypeKind(MethodKind.Ordinary), 769new SymbolSpecification.SymbolKindOrTypeKind(MethodKind.LocalFunction)),
Microsoft.CodeAnalysis.CSharp (535)
Binder\Binder.ValueChecks.cs (7)
1217MethodKind desiredMethodKind = fieldIsStatic ? MethodKind.StaticConstructor : MethodKind.Constructor; 1679if (method.MethodKind == MethodKind.Constructor || method.IsInitOnly) 2261if (method.MethodKind == MethodKind.Constructor) 4794return containingSymbol is MethodSymbol { MethodKind: MethodKind.StaticConstructor } or FieldSymbol { IsStatic: true }; 4798return (containingSymbol is MethodSymbol { MethodKind: MethodKind.Constructor } or FieldSymbol { IsStatic: false } or MethodSymbol { IsInitOnly: true }) &&
Binder\Binder_Await.cs (1)
175if (method.MethodKind == MethodKind.AnonymousFunction)
Binder\Binder_Crefs.cs (2)
776MethodKind candidateMethodKind = candidateMethod.MethodKind; 780int signatureMemberArity = candidateMethodKind == MethodKind.Constructor
Binder\Binder_Expressions.cs (9)
1788return (containingMethod.MethodKind == MethodKind.AnonymousFunction || containingMethod.MethodKind == MethodKind.LocalFunction) && !IsInsideNameof; // false in EE evaluation method 1918(this.ContainingMember() is MethodSymbol { MethodKind: MethodKind.Constructor } containingMember && (object)containingMember != primaryCtor)) && // We are in a non-primary instance constructor 1948this.ContainingMemberOrLambda is MethodSymbol { MethodKind: MethodKind.AnonymousFunction or MethodKind.LocalFunction } && 4115Debug.Assert(constructor.MethodKind == MethodKind.Constructor || 4116constructor.MethodKind == MethodKind.StaticConstructor); // error scenario: constructor initializer on static constructor 5599Debug.Assert(constructor.MethodKind == MethodKind.Constructor || constructor.MethodKind == MethodKind.StaticConstructor);
Binder\Binder_Statements.cs (3)
1787MethodKind.StaticConstructor : 1788MethodKind.Constructor) || 3706if (constructor.MethodKind != MethodKind.Constructor || constructor.IsExtern)
Binder\InMethodBinder.cs (3)
87internal override bool IsNestedFunctionBinder => _methodSymbol.MethodKind == MethodKind.LocalFunction; 272if (((MethodSymbol)newSymbol).MethodKind == MethodKind.LocalFunction) 300if (((MethodSymbol)newSymbol).MethodKind == MethodKind.LocalFunction)
Binder\LocalBinderFactory.cs (1)
270SourcePropertyAccessorSymbol { MethodKind: MethodKind.PropertySet } setter => getSetterParameters(setter),
Binder\MethodGroupResolution.cs (1)
88MethodGroup.Methods[0].MethodKind == MethodKind.LocalFunction;
Binder\Semantics\AccessCheck.cs (1)
196case SymbolKind.Method when ((MethodSymbol)symbol).MethodKind == MethodKind.LocalFunction:
BoundTree\BoundNodeExtensions.cs (1)
62return method.MethodKind == MethodKind.Constructor &&
CodeGen\EmitExpression.cs (1)
1966if (method.IsEffectivelyReadOnly && method.MethodKind != MethodKind.Constructor)
Compilation\CSharpCompilation.cs (1)
2811if (symbol.Kind == SymbolKind.Method && symbol.IsImplicitlyDeclared && ((MethodSymbol)symbol).MethodKind == MethodKind.Constructor)
Compilation\CSharpSemanticModel.cs (2)
1784case MethodSymbol { MethodKind: MethodKind.LambdaMethod }: 4764if (call.InvokedAsExtensionMethod && method.IsExtensionMethod && method.MethodKind != MethodKind.ReducedExtension)
Compilation\MemberSemanticModel.cs (1)
2306Debug.Assert(symbol is LocalSymbol or ParameterSymbol or MethodSymbol { MethodKind: MethodKind.LambdaMethod });
Compilation\MethodBodySemanticModel.cs (1)
243if (MemberSymbol is MethodSymbol methodSymbol && methodSymbol.MethodKind == MethodKind.Constructor &&
Compilation\SyntaxTreeSemanticModel.cs (1)
2381Debug.Assert(symbol is LocalSymbol or ParameterSymbol or MethodSymbol { MethodKind: MethodKind.LambdaMethod });
Compiler\ClsComplianceChecker.cs (1)
729if (method.MethodKind == MethodKind.DelegateInvoke)
Compiler\MethodBodySynthesizer.cs (5)
175Debug.Assert(accessor.MethodKind == MethodKind.PropertyGet || accessor.MethodKind == MethodKind.PropertySet); 190if (accessor.MethodKind == MethodKind.PropertyGet) 196Debug.Assert(accessor.MethodKind == MethodKind.PropertySet); 526Debug.Assert(method.MethodKind == MethodKind.Destructor);
Compiler\MethodCompiler.cs (7)
521(method.MethodKind == MethodKind.Constructor || method.IsScriptInitializer) ? processedInstanceInitializers : 522method.MethodKind == MethodKind.StaticConstructor ? processedStaticInitializers : 1122if ((methodSymbol.MethodKind == MethodKind.Constructor || methodSymbol.MethodKind == MethodKind.StaticConstructor) && 1800if (method.MethodKind == MethodKind.StaticConstructor && 1973if (method.MethodKind == MethodKind.Destructor && body != null) 2276if (method.MethodKind == MethodKind.Constructor && !method.IsExtern)
CSharpDeclarationComputer.cs (1)
109Debug.Assert(ctor.MethodKind == MethodKind.Constructor && typeDeclaration.ParameterList is object);
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (1)
116if (symbol.MethodKind == MethodKind.Conversion)
Emitter\Model\MethodSymbolAdapter.cs (5)
385return AdaptedMethodSymbol.MethodKind == MethodKind.Constructor; 634return this.MethodKind == MethodKind.Constructor 635|| this.MethodKind == MethodKind.StaticConstructor; 644Debug.Assert(this.MethodKind != MethodKind.Destructor); 648!(this.IsVirtual || this.IsOverride || this.IsAbstract || this.MethodKind == MethodKind.Destructor));
Emitter\Model\NamedTypeSymbolAdapter.cs (3)
355else if (method.MethodKind == MethodKind.Destructor && AdaptedNamedTypeSymbol.SpecialType != SpecialType.System_Object) 366if ((object)objectMethod != null && objectMethod.MethodKind == MethodKind.Destructor) 621if ((alwaysIncludeConstructors && method.MethodKind == MethodKind.Constructor) || method.GetCciAdapter().ShouldInclude(context))
Emitter\Model\PropertySymbolAdapter.cs (3)
75return GetSynthesizedSealedAccessor(MethodKind.PropertyGet); 130return GetSynthesizedSealedAccessor(MethodKind.PropertySet); 274private IMethodReference GetSynthesizedSealedAccessor(MethodKind targetMethodKind)
Emitter\Model\SynthesizedPrivateImplementationDetailsStaticConstructor.cs (2)
24public override MethodKind MethodKind => MethodKind.StaticConstructor;
Emitter\NoPia\EmbeddedMethod.cs (1)
70return UnderlyingMethod.AdaptedMethodSymbol.MethodKind == MethodKind.Constructor;
FlowAnalysis\AbstractFlowPass.cs (2)
1334if (method is null || method.MethodKind != MethodKind.Constructor) 1431Debug.Assert(method?.OriginalDefinition.MethodKind != MethodKind.LocalFunction);
FlowAnalysis\DefiniteAssignment.cs (6)
103&& CurrentSymbol is MethodSymbol { MethodKind: MethodKind.Constructor, ContainingType.TypeKind: TypeKind.Struct }; 1214Debug.Assert(CurrentSymbol is MethodSymbol { MethodKind: MethodKind.Constructor, ContainingType.TypeKind: TypeKind.Struct }); 1261if (CurrentSymbol is not MethodSymbol { MethodKind: MethodKind.Constructor, ContainingType.TypeKind: TypeKind.Struct }) 2207(currentMethod.MethodKind == MethodKind.AnonymousFunction || 2208currentMethod.MethodKind == MethodKind.LocalFunction) && 2250if (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); 112Debug.Assert(method.MethodKind == MethodKind.Constructor);
FlowAnalysis\NullableWalker.cs (6)
433Debug.Assert(baseOrThisInitializer is null or { MethodKind: MethodKind.Constructor }); 1413return constructorBody is BoundConstructorMethodBody { Initializer: BoundExpressionStatement { Expression: BoundCall { Method: { MethodKind: MethodKind.Constructor } initializerMethod } } } 2084while (enclosingMemberMethod?.MethodKind is MethodKind.AnonymousFunction or MethodKind.LocalFunction) 5723|| method.MethodKind != MethodKind.Ordinary 7340if (((MethodSymbol)symbol).MethodKind == MethodKind.LocalFunction)
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (2)
442if (node.Method.MethodKind == MethodKind.LocalFunction) 452if (node.MethodOpt?.MethodKind == MethodKind.LocalFunction)
Lowering\ClosureConversion\ClosureConversion.cs (11)
185_seenBaseCall = method.MethodKind != MethodKind.Constructor; // only used for ctors 201(localOrParameter as MethodSymbol)?.MethodKind == MethodKind.LocalFunction); 429originalMethod.MethodKind == MethodKind.LambdaMethod && 774if (_currentMethod.MethodKind == MethodKind.Constructor && 843var loweredSymbol = (node.Method.MethodKind is MethodKind.LambdaMethod or MethodKind.LocalFunction) ? 861Debug.Assert(localFunc.MethodKind == MethodKind.LocalFunction); 1056if (node.Method.MethodKind == MethodKind.LocalFunction) 1322if (node.MethodOpt?.MethodKind == MethodKind.LocalFunction) 1348if (node.TargetMethod.MethodKind == MethodKind.LocalFunction) 1645_currentMethod.MethodKind != MethodKind.StaticConstructor &&
Lowering\DiagnosticsPass_ExpressionTrees.cs (4)
186var diagnostic = _staticLocalOrAnonymousFunction.MethodKind == MethodKind.LocalFunction 201var diagnostic = _staticLocalOrAnonymousFunction.MethodKind == MethodKind.LocalFunction 332else if (method.MethodKind == MethodKind.LocalFunction) 808if ((node.LookupSymbolOpt as MethodSymbol)?.MethodKind == MethodKind.LocalFunction)
Lowering\DiagnosticsPass_Warnings.cs (1)
368if ((object)op == null || op.MethodKind != MethodKind.UserDefinedOperator) continue;
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\IteratorRewriter\IteratorFinallyMethodSymbol.cs (2)
70public override MethodKind MethodKind 72get { return MethodKind.Ordinary; }
Lowering\LocalRewriter\DelegateCacheRewriter.cs (2)
129if (targetMethod.MethodKind == MethodKind.LocalFunction) 161Debug.Assert(targetMethod.MethodKind == MethodKind.Ordinary);
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (3)
155node.Method.MethodKind == MethodKind.LocalFunction || 217if (conversion.Method.MethodKind == MethodKind.LocalFunction) 241node.MethodOpt?.MethodKind == MethodKind.LocalFunction;
Lowering\LocalRewriter\LocalRewriter_Call.cs (1)
431var requiresInstanceReceiver = methodOrIndexer.RequiresInstanceReceiver() && methodOrIndexer is not MethodSymbol { MethodKind: MethodKind.Constructor } and not FunctionPointerMethodSymbol;
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
572&& _factory.TopLevelMethod.MethodKind != MethodKind.StaticConstructor // Avoid caching twice if people do it manually.
Lowering\LocalRewriter\LocalRewriter_Literal.cs (1)
72if ((curMethod.MethodKind != MethodKind.SharedConstructor ||
Lowering\LocalRewriter\LocalRewriter_Range.cs (3)
167case MethodKind.Constructor: 177case MethodKind.Ordinary: 189case MethodKind.PropertyGet:
Lowering\SynthesizedMethodBaseSymbol.cs (1)
48methodKind: MethodKind.Ordinary,
Lowering\SyntheticBoundNodeFactory.cs (4)
70value.MethodKind != MethodKind.AnonymousFunction && 71value.MethodKind != MethodKind.LocalFunction) 188CurrentFunction.MethodKind == MethodKind.AnonymousFunction || 189CurrentFunction.MethodKind == MethodKind.LocalFunction ||
SymbolDisplay\SymbolDisplayVisitor.cs (1)
330return ((IMethodSymbol)symbol).MethodKind == MethodKind.LocalFunction;
SymbolDisplay\SymbolDisplayVisitor.Members.cs (30)
273if (symbol.MethodKind == MethodKind.AnonymousFunction) 289else if (symbol.MethodKind == MethodKind.FunctionPointerSignature) 297if (symbol.MethodKind == MethodKind.ReducedExtension && format.ExtensionMethodStyle == SymbolDisplayExtensionMethodStyle.StaticMethod) 301else if (symbol.MethodKind != MethodKind.ReducedExtension && format.ExtensionMethodStyle == SymbolDisplayExtensionMethodStyle.InstanceMethod) 327case MethodKind.Constructor: 328case MethodKind.StaticConstructor: 330case MethodKind.Destructor: 341case MethodKind.Conversion: 388if (symbol.MethodKind == MethodKind.LocalFunction) 393else if (symbol.MethodKind == MethodKind.ReducedExtension) 425case MethodKind.Ordinary: 426case MethodKind.DelegateInvoke: 427case MethodKind.LocalFunction: 433case MethodKind.ReducedExtension: 440case MethodKind.PropertyGet: 441case MethodKind.PropertySet: 447goto case MethodKind.Ordinary; 451AddKeyword(symbol.MethodKind == MethodKind.PropertyGet ? SyntaxKind.GetKeyword : 455case MethodKind.EventAdd: 456case MethodKind.EventRemove: 462goto case MethodKind.Ordinary; 466AddKeyword(symbol.MethodKind == MethodKind.EventAdd ? SyntaxKind.AddKeyword : SyntaxKind.RemoveKeyword); 469case MethodKind.Constructor: 470case MethodKind.StaticConstructor: 484case MethodKind.Destructor: 500case MethodKind.ExplicitInterfaceImplementation: 530case MethodKind.UserDefinedOperator: 531case MethodKind.BuiltinOperator: 552case MethodKind.Conversion: 784hasThisParameter: symbol.IsExtensionMethod && symbol.MethodKind != MethodKind.ReducedExtension,
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.ConstructorSymbol.cs (2)
43public override MethodKind MethodKind 45get { return MethodKind.Constructor; }
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.EqualsMethodSymbol.cs (2)
28public override MethodKind MethodKind 30get { return MethodKind.Ordinary; }
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.GetHashCodeMethodSymbol.cs (2)
32public override MethodKind MethodKind 34get { return MethodKind.Ordinary; }
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertyAccessorSymbol.cs (2)
29public override MethodKind MethodKind 31get { return MethodKind.PropertyGet; }
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.ToStringMethodSymbol.cs (2)
32public override MethodKind MethodKind 34get { return MethodKind.Ordinary; }
Symbols\Compilation_WellKnownMembers.cs (8)
251MethodKind targetMethodKind = MethodKind.Ordinary; 259targetMethodKind = MethodKind.Constructor; 270targetMethodKind = MethodKind.PropertyGet; 303MethodKind methodKind = method.MethodKind; 306if (methodKind == MethodKind.Conversion || methodKind == MethodKind.UserDefinedOperator) 308methodKind = MethodKind.Ordinary;
Symbols\ErrorMethodSymbol.cs (4)
199public override MethodKind MethodKind 206return MethodKind.Constructor; 209return MethodKind.Ordinary; 283Debug.Assert(MethodKind == MethodKind.Constructor);
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (2)
769public override MethodKind MethodKind => MethodKind.FunctionPointerSignature;
Symbols\MemberSymbolExtensions.cs (7)
173return methodSymbol.MethodKind == MethodKind.UserDefinedOperator || methodSymbol.MethodKind == MethodKind.Conversion; 193return symbol.Kind == SymbolKind.Method && ((MethodSymbol)symbol).MethodKind == MethodKind.Conversion; 362case MethodKind.Constructor: 363case MethodKind.StaticConstructor: 375if ((object)method != null && method.MethodKind == MethodKind.Constructor) 440return method.MethodKind == MethodKind.Constructor && method.ParameterCount == 0;
Symbols\Metadata\PE\PEEventSymbol.cs (2)
125_addMethod.SetAssociatedEvent(this, MethodKind.EventAdd); 126_removeMethod.SetAssociatedEvent(this, MethodKind.EventRemove);
Symbols\Metadata\PE\PEMethodSymbol.cs (38)
112public MethodKind MethodKind 116return (MethodKind)((_bits >> MethodKindOffset) & MethodKindMask); 154Debug.Assert(EnumUtilities.ContainsAllValues<MethodKind>(MethodKindMask)); 178public void InitializeMethodKind(MethodKind methodKind) 602private bool IsDestructor => this.MethodKind == MethodKind.Destructor; 756internal bool SetAssociatedProperty(PEPropertySymbol propertySymbol, MethodKind methodKind) 758Debug.Assert((methodKind == MethodKind.PropertyGet) || (methodKind == MethodKind.PropertySet)); 766internal bool SetAssociatedEvent(PEEventSymbol eventSymbol, MethodKind methodKind) 768Debug.Assert((methodKind == MethodKind.EventAdd) || (methodKind == MethodKind.EventRemove)); 772private bool SetAssociatedPropertyOrEvent(Symbol propertyOrEventSymbol, MethodKind methodKind) 785_packedFlags.MethodKind == default(MethodKind) || 786_packedFlags.MethodKind == MethodKind.Ordinary || 787_packedFlags.MethodKind == MethodKind.ExplicitInterfaceImplementation); 932if (this.MethodKind == MethodKind.Ordinary && IsValidExtensionMethodSignature() 960: this.MethodKind == MethodKind.Ordinary 1056public override MethodKind MethodKind 1123private MethodKind ComputeMethodKind() 1147return MethodKind.StaticConstructor; 1152return MethodKind.Constructor; 1156return MethodKind.Ordinary; 1184return IsValidUserDefinedOperatorSignature(2) ? MethodKind.UserDefinedOperator : MethodKind.Ordinary; 1196return IsValidUserDefinedOperatorSignature(1) ? MethodKind.UserDefinedOperator : MethodKind.Ordinary; 1200return IsValidUserDefinedOperatorSignature(1) ? MethodKind.Conversion : MethodKind.Ordinary; 1210return MethodKind.Ordinary; 1222return MethodKind.Destructor; 1228return MethodKind.DelegateInvoke; 1239return MethodKind.ExplicitInterfaceImplementation; 1242return MethodKind.Ordinary; 1276method.MethodKind == MethodKind.Destructor); 1368this.MethodKind == MethodKind.PropertySet && 1423var diag = PEUtilities.DeriveCompilerFeatureRequiredAttributeDiagnostic(this, containingModule, Handle, allowedFeatures: MethodKind == MethodKind.Constructor ? CompilerFeatureRequiredFeatures.RequiredMembers : CompilerFeatureRequiredFeatures.None, decoder); 1511Debug.Assert(MethodKind == MethodKind.Constructor); 1533var result = ObsoleteAttributeHelpers.GetObsoleteDataFromMetadata(_handle, (PEModuleSymbol)ContainingModule, ignoreByRefLikeMarker: false, ignoreRequiredMemberMarker: MethodKind == MethodKind.Constructor);
Symbols\Metadata\PE\PEParameterSymbol.cs (2)
868case "" when !ContainingSymbol.RequiresInstanceReceiver() || ContainingSymbol is MethodSymbol { MethodKind: MethodKind.Constructor or MethodKind.DelegateInvoke }:
Symbols\Metadata\PE\PEPropertySymbol.cs (2)
259_getMethod.SetAssociatedProperty(this, MethodKind.PropertyGet); 264_setMethod.SetAssociatedProperty(this, MethodKind.PropertySet);
Symbols\MethodSymbol.cs (27)
64public abstract MethodKind MethodKind 365protected bool IsValidReadOnlyTarget => !IsStatic && ContainingType.IsStructType() && MethodKind != MethodKind.Constructor && !IsInitOnly; 585internal bool HasSetsRequiredMembers => MethodKind == MethodKind.Constructor && HasSetsRequiredMembersImpl; 596internal static bool CanOverrideOrHide(MethodKind kind) 600case MethodKind.AnonymousFunction: 601case MethodKind.Constructor: 602case MethodKind.Destructor: 603case MethodKind.ExplicitInterfaceImplementation: 604case MethodKind.StaticConstructor: 605case MethodKind.ReducedExtension: 607case MethodKind.Conversion: 608case MethodKind.DelegateInvoke: 609case MethodKind.EventAdd: 610case MethodKind.EventRemove: 611case MethodKind.LocalFunction: 612case MethodKind.UserDefinedOperator: 613case MethodKind.Ordinary: 614case MethodKind.PropertyGet: 615case MethodKind.PropertySet: 651return MethodKind == MethodKind.Constructor && ContainingType.IsScriptClass; 667return ((MethodKind == MethodKind.Constructor || MethodKind == MethodKind.StaticConstructor) && IsImplicitlyDeclared); 678return MethodKind == MethodKind.Constructor && IsImplicitlyDeclared; 748if (!this.IsExtensionMethod || this.MethodKind == MethodKind.ReducedExtension || receiverType.IsVoidType()) 762return (this.IsExtensionMethod && this.MethodKind != MethodKind.ReducedExtension) ? ReducedExtensionMethodSymbol.Create(this) : null; 1030if (!IsStatic || IsAbstract || IsVirtual || MethodKind is not (MethodKind.Ordinary or MethodKind.LocalFunction))
Symbols\MethodSymbolExtensions.cs (16)
24return method.IsImplicitlyDeclared && method.MethodKind == MethodKind.AnonymousFunction; 53if (!skipFirstMethodKindCheck && method.MethodKind == MethodKind.Destructor) 100if (hiddenMethod.MethodKind == MethodKind.Destructor) 129case MethodKind.Destructor: 130case MethodKind.Constructor: 131case MethodKind.StaticConstructor: 132case MethodKind.UserDefinedOperator: 133case MethodKind.Conversion: 135case MethodKind.EventAdd: 136case MethodKind.EventRemove: 137case MethodKind.PropertyGet: 138case MethodKind.PropertySet: 220method.MethodKind is (MethodKind.Ordinary or MethodKind.ExplicitInterfaceImplementation or MethodKind.PropertyGet or MethodKind.PropertySet) &&
Symbols\NamedTypeSymbol.cs (5)
223if (candidate.MethodKind == MethodKind.UserDefinedOperator || candidate.MethodKind == MethodKind.Conversion) 286Debug.Assert(method.MethodKind == MethodKind.Constructor); 294Debug.Assert(method.MethodKind == MethodKind.StaticConstructor); 373Debug.Assert(method.MethodKind != MethodKind.ReducedExtension);
Symbols\NativeIntegerTypeSymbol.cs (2)
96case MethodKind.Ordinary: 113case MethodKind.Constructor:
Symbols\OverriddenOrHiddenMembersHelpers.cs (2)
246bool accessorIsGetter = accessor.MethodKind == MethodKind.PropertyGet; 338bool accessorIsAdder = accessor.MethodKind == MethodKind.EventAdd;
Symbols\PublicModel\MethodSymbol.cs (35)
32MethodKind IMethodSymbol.MethodKind 38case MethodKind.AnonymousFunction: 39return MethodKind.AnonymousFunction; 40case MethodKind.Constructor: 41return MethodKind.Constructor; 42case MethodKind.Conversion: 43return MethodKind.Conversion; 44case MethodKind.DelegateInvoke: 45return MethodKind.DelegateInvoke; 46case MethodKind.Destructor: 47return MethodKind.Destructor; 48case MethodKind.EventAdd: 49return MethodKind.EventAdd; 50case MethodKind.EventRemove: 51return MethodKind.EventRemove; 52case MethodKind.ExplicitInterfaceImplementation: 53return MethodKind.ExplicitInterfaceImplementation; 54case MethodKind.UserDefinedOperator: 55return MethodKind.UserDefinedOperator; 56case MethodKind.BuiltinOperator: 57return MethodKind.BuiltinOperator; 58case MethodKind.Ordinary: 59return MethodKind.Ordinary; 60case MethodKind.PropertyGet: 61return MethodKind.PropertyGet; 62case MethodKind.PropertySet: 63return MethodKind.PropertySet; 64case MethodKind.ReducedExtension: 65return MethodKind.ReducedExtension; 66case MethodKind.StaticConstructor: 67return MethodKind.StaticConstructor; 68case MethodKind.LocalFunction: 69return MethodKind.LocalFunction; 70case MethodKind.FunctionPointerSignature: 71return MethodKind.FunctionPointerSignature;
Symbols\ReducedExtensionMethodSymbol.cs (4)
39Debug.Assert(method.IsExtensionMethod && method.MethodKind != MethodKind.ReducedExtension); 74Debug.Assert(method.IsExtensionMethod && method.MethodKind != MethodKind.ReducedExtension); 459public override MethodKind MethodKind 461get { return MethodKind.ReducedExtension; }
Symbols\SignatureOnlyMethodSymbol.cs (3)
23private readonly MethodKind _methodKind; 37MethodKind methodKind, 93public override MethodKind MethodKind { get { return _methodKind; } }
Symbols\Source\ExplicitInterfaceHelpers.cs (3)
97if (method.MethodKind != MethodKind.ExplicitInterfaceImplementation) 263(interfaceMethod.MethodKind is MethodKind.UserDefinedOperator or MethodKind.Conversion) != isOperator)
Symbols\Source\LambdaSymbol.cs (2)
72public override MethodKind MethodKind 74get { return MethodKind.AnonymousFunction; }
Symbols\Source\LocalFunctionSymbol.cs (2)
294public override MethodKind MethodKind => MethodKind.LocalFunction;
Symbols\Source\ParameterHelpers.cs (3)
208Debug.Assert(methodOwner?.MethodKind != MethodKind.LambdaMethod); 210methodOwner?.MethodKind == MethodKind.LocalFunction; 879if (method.MethodKind != MethodKind.AnonymousFunction)
Symbols\Source\SourceComplexParameterSymbol.cs (3)
1336if (!ContainingSymbol.RequiresInstanceReceiver() || ContainingSymbol is MethodSymbol { MethodKind: MethodKind.Constructor or MethodKind.DelegateInvoke or MethodKind.LambdaMethod })
Symbols\Source\SourceConstructorSymbol.cs (11)
24var methodKind = syntax.Modifiers.Any(SyntaxKind.StaticKeyword) ? MethodKind.StaticConstructor : MethodKind.Constructor; 32MethodKind methodKind, 55if (methodKind == MethodKind.Constructor && syntax.Initializer != null) 66if (methodKind == MethodKind.StaticConstructor) 103private DeclarationModifiers MakeModifiers(SyntaxTokenList modifiers, MethodKind methodKind, bool hasBody, Location location, BindingDiagnosticBag diagnostics, out bool modifierErrors) 105var defaultAccess = (methodKind == MethodKind.StaticConstructor) ? DeclarationModifiers.None : DeclarationModifiers.Private; 119if (methodKind == MethodKind.StaticConstructor) 145private void CheckModifiers(MethodKind methodKind, bool hasBody, Location location, BindingDiagnosticBag diagnostics) 155else if (ContainingType.IsStatic && methodKind == MethodKind.Constructor)
Symbols\Source\SourceConstructorSymbolBase.cs (1)
66if (MethodKind == MethodKind.StaticConstructor && (_lazyParameters.Length != 0) &&
Symbols\Source\SourceDelegateMethodSymbol.cs (5)
26MethodKind methodKind, 222: base(delegateType, voidType, syntax, MethodKind.Constructor, DeclarationModifiers.Public) 271: base(delegateType, returnType, syntax, MethodKind.DelegateInvoke, DeclarationModifiers.Virtual | DeclarationModifiers.Public) 370: base((SourceNamedTypeSymbol)invoke.ContainingType, iAsyncResultType, syntax, MethodKind.Ordinary, DeclarationModifiers.Virtual | DeclarationModifiers.Public) 413: base((SourceNamedTypeSymbol)invoke.ContainingType, invoke.ReturnTypeWithAnnotations, syntax, MethodKind.Ordinary, DeclarationModifiers.Virtual | DeclarationModifiers.Public)
Symbols\Source\SourceDestructorSymbol.cs (2)
26const MethodKind methodKind = MethodKind.Destructor;
Symbols\Source\SourceEventAccessorSymbol.cs (4)
56isAdder ? MethodKind.EventAdd : MethodKind.EventRemove, 115if (this.MethodKind == MethodKind.EventAdd) 127Debug.Assert(this.MethodKind == MethodKind.EventRemove);
Symbols\Source\SourceMemberContainerSymbol.cs (32)
1968if (conversion is { MethodKind: MethodKind.Conversion }) 2045if (method1.MethodKind == MethodKind.Constructor && 2061var methodKind = method1.MethodKind == MethodKind.Constructor ? MessageID.IDS_SK_CONSTRUCTOR : MessageID.IDS_SK_METHOD; 2069var methodName = (method1.MethodKind == MethodKind.Destructor && method2.MethodKind == MethodKind.Destructor) ? 2337if (member.Kind != SymbolKind.Method || ((MethodSymbol)member).MethodKind != MethodKind.Destructor) 3602if ((methodSymbol.MethodKind == MethodKind.Ordinary) && 3638if ((methodSymbol.MethodKind == MethodKind.Ordinary) && 3793case MethodKind.Constructor: 3796case MethodKind.Conversion: 3798case MethodKind.UserDefinedOperator: 3800case MethodKind.Destructor: 3803case MethodKind.ExplicitInterfaceImplementation: 3805case MethodKind.Ordinary: 3806case MethodKind.LocalFunction: 3807case MethodKind.PropertyGet: 3808case MethodKind.PropertySet: 3809case MethodKind.EventAdd: 3810case MethodKind.EventRemove: 3811case MethodKind.StaticConstructor: 3839if (m.MethodKind == MethodKind.Constructor && m.ParameterCount == 0) 3881if (hasInitializers && !builder.NonTypeMembers.Any(member => member is MethodSymbol { MethodKind: MethodKind.Constructor })) 3933case MethodSymbol { MethodKind: not (MethodKind.Ordinary or MethodKind.Constructor) }: 4024MethodKind.Ordinary, 4070MethodKind.Constructor, 4118MethodKind.Ordinary, 4177MethodKind.Ordinary, 4351MethodKind.Ordinary, 4444MethodKind.Ordinary, 4535case MethodKind.Constructor: 4545case MethodKind.StaticConstructor:
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
552else if (method.MethodKind == MethodKind.Destructor) 891!(overridingMemberIsMethod && ((MethodSymbol)overriddenMember).MethodKind == MethodKind.Destructor)) //destructors are metadata virtual
Symbols\Source\SourceMemberMethodSymbol.cs (12)
91public MethodKind MethodKind 93get { return (MethodKind)((_flags >> MethodKindOffset) & MethodKindMask); } 115Debug.Assert(EnumUtilities.ContainsAllValues<MethodKind>(MethodKindMask)); 126MethodKind methodKind, 243if (this.DeclaredAccessibility <= Accessibility.Private || MethodKind == MethodKind.ExplicitInterfaceImplementation) 248ErrorCode code = (this.MethodKind == MethodKind.Conversion || this.MethodKind == MethodKind.UserDefinedOperator) ? 259code = (this.MethodKind == MethodKind.Conversion || this.MethodKind == MethodKind.UserDefinedOperator) ? 297MethodKind methodKind, 426public sealed override MethodKind MethodKind 987if ((!IsStatic || MethodKind is MethodKind.StaticConstructor) &&
Symbols\Source\SourceMethodSymbolWithAttributes.cs (23)
147case MethodKind.Constructor: 148case MethodKind.Destructor: 149case MethodKind.StaticConstructor: 152case MethodKind.PropertySet: 153case MethodKind.EventRemove: 154case MethodKind.EventAdd: 674else if (!this.CanBeReferencedByName || this.MethodKind == MethodKind.Destructor) 689else if (this is { MethodKind: MethodKind.LocalFunction, IsStatic: false }) 888if (MethodKind != MethodKind.Ordinary) 1034case MethodKind.Constructor: 1035case MethodKind.StaticConstructor: 1062var errorCode = (this.MethodKind == MethodKind.Constructor || this.MethodKind == MethodKind.StaticConstructor) ? 1114if (this.MethodKind != MethodKind.LambdaMethod) 1218case MethodKind.Constructor: 1219case MethodKind.StaticConstructor: 1220case MethodKind.PropertyGet: 1221case MethodKind.PropertySet: 1222case MethodKind.EventAdd: 1223case MethodKind.EventRemove: 1224case MethodKind.UserDefinedOperator: 1225case MethodKind.Conversion: 1298if (this.ContainingType.IsComImport && this.MethodKind == MethodKind.Constructor)
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1687|| GetMembers().All(m => m is not MethodSymbol { MethodKind: MethodKind.Constructor, ObsoleteKind: ObsoleteAttributeKind.None } method
Symbols\Source\SourceOrdinaryMethodOrUserDefinedOperatorSymbol.cs (3)
62if (MethodKind == MethodKind.ExplicitInterfaceImplementation) 99if (MethodKind != MethodKind.ExplicitInterfaceImplementation) 205return MethodKind == MethodKind.ExplicitInterfaceImplementation;
Symbols\Source\SourceOrdinaryMethodSymbol.cs (4)
63var methodKind = interfaceSpecifier == null 64? MethodKind.Ordinary 65: MethodKind.ExplicitInterfaceImplementation; 76MethodKind methodKind,
Symbols\Source\SourceOrdinaryMethodSymbolBase.cs (9)
34MethodKind methodKind, 60bool isExplicitInterfaceImplementation = methodKind == MethodKind.ExplicitInterfaceImplementation; 82Debug.Assert(this.MethodKind != MethodKind.UserDefinedOperator, "SourceUserDefinedOperatorSymbolBase overrides this"); 127CheckModifiers(MethodKind == MethodKind.ExplicitInterfaceImplementation, isVararg, HasAnyBody, locations[0], diagnostics); 203private (DeclarationModifiers mods, bool hasExplicitAccessMod) MakeModifiers(MethodKind methodKind, bool isReadOnly, bool hasBody, Location location, BindingDiagnosticBag diagnostics) 206bool isExplicitInterfaceImplementation = methodKind == MethodKind.ExplicitInterfaceImplementation; 294private static DeclarationModifiers AddImpliedModifiers(DeclarationModifiers mods, bool containingTypeIsInterface, MethodKind methodKind, bool hasBody) 301methodKind == MethodKind.ExplicitInterfaceImplementation); 303else if (methodKind == MethodKind.ExplicitInterfaceImplementation)
Symbols\Source\SourcePropertyAccessorSymbol.cs (15)
42var methodKind = isGetMethod ? MethodKind.PropertyGet : MethodKind.PropertySet; 95var methodKind = isGetMethod ? MethodKind.PropertyGet : MethodKind.PropertySet; 164this.MakeFlags(MethodKind.PropertyGet, declarationModifiers, returnsVoid: false, isExtensionMethod: false, isNullableAnalysisEnabled: isNullableAnalysisEnabled, 186MethodKind methodKind, 359if (MethodKind == MethodKind.PropertySet) 381if (this.MethodKind == MethodKind.PropertyGet) 485MethodKind == MethodKind.PropertyGet; 561else if (LocalDeclaredReadOnly && _isAutoPropertyAccessor && MethodKind == MethodKind.PropertySet) 616MethodSymbol implementedAccessor = this.MethodKind == MethodKind.PropertyGet 654bool isGetMethod = this.MethodKind == MethodKind.PropertyGet; 738bool isGetMethod = this.MethodKind == MethodKind.PropertyGet;
Symbols\Source\SourcePropertySymbolBase.cs (1)
957Debug.Assert(thisAccessor.MethodKind == MethodKind.PropertySet);
Symbols\Source\SourceUserDefinedConversionSymbol.cs (4)
42var methodKind = interfaceSpecifier == null 43? MethodKind.Conversion 44: MethodKind.ExplicitInterfaceImplementation; 54MethodKind methodKind,
Symbols\Source\SourceUserDefinedOperatorSymbol.cs (4)
47var methodKind = interfaceSpecifier == null 48? MethodKind.UserDefinedOperator 49: MethodKind.ExplicitInterfaceImplementation; 59MethodKind methodKind,
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (4)
26MethodKind methodKind, 122protected static DeclarationModifiers MakeDeclarationModifiers(MethodKind methodKind, bool inInterface, BaseMethodDeclarationSyntax syntax, Location location, BindingDiagnosticBag diagnostics) 124bool isExplicitInterfaceImplementation = methodKind == MethodKind.ExplicitInterfaceImplementation; 341if (MethodKind == MethodKind.ExplicitInterfaceImplementation)
Symbols\Source\ThisParameterSymbol.cs (1)
44if (_containingMethod?.MethodKind == MethodKind.Constructor)
Symbols\Symbol.cs (14)
537case MethodKind.Ordinary: 538case MethodKind.LocalFunction: 539case MethodKind.ReducedExtension: 541case MethodKind.Destructor: 546case MethodKind.DelegateInvoke: 548case MethodKind.PropertyGet: 549case MethodKind.PropertySet: 598case MethodKind.Ordinary: 599case MethodKind.LocalFunction: 600case MethodKind.DelegateInvoke: 601case MethodKind.Destructor: // See comment in CanBeReferencedByName. 603case MethodKind.PropertyGet: 604case MethodKind.PropertySet: 1100this is MethodSymbol method && method.MethodKind == MethodKind.FunctionPointerSignature ?
Symbols\Symbol_Attributes.cs (4)
58case MethodKind.Constructor: 59case MethodKind.StaticConstructor: 652Debug.Assert(!binder.InAttributeArgument || this is MethodSymbol { MethodKind: MethodKind.LambdaMethod or MethodKind.LocalFunction }, "Possible cycle in attribute binding");
Symbols\SymbolExtensions.cs (5)
150if (method.MethodKind != MethodKind.AnonymousFunction && method.MethodKind != MethodKind.LocalFunction) break; 170if (method.MethodKind == MethodKind.AnonymousFunction || method.MethodKind == MethodKind.LocalFunction) 846=> method is { MethodKind: MethodKind.Constructor, HasSetsRequiredMembers: false };
Symbols\Synthesized\Records\SynthesizedPrimaryConstructor.cs (1)
26MethodKind.Constructor,
Symbols\Synthesized\Records\SynthesizedRecordCopyCtor.cs (1)
120if (member is MethodSymbol { ContainingType.IsRecordStruct: false, MethodKind: MethodKind.Constructor } method)
Symbols\Synthesized\Records\SynthesizedRecordEqualityContractProperty.cs (1)
144MethodKind.PropertyGet,
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperatorBase.cs (1)
39: base(MethodKind.UserDefinedOperator, explicitInterfaceType: null, name, containingType, containingType.Locations[0], (CSharpSyntaxNode)containingType.SyntaxReferences[0].GetSyntax(),
Symbols\Synthesized\Records\SynthesizedRecordOrdinaryMethod.cs (1)
24: base(containingType, name, containingType.Locations[0], (CSharpSyntaxNode)containingType.SyntaxReferences[0].GetSyntax(), MethodKind.Ordinary,
Symbols\Synthesized\SynthesizedDelegateSymbol.cs (2)
93public override MethodKind MethodKind 95get { return MethodKind.DelegateInvoke; }
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (2)
151public override MethodKind MethodKind 153get { return MethodKind.Ordinary; }
Symbols\Synthesized\SynthesizedEventAccessorSymbol.cs (1)
46return this.MethodKind == MethodKind.EventAdd
Symbols\Synthesized\SynthesizedExplicitImplementationForwardingMethod.cs (2)
38public override MethodKind MethodKind 44MethodKind.ExplicitInterfaceImplementation;
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (2)
238public override MethodKind MethodKind 240get { return MethodKind.Ordinary; }
Symbols\Synthesized\SynthesizedImplementationMethod.cs (2)
138public override MethodKind MethodKind 142return MethodKind.ExplicitInterfaceImplementation;
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (2)
188public sealed override MethodKind MethodKind 190get { return MethodKind.Constructor; }
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (2)
129public override MethodKind MethodKind 131get { return MethodKind.Ordinary; }
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (2)
66public override MethodKind MethodKind 70return MethodKind.BuiltinOperator;
Symbols\Synthesized\SynthesizedSealedPropertyAccessor.cs (1)
133public override MethodKind MethodKind
Symbols\Synthesized\SynthesizedSimpleProgramEntryPointSymbol.cs (1)
57MethodKind.Ordinary,
Symbols\Synthesized\SynthesizedStaticConstructor.cs (2)
189public override MethodKind MethodKind 193return MethodKind.StaticConstructor;
Symbols\TypeMap.cs (2)
193stopAt?.MethodKind == MethodKind.StaticConstructor || 194stopAt?.MethodKind == MethodKind.Constructor);
Symbols\TypeSymbol.cs (9)
1561case MethodKind.PropertyGet: 1564case MethodKind.PropertySet: 1567case MethodKind.EventAdd: 1570case MethodKind.EventRemove: 1684else if (implicitImplMethod.IsStatic && implicitImplMethod.MethodKind == MethodKind.Ordinary && implicitImplMethod.GetUnmanagedCallersOnlyAttributeData(forceComplete: true) is not null) 2131isOperator = interfaceMethod.MethodKind is MethodKind.UserDefinedOperator or MethodKind.Conversion; 2139(((MethodSymbol)member).MethodKind is MethodKind.UserDefinedOperator or MethodKind.Conversion) != isOperator.GetValueOrDefault())
Symbols\Wrapped\WrappedMethodSymbol.cs (1)
280public override MethodKind MethodKind
Microsoft.CodeAnalysis.CSharp.CodeStyle (18)
CastSimplifier.cs (5)
812if (sym is IMethodSymbol { MethodKind: MethodKind.UserDefinedOperator } op) 1028method.MethodKind is not (MethodKind.LocalFunction or MethodKind.LambdaMethod) && 1198if (originalMemberSymbol is not IMethodSymbol { MethodKind: MethodKind.DelegateInvoke } originalMethodSymbol || 1199rewrittenMemberSymbol is not IMethodSymbol { MethodKind: MethodKind.DelegateInvoke } rewrittenMethodSymbol)
ConversionExtensions.cs (1)
19conversion.MethodSymbol.MethodKind == MethodKind.Conversion &&
CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
81if (context.OwningSymbol is IMethodSymbol { MethodKind: MethodKind.Constructor })
CSharpMakeStructMemberReadOnlyAnalyzer.cs (4)
74MethodKind: MethodKind.Ordinary or MethodKind.ExplicitInterfaceImplementation or MethodKind.PropertyGet or MethodKind.PropertySet,
CSharpSemanticFacts.cs (1)
65if (symbol is IMethodSymbol { MethodKind: MethodKind.Conversion })
CSharpUseIndexOperatorDiagnosticAnalyzer.InfoCache.cs (2)
79if (method.MethodKind == MethodKind.PropertyGet) 93Debug.Assert(method.MethodKind == MethodKind.Ordinary);
ExpressionSyntaxExtensions.cs (1)
372MethodKind: MethodKind.ReducedExtension,
Helpers.cs (3)
70(method.MethodKind == MethodKind.PropertyGet || method.MethodKind == MethodKind.Ordinary) && 143=> method.MethodKind != MethodKind.Ordinary
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
CSharpCodeGenerationService.cs (2)
158if (method.MethodKind == MethodKind.Conversion) 164if (method.MethodKind == MethodKind.UserDefinedOperator)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (2)
2008while (enclosingSymbol is IMethodSymbol { MethodKind: MethodKind.LocalFunction or MethodKind.AnonymousFunction } method)
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (2)
NamingStylesTests.cs (2)
220[InlineData("void [|m|]() {}", "void M() {}", MethodKind.Ordinary, Accessibility.Private)] 221[InlineData("void Outer() { void [|m|]() {} }", "void Outer() { void M() {} }", MethodKind.LocalFunction, Accessibility.NotApplicable)]
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupSessionManager_EventHookupSession.cs (1)
186new SymbolKindOrTypeKind(MethodKind.Ordinary),
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (42)
Completion\CompletionProviders\DeclarationNameCompletionProviderTests.cs (2)
2954SpecificationStyle(new SymbolKindOrTypeKind(MethodKind.Ordinary), "Method"), 2956SpecificationStyle(new SymbolKindOrTypeKind(MethodKind.LocalFunction), "LocalFunction"),
Completion\CompletionProviders\DeclarationNameCompletionProviderTests_NameDeclarationInfoTests.cs (22)
39new SymbolKindOrTypeKind(MethodKind.Ordinary)); 57new SymbolKindOrTypeKind(MethodKind.Ordinary)); 74new SymbolKindOrTypeKind(MethodKind.Ordinary)); 92new SymbolKindOrTypeKind(MethodKind.Ordinary)); 128new SymbolKindOrTypeKind(MethodKind.LocalFunction)); 167new SymbolKindOrTypeKind(MethodKind.LocalFunction)); 434new SymbolKindOrTypeKind(MethodKind.Ordinary)); 448new SymbolKindOrTypeKind(MethodKind.Ordinary)); 462new SymbolKindOrTypeKind(MethodKind.Ordinary)); 476new SymbolKindOrTypeKind(MethodKind.Ordinary)); 489new SymbolKindOrTypeKind(MethodKind.Ordinary)); 505new SymbolKindOrTypeKind(MethodKind.Ordinary)); 590new SymbolKindOrTypeKind(MethodKind.LocalFunction)); 610new SymbolKindOrTypeKind(MethodKind.LocalFunction)); 632new SymbolKindOrTypeKind(MethodKind.LocalFunction)); 652new SymbolKindOrTypeKind(MethodKind.LocalFunction)); 672new SymbolKindOrTypeKind(MethodKind.LocalFunction)); 694new SymbolKindOrTypeKind(MethodKind.LocalFunction)); 714new SymbolKindOrTypeKind(MethodKind.LocalFunction)); 734new SymbolKindOrTypeKind(MethodKind.LocalFunction)); 754new SymbolKindOrTypeKind(MethodKind.LocalFunction)); 773new SymbolKindOrTypeKind(MethodKind.LocalFunction));
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (4)
95Assert.False(ideEngineAnalyzer.CallLog.Any(e => e.CallerName == method && e.MethodKind == MethodKind.DelegateInvoke && e.ReturnsVoid)); 96Assert.False(ideEngineAnalyzer.CallLog.Any(e => e.CallerName == method && e.MethodKind == MethodKind.DelegateInvoke && !e.ReturnsVoid)); 108Assert.False(compilerEngineAnalyzer.CallLog.Any(e => e.CallerName == method && e.MethodKind == MethodKind.DelegateInvoke && e.ReturnsVoid)); 109Assert.False(compilerEngineAnalyzer.CallLog.Any(e => e.CallerName == method && e.MethodKind == MethodKind.DelegateInvoke && !e.ReturnsVoid));
Diagnostics\NamingStyles\EditorConfigNamingStyleParserTests.cs (12)
49new SymbolKindOrTypeKind(MethodKind.Ordinary), 119new SymbolKindOrTypeKind(MethodKind.Ordinary), 120new SymbolKindOrTypeKind(MethodKind.LocalFunction) 178new SymbolKindOrTypeKind(MethodKind.Ordinary), 226new SymbolKindOrTypeKind(MethodKind.Ordinary), 310var expectedApplicableSymbolKindList = new[] { new SymbolKindOrTypeKind(MethodKind.LocalFunction) }; 340[InlineData("property,method", new object[] { SymbolKind.Property, MethodKind.Ordinary })] 344[InlineData("*", new object[] { SymbolKind.Namespace, TypeKind.Class, TypeKind.Struct, TypeKind.Interface, TypeKind.Enum, SymbolKind.Property, MethodKind.Ordinary, MethodKind.LocalFunction, SymbolKind.Field, SymbolKind.Event, TypeKind.Delegate, SymbolKind.Parameter, SymbolKind.TypeParameter, SymbolKind.Local })] 345[InlineData(null, new object[] { SymbolKind.Namespace, TypeKind.Class, TypeKind.Struct, TypeKind.Interface, TypeKind.Enum, SymbolKind.Property, MethodKind.Ordinary, MethodKind.LocalFunction, SymbolKind.Field, SymbolKind.Event, TypeKind.Delegate, SymbolKind.Parameter, SymbolKind.TypeParameter, SymbolKind.Local })] 346[InlineData("property,method,invalid", new object[] { SymbolKind.Property, MethodKind.Ordinary })]
NamingStylesTests.cs (2)
220[InlineData("void [|m|]() {}", "void M() {}", MethodKind.Ordinary, Accessibility.Private)] 221[InlineData("void Outer() { void [|m|]() {} }", "void Outer() { void M() {} }", MethodKind.LocalFunction, Accessibility.NotApplicable)]
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (29)
BreakingChanges.cs (2)
128Assert.Equal(MethodKind.PropertySet, derivedProperty1Synthesized.MethodKind); 131Assert.Equal(MethodKind.PropertyGet, derivedProperty2Synthesized.MethodKind);
CodeGen\CodeGenTupleTest.cs (1)
14347Assert.Equal(MethodKind.ReducedExtension, m6Method.MethodKind);
CodeGen\DestructorTests.cs (1)
824Assert.Equal(MethodKind.Destructor, destructor.MethodKind);
CodeGen\EventTests.cs (2)
216Assert.Equal(MethodKind.EventAdd, addMethod.MethodKind); 222Assert.Equal(MethodKind.EventRemove, removeMethod.MethodKind);
CodeGen\IndexerTests.cs (4)
161Assert.Equal(MethodKind.ExplicitInterfaceImplementation, getMethod.MethodKind); //since CallMethodsDirectly 166Assert.Equal(MethodKind.ExplicitInterfaceImplementation, setMethod.MethodKind); //since CallMethodsDirectly 269Assert.Equal(MethodKind.PropertyGet, getMethod.MethodKind); 281Assert.Equal(MethodKind.PropertySet, setMethod.MethodKind);
Emit\CompilationEmitTests.cs (1)
2732var cciMethods = class1TypeDef.GetMethods(context).Where(m => ((MethodSymbol)m.GetInternalSymbol()).MethodKind != MethodKind.Constructor);
Emit\EditAndContinue\SymbolMatcherTests.cs (16)
2020var members1 = compilation1.GetMember<NamedTypeSymbol>("A").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind is (MethodKind.Conversion or MethodKind.UserDefinedOperator)).ToArray(); 2021var members0 = compilation0.GetMember<NamedTypeSymbol>("A").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind is (MethodKind.Conversion or MethodKind.UserDefinedOperator)).ToArray(); 2071var members1 = compilation1.GetMember<NamedTypeSymbol>("A").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind is (MethodKind.Conversion or MethodKind.UserDefinedOperator)).ToArray(); 2072var members0 = compilation0.GetMember<NamedTypeSymbol>("A").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind is (MethodKind.Conversion or MethodKind.UserDefinedOperator)).ToArray(); 2132var members1 = compilation1.GetMember<NamedTypeSymbol>("A").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind is (MethodKind.Conversion or MethodKind.UserDefinedOperator)).ToArray(); 2133var members0 = compilation0.GetMember<NamedTypeSymbol>("A").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind is (MethodKind.Conversion or MethodKind.UserDefinedOperator)).ToArray(); 2188var members1 = compilation1.GetMember<NamedTypeSymbol>("A").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind is (MethodKind.Conversion or MethodKind.UserDefinedOperator)).ToArray(); 2242var members1 = compilation1.GetMember<NamedTypeSymbol>("A").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind is (MethodKind.Conversion or MethodKind.UserDefinedOperator)).ToArray();
Emit\EmitMetadataTests.cs (2)
602Assert.Equal(MethodKind.Constructor, ctor.MethodKind); 623Assert.Equal(MethodKind.StaticConstructor, cctor.MethodKind);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Attributes\AttributeTests_CallerInfoAttributes.cs (2)
4392Assert.Equal(MethodKind.Constructor, ctor.MethodKind); 4422Assert.Equal(MethodKind.Constructor, ctor.MethodKind);
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (8)
CSharpInstructionDecoder.cs (2)
39var displayFormat = (method.MethodKind == MethodKind.PropertyGet || method.MethodKind == MethodKind.PropertySet)
Symbols\EEMethodSymbol.cs (2)
233public override MethodKind MethodKind 235get { return MethodKind.Ordinary; }
Symbols\PlaceholderMethodSymbol.cs (2)
134public override MethodKind MethodKind 136get { return MethodKind.Ordinary; }
Symbols\SynthesizedContextMethodSymbol.cs (2)
110public override MethodKind MethodKind 112get { return MethodKind.Ordinary; }
Microsoft.CodeAnalysis.CSharp.Features (41)
ChangeSignature\CSharpChangeSignatureService.cs (1)
416symbolInfo.Symbol is IMethodSymbol { MethodKind: MethodKind.ReducedExtension },
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (4)
187new SymbolKindOrTypeKind(MethodKind.LocalFunction)), 529new SymbolKindOrTypeKind(MethodKind.Ordinary)); 552? ImmutableArray.Create(new SymbolKindOrTypeKind(MethodKind.LocalFunction)) : 555new SymbolKindOrTypeKind(MethodKind.LocalFunction));
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.CompletionSymbolDisplay.cs (4)
57case MethodKind.Ordinary: 60case MethodKind.UserDefinedOperator: 61case MethodKind.BuiltinOperator: 65case MethodKind.Conversion:
CSharpDeclarationComputer.cs (1)
109Debug.Assert(ctor.MethodKind == MethodKind.Constructor && typeDeclaration.ParameterList is object);
CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
81if (context.OwningSymbol is IMethodSymbol { MethodKind: MethodKind.Constructor })
CSharpMakeStructMemberReadOnlyAnalyzer.cs (4)
74MethodKind: MethodKind.Ordinary or MethodKind.ExplicitInterfaceImplementation or MethodKind.PropertyGet or MethodKind.PropertySet,
CSharpUseIndexOperatorDiagnosticAnalyzer.InfoCache.cs (2)
79if (method.MethodKind == MethodKind.PropertyGet) 93Debug.Assert(method.MethodKind == MethodKind.Ordinary);
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (11)
195return (member as IMethodSymbol)?.MethodKind == MethodKind.Constructor; 1946MethodKind.PropertyGet => symbol.AssociatedSymbol is IPropertySymbol { IsIndexer: true } ? CSharpFeaturesResources.indexer_getter : CSharpFeaturesResources.property_getter, 1947MethodKind.PropertySet => symbol.AssociatedSymbol is IPropertySymbol { IsIndexer: true } ? CSharpFeaturesResources.indexer_setter : CSharpFeaturesResources.property_setter, 1948MethodKind.StaticConstructor => FeaturesResources.static_constructor, 1949MethodKind.Destructor => CSharpFeaturesResources.destructor, 1950MethodKind.Conversion => CSharpFeaturesResources.conversion_operator, 1951MethodKind.LocalFunction => FeaturesResources.local_function, 2503IMethodSymbol { MethodKind: MethodKind.Destructor } 2507IMethodSymbol { MethodKind: MethodKind.Conversion or MethodKind.UserDefinedOperator } 3103if (container is IMethodSymbol { IsImplicitlyDeclared: false, MethodKind: MethodKind.Constructor })
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (4)
118methodKind: localFunction ? MethodKind.LocalFunction : MethodKind.Ordinary); 861var localFunctionPreferences = Options.NamingStyle.SymbolSpecifications.Where(symbol => symbol.AppliesTo(new SymbolSpecification.SymbolKindOrTypeKind(MethodKind.LocalFunction), CreateMethodModifiers(), null)); 864var localFunctionKind = new SymbolSpecification.SymbolKindOrTypeKind(MethodKind.LocalFunction);
GenerateMember\GenerateParameterizedMember\CSharpGenerateConversionService.cs (1)
220methodKind: MethodKind.Conversion);
InlineHints\CSharpInlineTypeHintsService.cs (1)
82if (parameter?.ContainingSymbol is IMethodSymbol { MethodKind: MethodKind.AnonymousFunction } &&
J\s\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs\Helpers.cs (3)
70(method.MethodKind == MethodKind.PropertyGet || method.MethodKind == MethodKind.Ordinary) && 143=> method.MethodKind != MethodKind.Ordinary
NavigationBar\CSharpNavigationBarItemService.cs (2)
180return method.MethodKind is MethodKind.PropertyGet or MethodKind.PropertySet;
SignatureHelp\InvocationExpressionSignatureHelpProviderBase_DelegateAndFunctionPointerInvoke.cs (1)
65if (invokeMethod.MethodKind == MethodKind.FunctionPointerSignature)
SignatureHelp\InvocationExpressionSignatureHelpProviderBase_MethodGroup.cs (1)
75methodGroup = methodGroup.Where(m => m.IsStatic || m is IMethodSymbol { MethodKind: MethodKind.LocalFunction });
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (38)
Semantics\DelegateTypeTests.cs (3)
902Assert.Equal(MethodKind.LambdaMethod, method.MethodKind); 945Assert.Equal(MethodKind.LambdaMethod, method.MethodKind); 5343Assert.Equal(MethodKind.LambdaMethod, method.MethodKind);
Semantics\InitOnlyMemberTests.cs (1)
2560bool isSetter = method.MethodKind == MethodKind.PropertySet;
Semantics\LambdaTests.cs (5)
854Assert.Equal(MethodKind.AnonymousFunction, (sym as IMethodSymbol).MethodKind); 864Assert.Equal(MethodKind.AnonymousFunction, (sym as IMethodSymbol).MethodKind); 3040Assert.Equal(MethodKind.AnonymousFunction, lambda.MethodKind); 3047Assert.Equal(MethodKind.AnonymousFunction, lambda.MethodKind); 5606Assert.Equal(MethodKind.LambdaMethod, method.MethodKind);
Semantics\LocalFunctionTests.cs (1)
1063Assert.Equal(MethodKind.Constructor, attrConstructor.MethodKind);
Semantics\NamedAndOptionalTests.cs (5)
2047var methods = module.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind == MethodKind.Ordinary).ToArray(); 2129var methods = module.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind == MethodKind.Ordinary).ToArray(); 2180var methods = module.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind == MethodKind.Ordinary).ToArray(); 2263var methods = module.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind == MethodKind.Ordinary).ToArray(); 2345var methods = module.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind == MethodKind.Ordinary).ToArray();
Semantics\NativeIntegerTests.cs (8)
327case MethodKind.Ordinary: 329case MethodKind.PropertyGet: 330case MethodKind.PropertySet: 345return !(nativeIntegerMember is IMethodSymbol { MethodKind: MethodKind.Constructor }); 441case MethodKind.Ordinary: 443case MethodKind.PropertyGet: 444case MethodKind.PropertySet: 459return !(nativeIntegerMember is MethodSymbol { MethodKind: MethodKind.Constructor });
Semantics\OperatorTests.cs (4)
7617Assert.Equal(MethodKind.BuiltinOperator, symbol1.MethodKind); 8102Assert.Equal(MethodKind.UserDefinedOperator, s.MethodKind); 8290Assert.Equal(MethodKind.UserDefinedOperator, symbol1.MethodKind); 8393Assert.Equal(MethodKind.BuiltinOperator, symbol1.MethodKind);
Semantics\PrimaryConstructorTests.cs (2)
134Assert.Equal(MethodKind.Constructor, members.Cast<MethodSymbol>().Single().MethodKind); 713Assert.All(c.GetMembers(), m => Assert.True(m is MethodSymbol { MethodKind: MethodKind.Constructor }));
Semantics\QueryTests.cs (4)
1462Assert.NotEqual(MethodKind.ReducedExtension, ((IMethodSymbol)info0.CastInfo.Symbol).MethodKind); 1471Assert.NotEqual(MethodKind.ReducedExtension, ((IMethodSymbol)info1.OperationInfo.Symbol).MethodKind); 1671Assert.Equal(MethodKind.ReducedExtension, ((IMethodSymbol)info0.CastInfo.Symbol).MethodKind); 1680Assert.Equal(MethodKind.ReducedExtension, ((IMethodSymbol)info1.OperationInfo.Symbol).MethodKind);
Semantics\RecordTests.cs (1)
22537var ordinaryMethods = comp.GetMember<NamedTypeSymbol>("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind == MethodKind.Ordinary).ToArray();
Semantics\TopLevelStatementsTests.cs (1)
4209Assert.Equal(MethodKind.LocalFunction, ((IMethodSymbol)local).MethodKind);
Semantics\UnsafeTests.cs (2)
6035Assert.Equal(MethodKind.BuiltinOperator, summaryMethod.MethodKind); 6497Assert.Equal(MethodKind.BuiltinOperator, summaryMethod.MethodKind);
Semantics\Utf8StringsLiteralsTests.cs (1)
4068Assert.Equal(MethodKind.BuiltinOperator, method.MethodKind);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (400)
Compilation\GetSemanticInfoTests.cs (7)
1074Assert.Equal(MethodKind.Constructor, ((IMethodSymbol)baseConstructor).MethodKind); 1093Assert.Equal(MethodKind.Constructor, ((IMethodSymbol)baseConstructor).MethodKind); 1116Assert.Equal(MethodKind.Constructor, invokedConstructor.MethodKind); 1172Assert.Equal(MethodKind.EventAdd, ((IMethodSymbol)parameterSymbol.ContainingSymbol).MethodKind); 1201Assert.Equal(MethodKind.EventRemove, ((IMethodSymbol)parameterSymbol.ContainingSymbol).MethodKind); 2360Assert.Equal(MethodKind.AnonymousFunction, ((IMethodSymbol)parameterSymbol.ContainingSymbol).MethodKind); 2542Assert.Equal(MethodKind.Conversion, ((IMethodSymbol)symbol.ContainingSymbol).MethodKind);
Compilation\SemanticModelAPITests.cs (3)
1371Assert.Equal(MethodKind.Constructor, method.MethodKind); 2087Assert.Equal(MethodKind.Constructor, method.MethodKind); 2104Assert.Equal(MethodKind.Constructor, method.MethodKind);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (10)
354Assert.Equal(MethodKind.PropertyGet, getterSymbol.MethodKind); 360Assert.Equal(MethodKind.PropertySet, setterSymbol.MethodKind); 1722symbol.Kind == SymbolKind.Method && (((IMethodSymbol)symbol).IsExtensionMethod || ((IMethodSymbol)symbol).MethodKind == MethodKind.ReducedExtension); 1885symbol.Kind == SymbolKind.Method && (((IMethodSymbol)symbol).IsExtensionMethod || ((IMethodSymbol)symbol).MethodKind == MethodKind.ReducedExtension); 2854Assert.Equal(MethodKind.ExplicitInterfaceImplementation, explicitMethodSymbol.MethodKind); 2874Assert.Equal(MethodKind.PropertyGet, explicitPropertyGetterSymbol.MethodKind); 2884Assert.Equal(MethodKind.PropertySet, explicitPropertySetterSymbol.MethodKind); 4435Assert.Equal(MethodKind.Conversion, conversion.MethodKind); 4466Assert.Equal(MethodKind.Conversion, conversion.MethodKind); 4497Assert.Equal(MethodKind.UserDefinedOperator, @operator.MethodKind);
Compilation\SemanticModelGetSemanticInfoTests.cs (5)
4886Assert.Equal(MethodKind.Constructor, ((IMethodSymbol)semanticInfo.Symbol.ContainingSymbol).MethodKind); 4893Assert.Equal(MethodKind.Constructor, ((IMethodSymbol)semanticInfo.Symbol.ContainingSymbol).MethodKind); 5413Assert.Equal(MethodKind.PropertySet, ((IMethodSymbol)sortedCandidates[0]).MethodKind); 6373Assert.Equal(MethodKind.Constructor, ((IMethodSymbol)symbol).MethodKind); 7295Assert.Equal(MethodKind.Constructor, ((IMethodSymbol)semanticInfo.Symbol).MethodKind);
DocumentationComments\CrefTests.cs (5)
3230Assert.Equal(MethodKind.Ordinary, ((IMethodSymbol)info.CandidateSymbols[0]).MethodKind); 3278Assert.Equal(MethodKind.Conversion, ((IMethodSymbol)info.CandidateSymbols[0]).MethodKind); 3302Assert.Equal(MethodKind.UserDefinedOperator, ((IMethodSymbol)info.CandidateSymbols[0]).MethodKind); 3326Assert.Equal(MethodKind.Constructor, ((IMethodSymbol)info.CandidateSymbols[0]).MethodKind); 5718Assert.Equal(MethodKind.UserDefinedOperator, ((IMethodSymbol)symbol).MethodKind);
DocumentationComments\DocumentationCommentIDTests.cs (1)
351var method = type.GetMembersUnordered().OfType<MethodSymbol>().Single(m => m.MethodKind == MethodKind.ExplicitInterfaceImplementation);
SymbolDisplay\SymbolDisplayTests.cs (4)
6306Assert.Equal(MethodKind.LocalFunction, localSymbol.MethodKind); 6349Assert.Equal(MethodKind.LocalFunction, localSymbol.MethodKind); 6384Assert.Equal(MethodKind.LocalFunction, localSymbol.MethodKind); 6478Assert.Equal(MethodKind.LocalFunction, localSymbol.MethodKind);
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (4)
433Assert.Equal(MethodKind.Ordinary, derivedMethod.MethodKind); 483Assert.Equal(MethodKind.PropertyGet, derivedGetter.MethodKind); 883if (m.MethodKind == MethodKind.Constructor) 887Assert.NotEqual(MethodKind.Ordinary, m.MethodKind);
Symbols\CheckedUserDefinedOperatorsTests.cs (103)
51var opSymbol = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 53Assert.Equal(MethodKind.UserDefinedOperator, opSymbol.MethodKind); 84var opSymbols = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).ToArray(); 87Assert.Equal(MethodKind.UserDefinedOperator, opSymbols[0].MethodKind); 88Assert.Equal(MethodKind.UserDefinedOperator, opSymbols[1].MethodKind); 118var opSymbols = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).ToArray(); 120Assert.Equal(MethodKind.UserDefinedOperator, opSymbols[0].MethodKind); 121Assert.Equal(MethodKind.UserDefinedOperator, opSymbols[1].MethodKind); 165var opSymbols = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).ToArray(); 168Assert.Equal(MethodKind.UserDefinedOperator, opSymbols[0].MethodKind); 169Assert.Equal(MethodKind.UserDefinedOperator, opSymbols[1].MethodKind); 356var opSymbol = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 381var opSymbol = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 457var opSymbol = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 484var opSymbol = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 515var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 533expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 541expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 687var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 705expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 713expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 810var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 818expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 826expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 859var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 867expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 875expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 904var opSymbol = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 906Assert.Equal(MethodKind.UserDefinedOperator, opSymbol.MethodKind); 938var opSymbols = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).ToArray(); 942Assert.Equal(MethodKind.UserDefinedOperator, opSymbol1.MethodKind); 948Assert.Equal(MethodKind.UserDefinedOperator, opSymbol2.MethodKind); 981var opSymbols = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).ToArray(); 984Assert.Equal(MethodKind.UserDefinedOperator, opSymbols[0].MethodKind); 985Assert.Equal(MethodKind.UserDefinedOperator, opSymbols[1].MethodKind); 1017var opSymbols = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).ToArray(); 1020Assert.Equal(MethodKind.UserDefinedOperator, opSymbols[0].MethodKind); 1023Assert.Equal(MethodKind.UserDefinedOperator, opSymbols[1].MethodKind); 1026Assert.Equal(MethodKind.UserDefinedOperator, opSymbols[2].MethodKind); 1268var opSymbol = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 1270Assert.Equal(MethodKind.UserDefinedOperator, opSymbol.MethodKind); 1302var opSymbols = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).ToArray(); 1305Assert.Equal(MethodKind.UserDefinedOperator, opSymbols[0].MethodKind); 1306Assert.Equal(MethodKind.UserDefinedOperator, opSymbols[1].MethodKind); 1337var opSymbols = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).ToArray(); 1339Assert.Equal(MethodKind.UserDefinedOperator, opSymbols[0].MethodKind); 1340Assert.Equal(MethodKind.UserDefinedOperator, opSymbols[1].MethodKind); 1371var opSymbols = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).ToArray(); 1374Assert.Equal(MethodKind.UserDefinedOperator, opSymbols[0].MethodKind); 1375Assert.Equal(MethodKind.UserDefinedOperator, opSymbols[1].MethodKind); 1526var opSymbol = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 1553var opSymbol = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 1635var opSymbol = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 1662var opSymbol = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 1695var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 1714expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 1722expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 1818var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 1836expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 1851expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 1884var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 1892expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 1900expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 1928var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 1946expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 1954expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 2053var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 2071expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 2079expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 2112var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 2120expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 2128expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 2181var opSymbol = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 2183Assert.Equal(MethodKind.UserDefinedOperator, opSymbol.MethodKind); 2226var opSymbols = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).ToArray(); 2229Assert.Equal(MethodKind.UserDefinedOperator, opSymbols[0].MethodKind); 2230Assert.Equal(MethodKind.UserDefinedOperator, opSymbols[1].MethodKind); 2441var opSymbol = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 2468var opSymbol = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 2502var opSymbol = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 2504Assert.Equal(MethodKind.Conversion, opSymbol.MethodKind); 2538var opSymbols = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).ToArray(); 2541Assert.Equal(MethodKind.Conversion, opSymbols[0].MethodKind); 2542Assert.Equal(MethodKind.Conversion, opSymbols[1].MethodKind); 2578var opSymbols = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).ToArray(); 2580Assert.Equal(MethodKind.Conversion, opSymbols[0].MethodKind); 2581Assert.Equal(MethodKind.Conversion, opSymbols[1].MethodKind); 2617var opSymbols = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).ToArray(); 2620Assert.Equal(MethodKind.Conversion, opSymbols[0].MethodKind); 2621Assert.Equal(MethodKind.Conversion, opSymbols[1].MethodKind); 2758var opSymbol = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 2781var opSymbol = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 2854var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 2872expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 2880expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 3020var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 3038expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 3046expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 3188var opSymbol = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 3190Assert.Equal(MethodKind.Conversion, opSymbol.MethodKind); 3220var opSymbols = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).ToArray(); 3223Assert.Equal(MethodKind.Conversion, opSymbols[0].MethodKind); 3224Assert.Equal(MethodKind.Conversion, opSymbols[1].MethodKind);
Symbols\ConversionTests.cs (3)
1721var conversionSymbols = destinationType.GetMembers().OfType<IMethodSymbol>().Where(m => m.MethodKind == MethodKind.Conversion); 1802Assert.Equal(MethodKind.Conversion, method.MethodKind); 1836Assert.Equal(MethodKind.Conversion, method.MethodKind);
Symbols\DefaultInterfaceImplementationTests.cs (5)
43768Assert.Equal(MethodKind.StaticConstructor, cctor.MethodKind); 44485Assert.Equal(MethodKind.StaticConstructor, cctor.MethodKind); 44583Assert.Equal(MethodKind.StaticConstructor, cctor.MethodKind); 45051Assert.Equal(MethodKind.StaticConstructor, cctor.MethodKind); 45519Assert.Equal(MethodKind.StaticConstructor, cctor.MethodKind);
Symbols\DestructorTests.cs (1)
401Assert.Equal(MethodKind.Destructor, destructor.MethodKind);
Symbols\ExtensionMethodTests.cs (2)
229Assert.Equal(MethodKind.ReducedExtension, gooSymbol.MethodKind); 232Assert.Equal(MethodKind.Ordinary, gooOriginal.MethodKind);
Symbols\InterfaceImplementationTests.cs (25)
131Assert.Equal(MethodKind.ExplicitInterfaceImplementation, classExplicitImplementationBase.MethodKind); 134Assert.Equal(MethodKind.ExplicitInterfaceImplementation, classExplicitImplementation.MethodKind); 137Assert.Equal(MethodKind.Ordinary, classImplicitImplementation.MethodKind); 257Assert.Equal(MethodKind.Ordinary, classImplicitImplementation.MethodKind); 260Assert.Equal(MethodKind.Ordinary, classImplicitImplementationBase.MethodKind); 440Assert.Equal(MethodKind.ExplicitInterfaceImplementation, baseClassExplicitImplementationBase.MethodKind); 443Assert.Equal(MethodKind.ExplicitInterfaceImplementation, baseClassExplicitImplementation.MethodKind); 446Assert.Equal(MethodKind.Ordinary, baseClassImplicitImplementation.MethodKind); 519Assert.Equal(MethodKind.Ordinary, baseClassImplicitImplementation.MethodKind); 522Assert.Equal(MethodKind.Ordinary, baseClassImplicitImplementationBase.MethodKind); 582Assert.Equal(MethodKind.Ordinary, baseClassMethod.MethodKind); 681Assert.Equal(MethodKind.ExplicitInterfaceImplementation, baseClassMethod.MethodKind); 688Assert.Equal(MethodKind.Ordinary, class1Method.MethodKind); 696Assert.Equal(MethodKind.Ordinary, class2Method.MethodKind); 744Assert.Equal(MethodKind.Ordinary, baseClassMethodVirtual.MethodKind); 748Assert.Equal(MethodKind.Ordinary, baseClassMethodNonVirtual.MethodKind); 760Assert.Equal(MethodKind.Ordinary, class1MethodVirtual.MethodKind); 764Assert.Equal(MethodKind.Ordinary, class1MethodNonVirtual.MethodKind); 778Assert.Equal(MethodKind.Ordinary, class2MethodVirtual.MethodKind); 782Assert.Equal(MethodKind.Ordinary, class2MethodNonVirtual.MethodKind); 1022Assert.Equal(MethodKind.PropertyGet, synthesizedExplicitImpls[1].MethodKind); 1026Assert.Equal(MethodKind.PropertySet, synthesizedExplicitImpls[2].MethodKind); 2220Where(m => m.MethodKind == MethodKind.ExplicitInterfaceImplementation). 2221Single(m => m.ExplicitInterfaceImplementations.Single().MethodKind == MethodKind.EventAdd); 2296Single(m => m.MethodKind == MethodKind.ExplicitInterfaceImplementation);
Symbols\Metadata\MetadataMemberTests.cs (2)
164Assert.Equal(MethodKind.Constructor, ctor.MethodKind); 205Assert.Equal(MethodKind.Ordinary, member1.MethodKind);
Symbols\Metadata\PE\LoadingEvents.cs (2)
99case MethodKind.EventAdd: 102case MethodKind.EventRemove:
Symbols\Metadata\PE\LoadingIndexers.cs (5)
1062Assert.Equal(MethodKind.Ordinary, accessor.MethodKind); 1067Assert.Equal(propertyIsIndexer ? MethodKind.PropertyGet : MethodKind.Ordinary, accessor.MethodKind); 1074Assert.Equal(propertyIsIndexer ? MethodKind.PropertySet : MethodKind.Ordinary, accessor.MethodKind);
Symbols\Metadata\PE\LoadingMethods.cs (21)
398Assert.Equal(MethodKind.ExplicitInterfaceImplementation, classMethod.MethodKind); 428Assert.Equal(MethodKind.Ordinary, classMethod.MethodKind); // because it has name without '.' 466Assert.Equal(MethodKind.ExplicitInterfaceImplementation, classMethod.MethodKind); 502Assert.Equal(MethodKind.ExplicitInterfaceImplementation, classMethod.MethodKind); 530Assert.Equal(MethodKind.Ordinary, classMethod.MethodKind); // because it has name without '.' 553Assert.Equal(MethodKind.Ordinary, classMethod.MethodKind); 593Assert.Equal(MethodKind.ExplicitInterfaceImplementation, classMethod.MethodKind); 619Assert.Equal(MethodKind.Ordinary, derivedClassMethod.MethodKind); 644Assert.Equal(MethodKind.Ordinary, classMethod.MethodKind); 648Assert.Equal(MethodKind.Ordinary, classGenericMethod.MethodKind); 677Assert.Equal(MethodKind.Ordinary, classMethod.MethodKind); 681Assert.Equal(MethodKind.Ordinary, classGenericMethod.MethodKind); 1182Assert.Equal(m.Name == ".cctor" ? MethodKind.StaticConstructor : MethodKind.Constructor, ((MethodSymbol)m).MethodKind); 1187Assert.Equal(MethodKind.Ordinary, ((MethodSymbol)m).MethodKind); 1192Assert.Equal(MethodKind.Ordinary, ((MethodSymbol)m).MethodKind); 1197Assert.Equal(MethodKind.Ordinary, ((MethodSymbol)m).MethodKind); 1202Assert.Equal(MethodKind.Ordinary, ((MethodSymbol)m).MethodKind); 1207Assert.Equal(MethodKind.Ordinary, ((MethodSymbol)m).MethodKind); 1212Assert.Equal(MethodKind.Ordinary, ((MethodSymbol)m).MethodKind); 1217Assert.Equal(MethodKind.Ordinary, ((MethodSymbol)m).MethodKind);
Symbols\ModuleInitializers\ModuleInitializersTests.cs (1)
133Assert.Equal(MethodKind.StaticConstructor, staticConstructor.MethodKind);
Symbols\RequiredMembersTests.cs (1)
86foreach (var ctor in type.GetMembers().Where(m => m is MethodSymbol { MethodKind: MethodKind.Constructor }))
Symbols\Retargeting\RetargetExplicitInterfaceImplementation.cs (5)
88if (method.MethodKind == MethodKind.ExplicitInterfaceImplementation) 158Assert.Equal(MethodKind.ExplicitInterfaceImplementation, retargetedClassCMethod1.MethodKind); 169Assert.Equal(MethodKind.ExplicitInterfaceImplementation, retargetedClassCMethod2.MethodKind); 178Assert.Equal(MethodKind.ExplicitInterfaceImplementation, retargetedClassCMethod3.MethodKind); 187Assert.Equal(MethodKind.ExplicitInterfaceImplementation, retargetedClassCMethod4.MethodKind);
Symbols\Source\CustomModifierCopyTests.cs (5)
414AssertAllParametersHaveConstModOpt(explicitImpl, ignoreLast: explicitImpl.MethodKind == MethodKind.PropertySet); 607var explicitGetterImpl = explicitImpls.Where(impl => impl.ImplementingMethod.MethodKind == MethodKind.PropertyGet).Single(); 610var explicitSetterImpl = explicitImpls.Where(impl => impl.ImplementingMethod.MethodKind == MethodKind.PropertySet).Single(); 1343m => m.MethodKind == MethodKind.ExplicitInterfaceImplementation); 1387m => m.MethodKind == MethodKind.ExplicitInterfaceImplementation);
Symbols\Source\DeclaringSyntaxNodeTests.cs (2)
159Assert.Equal(MethodKind.AnonymousFunction, sym.MethodKind); 523if (memb.Kind == SymbolKind.Method && ((IMethodSymbol)memb).MethodKind == MethodKind.Constructor)
Symbols\Source\DelegateTests.cs (1)
112Assert.Equal(MethodKind.DelegateInvoke, invoke.MethodKind);
Symbols\Source\EventTests.cs (8)
89Assert.Equal(MethodKind.EventAdd, addMethod.MethodKind); 94Assert.Equal(MethodKind.EventRemove, removeMethod.MethodKind); 127Assert.Equal(MethodKind.EventAdd, addMethod.MethodKind); 132Assert.Equal(MethodKind.EventRemove, removeMethod.MethodKind); 166Assert.Equal(MethodKind.EventAdd, addMethod.MethodKind); 171Assert.Equal(MethodKind.EventRemove, removeMethod.MethodKind); 201Assert.Equal(MethodKind.EventAdd, addMethod.MethodKind); 206Assert.Equal(MethodKind.EventRemove, removeMethod.MethodKind);
Symbols\Source\MethodTests.cs (8)
120Assert.Equal(MethodKind.Constructor, m.MethodKind); 144Assert.Equal(MethodKind.Ordinary, m.MethodKind); 1676Assert.Equal(MethodKind.ExplicitInterfaceImplementation, classMethod.MethodKind); 1720Assert.Equal(MethodKind.ExplicitInterfaceImplementation, classMethod.MethodKind); 1766Assert.Equal(MethodKind.ExplicitInterfaceImplementation, classMethod.MethodKind); 1820Assert.Equal(MethodKind.ExplicitInterfaceImplementation, classMethod.MethodKind); 1904Assert.Equal(MethodKind.StaticConstructor, staticConstructor.MethodKind); 1928Assert.Equal(MethodKind.StaticConstructor, staticConstructor.MethodKind);
Symbols\Source\NullablePublicAPITests.cs (4)
3492Assert.Equal(MethodKind.LambdaMethod, lambdaSymbol.MethodKind); 3545Assert.Equal(MethodKind.LambdaMethod, innerLambdaSymbol.MethodKind); 3606Assert.Equal(MethodKind.LambdaMethod, innerLambdaSymbol.MethodKind); 4135var localFunctionResult = lookupResults.OfType<IMethodSymbol>().First(m => m.MethodKind == MethodKind.LocalFunction);
Symbols\Source\PropertyTests.cs (20)
604Assert.True(accessor.MethodKind == MethodKind.PropertyGet || accessor.MethodKind == MethodKind.PropertySet, 724VerifyAccessor(goodStatic.GetMethod, goodStatic, MethodKind.PropertyGet); 725VerifyAccessor(goodStatic.SetMethod, goodStatic, MethodKind.PropertySet); 726VerifyAccessor(badStatic.GetMethod, goodStatic, MethodKind.PropertyGet); 727VerifyAccessor(badStatic.SetMethod, goodStatic, MethodKind.PropertySet); 728VerifyAccessor(mismatchedStatic.GetMethod, goodStatic, MethodKind.PropertyGet); 729VerifyAccessor(mismatchedStatic.SetMethod, null, MethodKind.Ordinary); 741VerifyAccessor(goodInstance.GetMethod, goodInstance, MethodKind.PropertyGet); 742VerifyAccessor(goodInstance.SetMethod, goodInstance, MethodKind.PropertySet); 743VerifyAccessor(badInstance.GetMethod, goodInstance, MethodKind.PropertyGet); 744VerifyAccessor(badInstance.SetMethod, goodInstance, MethodKind.PropertySet); 745VerifyAccessor(mismatchedInstance.GetMethod, goodInstance, MethodKind.PropertyGet); 746VerifyAccessor(mismatchedInstance.SetMethod, null, MethodKind.Ordinary); 750VerifyAccessor(staticAndInstance.GetMethod, goodStatic, MethodKind.PropertyGet); 751VerifyAccessor(staticAndInstance.SetMethod, goodInstance, MethodKind.PropertySet); 756VerifyAccessor(getUsedAsSet.GetMethod, goodInstance, MethodKind.PropertyGet); 757VerifyAccessor(getUsedAsSet.SetMethod, goodInstance, MethodKind.PropertyGet); 761private void VerifyAccessor(MethodSymbol accessor, PEPropertySymbol associatedProperty, MethodKind methodKind) 769var method = (methodKind == MethodKind.PropertyGet) ? associatedProperty.GetMethod : associatedProperty.SetMethod;
Symbols\Source\RecordTests.cs (2)
153Assert.Equal(MethodKind.PropertyGet, x.GetMethod!.MethodKind); 187Assert.Equal(MethodKind.PropertyGet, y.GetMethod!.MethodKind);
Symbols\StaticAbstractMembersInInterfacesTests.cs (122)
16107Assert.Equal(MethodKind.Ordinary, cM01.MethodKind); 16169Assert.Equal(MethodKind.ExplicitInterfaceImplementation, cM01.MethodKind); 16518Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c2M01.MethodKind); 16530Assert.Equal(MethodKind.Ordinary, c1M01.MethodKind); 16535Assert.Equal(MethodKind.Ordinary, c2M01.MethodKind); 16603Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c1M01.MethodKind); 16616Assert.Equal(MethodKind.Ordinary, c1M01.MethodKind); 16622Assert.Equal(MethodKind.Ordinary, c1M01.MethodKind); 16637Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c2M01.MethodKind); 19342Assert.Equal(MethodKind.UserDefinedOperator, cM01.MethodKind); 19423Assert.Equal(MethodKind.UserDefinedOperator, cM01.MethodKind); 19515Assert.Equal(MethodKind.UserDefinedOperator, cM01.MethodKind); 19613Assert.Equal(MethodKind.ExplicitInterfaceImplementation, cM01.MethodKind); 19696Assert.Equal(MethodKind.ExplicitInterfaceImplementation, cM01.MethodKind); 19788Assert.Equal(MethodKind.ExplicitInterfaceImplementation, cM01.MethodKind); 19877Assert.Equal(MethodKind.ExplicitInterfaceImplementation, cM01.MethodKind); 20303Assert.Equal(MethodKind.UserDefinedOperator, m01.MethodKind); 20304Assert.Equal(MethodKind.UserDefinedOperator, c1.GetMember<MethodSymbol>(opName).MethodKind); 20309Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c1M01.MethodKind); 20325Assert.Equal(MethodKind.UserDefinedOperator, c2M01.MethodKind); 20438Assert.Equal(MethodKind.UserDefinedOperator, m01.MethodKind); 20439Assert.Equal(MethodKind.UserDefinedOperator, c1.GetMember<MethodSymbol>(opName).MethodKind); 20444Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c1M01.MethodKind); 20460Assert.Equal(MethodKind.UserDefinedOperator, c2M01.MethodKind); 20517Assert.Equal(MethodKind.UserDefinedOperator, m01.MethodKind); 20597Assert.Equal(MethodKind.UserDefinedOperator, m01.MethodKind); 20689Assert.Equal(MethodKind.UserDefinedOperator, m01.MethodKind); 20754Assert.Equal(MethodKind.UserDefinedOperator, m01.MethodKind); 20835Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c2M01.MethodKind); 20850Assert.Equal(MethodKind.UserDefinedOperator, c1M01.MethodKind); 20857Assert.Equal(MethodKind.UserDefinedOperator, c2M01.MethodKind); 20951Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c1M01.MethodKind); 20964Assert.Equal(MethodKind.UserDefinedOperator, c1M01.MethodKind); 20970Assert.Equal(MethodKind.UserDefinedOperator, c1M01.MethodKind); 20985Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c2M01.MethodKind); 21062Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c1M01.MethodKind); 21075Assert.Equal(MethodKind.UserDefinedOperator, c1M01.MethodKind); 21081Assert.Equal(MethodKind.UserDefinedOperator, c1M01.MethodKind); 21096Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c2M01.MethodKind); 21197Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c1M01.MethodKind); 21210Assert.Equal(MethodKind.UserDefinedOperator, c1M01.MethodKind); 21216Assert.Equal(MethodKind.UserDefinedOperator, c1M01.MethodKind); 21230Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c2M01.MethodKind); 22981Assert.Equal(MethodKind.PropertyGet, cM01Get.MethodKind); 22996Assert.Equal(MethodKind.PropertySet, cM01Set.MethodKind); 23077Assert.Equal(MethodKind.PropertyGet, cM01Get.MethodKind); 23089Assert.Equal(MethodKind.PropertySet, cM01Set.MethodKind); 23167Assert.Equal(MethodKind.PropertyGet, cM01Get.MethodKind); 23182Assert.Equal(MethodKind.PropertySet, cM01Set.MethodKind); 23700Assert.Equal(MethodKind.PropertyGet, cM01Get.MethodKind); 23758Assert.Equal(MethodKind.PropertyGet, cM01Get.MethodKind); 23770Assert.Equal(MethodKind.PropertySet, cM01Set.MethodKind); 23862Assert.Equal(MethodKind.PropertyGet, cM01Get.MethodKind); 24052Assert.Equal(MethodKind.PropertySet, cM01Set.MethodKind); 24110Assert.Equal(MethodKind.PropertySet, cM01Set.MethodKind); 24122Assert.Equal(MethodKind.PropertyGet, cM01Get.MethodKind); 24214Assert.Equal(MethodKind.PropertySet, cM01Set.MethodKind); 24441Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c2M01Get.MethodKind); 24447Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c2M01Set.MethodKind); 24471Assert.Equal(MethodKind.PropertyGet, c1M01Get.MethodKind); 24482Assert.Equal(MethodKind.PropertySet, c1M01Set.MethodKind); 24496Assert.Equal(MethodKind.PropertyGet, c2M01Get.MethodKind); 24502Assert.Equal(MethodKind.PropertySet, c2M01Set.MethodKind); 24620Assert.Equal(MethodKind.PropertyGet, c1M01Get.MethodKind); 24630Assert.Equal(MethodKind.PropertySet, c1M01Set.MethodKind); 24645Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c1M01Set.MethodKind); 24681Assert.Equal(MethodKind.PropertyGet, c2M01Get.MethodKind); 24692Assert.Equal(MethodKind.PropertySet, c2M01Set.MethodKind); 24721Assert.Equal(MethodKind.PropertyGet, c3M01Get.MethodKind); 24732Assert.Equal(MethodKind.PropertySet, c3M01Set.MethodKind); 25759Assert.Equal(MethodKind.EventAdd, cM01Add.MethodKind); 25774Assert.Equal(MethodKind.EventRemove, cM01Remove.MethodKind); 25854Assert.Equal(MethodKind.EventAdd, cM01Add.MethodKind); 25869Assert.Equal(MethodKind.EventRemove, cM01Remove.MethodKind); 26402Assert.Equal(MethodKind.EventAdd, cM01Add.MethodKind); 26414Assert.Equal(MethodKind.EventRemove, cM01Remove.MethodKind); 26676Assert.Equal(MethodKind.EventRemove, cM01Remove.MethodKind); 26688Assert.Equal(MethodKind.EventAdd, cM01Add.MethodKind); 26969Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c2M01Add.MethodKind); 26975Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c2M01Remove.MethodKind); 26999Assert.Equal(MethodKind.EventAdd, c1M01Add.MethodKind); 27010Assert.Equal(MethodKind.EventRemove, c1M01Remove.MethodKind); 27024Assert.Equal(MethodKind.EventAdd, c2M01Add.MethodKind); 27030Assert.Equal(MethodKind.EventRemove, c2M01Remove.MethodKind); 27160Assert.Equal(MethodKind.EventAdd, c1M01Add.MethodKind); 27171Assert.Equal(MethodKind.EventRemove, c1M01Remove.MethodKind); 27185Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c1M01Add.MethodKind); 27197Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c1M01Remove.MethodKind); 27237Assert.Equal(MethodKind.EventAdd, c2M01Add.MethodKind); 27249Assert.Equal(MethodKind.EventRemove, c2M01Remove.MethodKind); 27271Assert.Equal(MethodKind.EventAdd, c3M02Add.MethodKind); 27282Assert.Equal(MethodKind.EventRemove, c3M02Remove.MethodKind); 27296Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c3M02Add.MethodKind); 27308Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c3M02Remove.MethodKind); 27350Assert.Equal(MethodKind.EventAdd, c4M02Add.MethodKind); 27363Assert.Equal(MethodKind.EventRemove, c4M02Remove.MethodKind); 28699Assert.Equal(MethodKind.Conversion, cM01.MethodKind); 28724Assert.Equal(MethodKind.Conversion, cM02.MethodKind); 28825Assert.Equal(MethodKind.ExplicitInterfaceImplementation, cM01.MethodKind); 28841Assert.Equal(MethodKind.ExplicitInterfaceImplementation, cM02.MethodKind); 29042Assert.Equal(MethodKind.Conversion, m01.MethodKind); 29043Assert.Equal(MethodKind.Conversion, c1.GetMember<MethodSymbol>(opName).MethodKind); 29048Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c1M01.MethodKind); 29064Assert.Equal(MethodKind.Conversion, c2M01.MethodKind); 29122Assert.Equal(MethodKind.Conversion, m01.MethodKind); 29218Assert.Equal(MethodKind.Conversion, m01.MethodKind); 29294Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c2M01.MethodKind); 29309Assert.Equal(MethodKind.Conversion, c1M01.MethodKind); 29316Assert.Equal(MethodKind.Conversion, c2M01.MethodKind); 29409Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c1M01.MethodKind); 29422Assert.Equal(MethodKind.Conversion, c1M01.MethodKind); 29428Assert.Equal(MethodKind.Conversion, c1M01.MethodKind); 29443Assert.Equal(MethodKind.ExplicitInterfaceImplementation, c2M01.MethodKind); 32215var opSymbol = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 32217Assert.Equal(MethodKind.UserDefinedOperator, opSymbol.MethodKind); 32252var opSymbols = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).ToArray(); 32256Assert.Equal(MethodKind.UserDefinedOperator, opSymbol1.MethodKind); 32262Assert.Equal(MethodKind.UserDefinedOperator, opSymbol2.MethodKind); 32463var opSymbol = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 32465Assert.Equal(MethodKind.UserDefinedOperator, opSymbol.MethodKind); 32650var opSymbol = c.GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 32652Assert.Equal(MethodKind.Conversion, opSymbol.MethodKind);
Symbols\TypeTests.cs (1)
1204.Count(m => !(m is MethodSymbol) || (m as MethodSymbol).MethodKind != MethodKind.Constructor));
Symbols\UnsignedRightShiftTests.cs (12)
1988Assert.Equal(MethodKind.UserDefinedOperator, compilation1.GetMember<MethodSymbol>("C1.op_UnsignedRightShift").MethodKind); 1997Assert.Equal(MethodKind.UserDefinedOperator, compilation2.GetMember<MethodSymbol>("C1.op_UnsignedRightShift").MethodKind); 2003Assert.Equal(MethodKind.UserDefinedOperator, compilation3.GetMember<MethodSymbol>("C1.op_UnsignedRightShift").MethodKind); 2240Assert.Equal(MethodKind.UserDefinedOperator, compilation1.GetMember<MethodSymbol>("C1.op_UnsignedRightShift").MethodKind); 2249Assert.Equal(MethodKind.UserDefinedOperator, compilation2.GetMember<MethodSymbol>("C1.op_UnsignedRightShift").MethodKind); 2255Assert.Equal(MethodKind.UserDefinedOperator, compilation3.GetMember<MethodSymbol>("C1.op_UnsignedRightShift").MethodKind); 2706var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 2724expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 2732expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 2878var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 2896expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 2904expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\LambdaUtilitiesTests.cs (1)
49bool expected = enclosingMethod.MethodKind == MethodKind.LambdaMethod && enclosingSyntax.Span.Contains(span.Value);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (8)
CSharpTrackingDiagnosticAnalyzer.cs (2)
22protected override bool IsOnCodeBlockSupported(SymbolKind symbolKind, MethodKind methodKind, bool returnsVoid) 24return base.IsOnCodeBlockSupported(symbolKind, methodKind, returnsVoid) && methodKind != MethodKind.EventRaise;
Extensions.cs (5)
535case MethodKind.EventAdd: 536case MethodKind.EventRemove: 540case MethodKind.PropertyGet: 541case MethodKind.PropertySet: 543var isSetter = accessor.MethodKind == MethodKind.PropertySet;
FunctionPointerUtilities.cs (1)
58Assert.Equal(MethodKind.FunctionPointerSignature, symbol.MethodKind);
Microsoft.CodeAnalysis.CSharp.Workspaces (17)
CastSimplifier.cs (5)
812if (sym is IMethodSymbol { MethodKind: MethodKind.UserDefinedOperator } op) 1028method.MethodKind is not (MethodKind.LocalFunction or MethodKind.LambdaMethod) && 1198if (originalMemberSymbol is not IMethodSymbol { MethodKind: MethodKind.DelegateInvoke } originalMethodSymbol || 1199rewrittenMemberSymbol is not IMethodSymbol { MethodKind: MethodKind.DelegateInvoke } rewrittenMethodSymbol)
Classification\SyntaxClassification\NameSyntaxClassifier.cs (2)
288if (methodSymbol.MethodKind == MethodKind.Constructor) 296return methodSymbol.MethodKind == MethodKind.ReducedExtension
Classification\SyntaxClassification\OperatorOverloadSyntaxClassifier.cs (1)
33&& methodSymbol.MethodKind == MethodKind.UserDefinedOperator)
ConversionExtensions.cs (1)
19conversion.MethodSymbol.MethodKind == MethodKind.Conversion &&
CSharpCodeGenerationService.cs (2)
158if (method.MethodKind == MethodKind.Conversion) 164if (method.MethodKind == MethodKind.UserDefinedOperator)
CSharpSemanticFacts.cs (1)
65if (symbol is IMethodSymbol { MethodKind: MethodKind.Conversion })
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs\ExpressionSyntaxExtensions.cs (1)
372MethodKind: MethodKind.ReducedExtension,
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (2)
2008while (enclosingSymbol is IMethodSymbol { MethodKind: MethodKind.LocalFunction or MethodKind.AnonymousFunction } method)
Recommendations\CSharpRecommendationServiceRunner.cs (1)
434if (symbol is IMethodSymbol { MethodKind: MethodKind.AnonymousFunction })
Recommendations\CSharpRecommendationServiceRunner_Operators.cs (1)
33if (member is not IMethodSymbol { MethodKind: MethodKind.UserDefinedOperator } method)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (2)
CodeGeneration\SyntaxGeneratorTests.cs (2)
2495var method = type.GetMembers().Single(m => m is IMethodSymbol { MethodKind: MethodKind.ExplicitInterfaceImplementation }); 4174var method = symbolC.GetMembers().OfType<IMethodSymbol>().Single(m => m.MethodKind == MethodKind.Ordinary);
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (6)
NamingStyles\NamingStylesTestOptionSets.cs (6)
119case MethodKind methodKind: 299ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(MethodKind.Ordinary)), 330ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(MethodKind.Ordinary)), 551ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(MethodKind.LocalFunction)), 768new SymbolSpecification.SymbolKindOrTypeKind(MethodKind.Ordinary), 769new SymbolSpecification.SymbolKindOrTypeKind(MethodKind.LocalFunction)),
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Utilities\SymbolEquivalenceComparerTests.cs (2)
1742Assert.Equal(MethodKind.ReducedExtension, method1.MethodKind); 1745Assert.Equal(MethodKind.ReducedExtension, method2.MethodKind);
Microsoft.CodeAnalysis.Features (104)
AbstractAddParameterCodeFixProvider.cs (1)
128var isConstructorInitializer = candidates.All(m => m.MethodKind == MethodKind.Constructor);
AbstractQualifyMemberAccessDiagnosticAnalyzer.cs (1)
155return symbol == null || symbol.IsStatic || symbol is IMethodSymbol { MethodKind: MethodKind.LocalFunction };
AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (3)
603/// 4. If method, then it is a constructor OR a method with <see cref="MethodKind.Ordinary"/>, 623case MethodKind.Constructor: 643case MethodKind.Ordinary:
AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
292if (((IMethodSymbol)symbolInfo.Symbol).MethodKind == MethodKind.LocalFunction)
AddParameterService.cs (1)
132if (method.MethodKind == MethodKind.ReducedExtension && insertionIndex < existingParameters.Count)
ChangeSignature\AbstractChangeSignatureService.cs (3)
273(methodSymbol.MethodKind == MethodKind.PropertyGet || methodSymbol.MethodKind == MethodKind.PropertySet)) 313if (methodSymbol.MethodKind == MethodKind.DelegateInvoke)
ChangeSignature\DelegateInvokeMethodReferenceFinder.cs (1)
33=> symbol.MethodKind == MethodKind.DelegateInvoke;
CodeLens\CodeLensFindReferenceProgress.cs (1)
134(definition as IMethodSymbol)?.MethodKind == MethodKind.Constructor;
CodeLens\CodeLensReferencesService.cs (1)
237if (method.MethodKind != MethodKind.AnonymousFunction)
Completion\Providers\AbstractContextVariableArgumentProvider.cs (2)
90while (enclosingSymbol is IMethodSymbol { MethodKind: MethodKind.LocalFunction or MethodKind.AnonymousFunction } method)
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (3)
354var getMethod = prop.GetMethod != null ? CreateAccessorSymbol(prop, MethodKind.PropertyGet) : null; 355var setMethod = prop.SetMethod != null ? CreateAccessorSymbol(prop, MethodKind.PropertySet) : null; 372private static IMethodSymbol CreateAccessorSymbol(IPropertySymbol prop, MethodKind kind)
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (1)
250method.MethodKind == MethodKind.BuiltinOperator &&
DeserializationConstructorCheck.cs (1)
26methodSymbol.MethodKind == MethodKind.Constructor &&
DocumentHighlighting\AbstractDocumentHighlightsService.cs (6)
142case MethodKind.AnonymousFunction: 143case MethodKind.PropertyGet: 144case MethodKind.PropertySet: 145case MethodKind.EventAdd: 146case MethodKind.EventRaise: 147case MethodKind.EventRemove:
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (28)
362MethodKind.Constructor => FeaturesResources.constructor, 363MethodKind.PropertyGet or MethodKind.PropertySet => FeaturesResources.property_accessor, 364MethodKind.EventAdd or MethodKind.EventRaise or MethodKind.EventRemove => FeaturesResources.event_accessor, 365MethodKind.BuiltinOperator or MethodKind.UserDefinedOperator or MethodKind.Conversion => FeaturesResources.operator_, 3454MethodKind.Ordinary or 3455MethodKind.Constructor or 3456MethodKind.EventAdd or 3457MethodKind.EventRemove or 3458MethodKind.EventRaise or 3459MethodKind.Conversion or 3460MethodKind.UserDefinedOperator or 3461MethodKind.PropertyGet or 3462MethodKind.PropertySet 3731else if (oldMethod.MethodKind == MethodKind.Conversion) 3735else if (oldMethod.MethodKind == MethodKind.ExplicitInterfaceImplementation || newMethod.MethodKind == MethodKind.ExplicitInterfaceImplementation) 3842if (oldMethod.MethodKind == MethodKind.DeclareMethod || newMethod.MethodKind == MethodKind.DeclareMethod) 4939Contract.ThrowIfFalse(oldCtor is IMethodSymbol { MethodKind: MethodKind.Constructor or MethodKind.StaticConstructor }); 5530if (containingLambda?.MethodKind is MethodKind.LambdaMethod or MethodKind.LocalFunction) 5918if ((member as IMethodSymbol)?.MethodKind == MethodKind.AnonymousFunction || HasParameterClosureScope(member))
EmbeddedLanguages\DateAndTime\LanguageServices\DateAndTimeLanguageDetector.cs (1)
179method.MethodKind == MethodKind.Ordinary &&
ExtractMethod\Extensions.cs (1)
51if (methodSymbol?.MethodKind != MethodKind.AnonymousFunction)
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (1)
130.Any(m => m.MethodKind == MethodKind.UserDefinedOperator &&
GenerateMember\GenerateParameterizedMember\AbstractGenerateConversionService.State.cs (2)
59MethodKind = MethodKind.Conversion; 83MethodKind = MethodKind.Conversion;
GenerateMember\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.State.cs (1)
59MethodKind = MethodKind.Ordinary;
GenerateMember\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (2)
87MethodKind = MethodKind.Ordinary; 126MethodKind = MethodKind.Ordinary;
GenerateMember\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.State.cs (1)
41public MethodKind MethodKind { get; internal set; }
GoToBase\AbstractGoToBaseService.cs (1)
47if (bases.Length == 0 && symbol is IMethodSymbol { MethodKind: MethodKind.Constructor } constructor)
ImplementInterface\AbstractImplementInterfaceService.CodeAction.cs (2)
483return method1.MethodKind == MethodKind.Ordinary && 484method2.MethodKind == MethodKind.Ordinary &&
InheritanceMargin\AbstractInheritanceMarginService.cs (4)
91MethodKind: MethodKind.Ordinary or MethodKind.ExplicitInterfaceImplementation or MethodKind.UserDefinedOperator or MethodKind.Conversion
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (1)
70if (method.MethodKind != MethodKind.Constructor)
InlineHints\AbstractInlineParameterNameHintsService.cs (2)
224if (parameter is not { ContainingSymbol: IMethodSymbol { MethodKind: MethodKind.Ordinary or MethodKind.LocalFunction } method })
IntroduceParameter\AbstractIntroduceParameterCodeRefactoringProvider.cs (6)
81var methodKind = methodSymbol.MethodKind; 82if (methodKind is not (MethodKind.Ordinary or MethodKind.LocalFunction or MethodKind.Constructor)) 156if (methodSymbol.MethodKind is not MethodKind.Constructor) 163if (methodSymbol.MethodKind is not MethodKind.LocalFunction)
LanguageServiceIndexFormat\SymbolMoniker.cs (1)
39if (symbol is IMethodSymbol method && method.MethodKind == MethodKind.BuiltinOperator)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (1)
667var extension = method.IsExtensionMethod || method.MethodKind == MethodKind.ReducedExtension;
MetadataAsSource\AbstractMetadataAsSourceService.WrappedMethodSymbol.cs (1)
56public MethodKind MethodKind => _symbol.MethodKind;
PullMemberUp\MemberAndDestinationValidator.cs (1)
47IMethodSymbol methodSymbol => methodSymbol.MethodKind == MethodKind.Ordinary,
Rename\SymbolicRenameInfo.cs (1)
206if (symbol.Kind == SymbolKind.Method && ((IMethodSymbol)symbol).MethodKind == MethodKind.UserDefinedOperator)
RQName\RQNodeBuilder.cs (8)
200if (symbol.MethodKind is MethodKind.UserDefinedOperator or 201MethodKind.BuiltinOperator or 202MethodKind.EventAdd or 203MethodKind.EventRemove or 204MethodKind.PropertySet or 205MethodKind.PropertyGet) 212if (symbol.MethodKind == MethodKind.Constructor) 216else if (symbol.MethodKind == MethodKind.Destructor)
Shared\Extensions\ISymbolExtensions_2.cs (9)
98if (methodSymbol.MethodKind is MethodKind.UserDefinedOperator or 99MethodKind.Conversion or 100MethodKind.BuiltinOperator) 105methodSymbol.MethodKind == MethodKind.ReducedExtension) 245case MethodKind.EventAdd: 246case MethodKind.EventRaise: 247case MethodKind.EventRemove: 248case MethodKind.PropertyGet: 249case MethodKind.PropertySet:
Shared\Naming\FallbackNamingRules.cs (3)
66var kinds = ImmutableArray.Create(new SymbolKindOrTypeKind(MethodKind.Ordinary)); 85var kinds = ImmutableArray.Create(new SymbolKindOrTypeKind(MethodKind.Ordinary)); 95var kinds = ImmutableArray.Create(new SymbolKindOrTypeKind(MethodKind.Ordinary));
Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator (1)
Generator.cs (1)
469if (symbol is IMethodSymbol { MethodKind: MethodKind.BuiltinOperator })
Microsoft.CodeAnalysis.Test.Utilities (25)
Compilation\CompilationExtensions.cs (2)
378if ((parameterInitializerOperation.Parameter.ContainingSymbol as IMethodSymbol)?.MethodKind is not (MethodKind.LocalFunction or MethodKind.AnonymousFunction))
Compilation\ControlFlowGraphVerifier.cs (2)
1741if (method.MethodKind == MethodKind.LocalFunction) 1756if (method.MethodKind == MethodKind.LocalFunction)
Compilation\TestOperationVisitor.cs (1)
792if (method.MethodKind == MethodKind.BuiltinOperator)
Diagnostics\FieldCouldBeReadOnlyAnalyzer.cs (2)
48bool inConstructor = containingMethod.MethodKind == MethodKind.Constructor; 49ITypeSymbol staticConstructorType = containingMethod.MethodKind == MethodKind.StaticConstructor ? containingMethod.ContainingType : null;
Diagnostics\TrackingDiagnosticAnalyzer.cs (18)
31public readonly MethodKind? MethodKind; 40MethodKind = symbol is IMethodSymbol ? ((IMethodSymbol)symbol).MethodKind : (MethodKind?)null; 107protected virtual bool IsOnCodeBlockSupported(SymbolKind symbolKind, MethodKind methodKind, bool returnsVoid) 114const MethodKind InvalidMethodKind = (MethodKind)(-1); 119new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.Constructor, ReturnsVoid = true }, 120new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.Conversion, ReturnsVoid = false }, 121new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.Destructor, ReturnsVoid = true }, // C# only 122new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.EventAdd, ReturnsVoid = true }, 123new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.EventRemove, ReturnsVoid = true }, 124new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.EventRaise, ReturnsVoid = true }, // VB only 125new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.ExplicitInterfaceImplementation, ReturnsVoid = true }, // C# only 126new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.Ordinary, ReturnsVoid = false }, 127new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.Ordinary, ReturnsVoid = true }, 128new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.PropertyGet, ReturnsVoid = false }, 129new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.PropertySet, ReturnsVoid = true }, 130new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.StaticConstructor, ReturnsVoid = true }, 131new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.UserDefinedOperator, ReturnsVoid = false },
Microsoft.CodeAnalysis.VisualBasic (528)
Analysis\FlowAnalysis\AbstractFlowPass.vb (2)
1210Debug.Assert(method.Kind <> MethodKind.Constructor) 1281Debug.Assert(method.Kind <> MethodKind.Constructor)
Analysis\FlowAnalysis\DataFlowPass.vb (18)
1225(Me.MethodSymbol.MethodKind = MethodKind.EventAdd AndAlso DirectCast(Me.MethodSymbol.AssociatedSymbol, EventSymbol).IsWindowsRuntimeEvent) Then 1252Case MethodKind.Conversion, MethodKind.UserDefinedOperator 1254Case MethodKind.PropertyGet 1257Debug.Assert(MethodSymbol.MethodKind = MethodKind.Ordinary OrElse MethodSymbol.MethodKind = MethodKind.LambdaMethod) 1264Case MethodKind.Conversion, MethodKind.UserDefinedOperator 1266Case MethodKind.PropertyGet 1269Debug.Assert(MethodSymbol.MethodKind = MethodKind.Ordinary OrElse MethodSymbol.MethodKind = MethodKind.LambdaMethod) 1280Case MethodKind.Conversion, MethodKind.UserDefinedOperator 1282Case MethodKind.PropertyGet 1284Case MethodKind.EventAdd 1315Case MethodKind.LambdaMethod 1318Case MethodKind.Conversion, MethodKind.UserDefinedOperator
Analysis\InitializerRewriter.vb (1)
273If methodSymbol.MethodKind = MethodKind.Constructor Then
Binding\Binder_Delegates.vb (2)
1150Debug.Assert(delegateInvoke.MethodKind = MethodKind.DelegateInvoke) 1241If method.MethodKind = MethodKind.DelegateInvoke AndAlso
Binding\Binder_Expressions.vb (7)
1847Dim containingMethodKind As MethodKind = Me.KindOfContainingMethodAtRunTime() 1849If containingMethodKind = MethodKind.Constructor Then 1853ElseIf containingMethodKind = MethodKind.SharedConstructor Then 1877Private Function KindOfContainingMethodAtRunTime() As MethodKind 1889Return MethodKind.SharedConstructor 1891Return MethodKind.Constructor 1903Return MethodKind.Ordinary ' Looks like a good default.
Binding\Binder_Invocation.vb (2)
58If Me.ContainingMember.Kind = SymbolKind.Method AndAlso DirectCast(Me.ContainingMember, MethodSymbol).MethodKind = MethodKind.Constructor Then 716Return methodGroup.Methods(0).MethodKind = MethodKind.Constructor
Binding\Binder_Lambda.vb (3)
727Dim containingMethodKind As MethodKind = binderForExpressionContainingLambda.KindOfContainingMethodAtRunTime() 730Case MethodKind.SharedConstructor, MethodKind.Constructor
Binding\Binder_Lookup.vb (1)
1963containingMethod.MethodKind = MethodKind.Constructor AndAlso
Binding\Binder_Statements.vb (7)
347If methodSymbol.MethodKind = MethodKind.Constructor Then 1844If DirectCast(altSymbol.ContainingSymbol, MethodSymbol).MethodKind = MethodKind.LambdaMethod Then 5010Debug.Assert(Me.ContainingMember.Kind = SymbolKind.Method AndAlso DirectCast(Me.ContainingMember, MethodSymbol).MethodKind = MethodKind.LambdaMethod) 5021Debug.Assert(Me.ContainingMember.Kind = SymbolKind.Method AndAlso DirectCast(Me.ContainingMember, MethodSymbol).MethodKind = MethodKind.LambdaMethod) 5051Debug.Assert(Me.ContainingMember.Kind = SymbolKind.Method AndAlso DirectCast(Me.ContainingMember, MethodSymbol).MethodKind = MethodKind.LambdaMethod) 5119Debug.Assert(Me.ContainingMember.Kind = SymbolKind.Method AndAlso DirectCast(Me.ContainingMember, MethodSymbol).MethodKind = MethodKind.LambdaMethod) 5131Debug.Assert(Me.ContainingMember.Kind = SymbolKind.Method AndAlso DirectCast(Me.ContainingMember, MethodSymbol).MethodKind = MethodKind.LambdaMethod)
Binding\Binder_Utils.vb (22)
862Debug.Assert(Not (container.Kind = SymbolKind.Method AndAlso DirectCast(container, MethodSymbol).MethodKind = MethodKind.DelegateInvoke)) 902If Not methodSymbol.MethodKind = MethodKind.DeclareMethod Then 1519Friend Shared Function GetAccessorName(name As String, kind As MethodKind, isWinMd As Boolean) As String 1522Case MethodKind.PropertyGet 1524Case MethodKind.PropertySet 1530Case MethodKind.EventAdd 1532Case MethodKind.EventRemove 1534Case MethodKind.EventRaise 1644MethodKindOrdinary = CUInt(MethodKind.Ordinary) << MethodKindShift 1645MethodKindConstructor = CUInt(MethodKind.Constructor) << MethodKindShift 1646MethodKindSharedConstructor = CUInt(MethodKind.SharedConstructor) << MethodKindShift 1647MethodKindDelegateInvoke = CUInt(MethodKind.DelegateInvoke) << MethodKindShift 1648MethodKindOperator = CUInt(MethodKind.UserDefinedOperator) << MethodKindShift 1649MethodKindConversion = CUInt(MethodKind.Conversion) << MethodKindShift 1650MethodKindPropertyGet = CUInt(MethodKind.PropertyGet) << MethodKindShift 1651MethodKindPropertySet = CUInt(MethodKind.PropertySet) << MethodKindShift 1652MethodKindEventAdd = CUInt(MethodKind.EventAdd) << MethodKindShift 1653MethodKindEventRemove = CUInt(MethodKind.EventRemove) << MethodKindShift 1654MethodKindEventRaise = CUInt(MethodKind.EventRaise) << MethodKindShift 1655MethodKindDeclare = CUInt(MethodKind.DeclareMethod) << MethodKindShift 1663Friend Function ToMethodKind(flags As SourceMemberFlags) As MethodKind 1664Return CType((flags >> SourceMemberFlags.MethodKindShift) And SourceMemberFlags.MethodKindMask, MethodKind)
Binding\Binder_XmlLiterals.vb (1)
1908Public Overrides ReadOnly Property MethodKind As MethodKind
Binding\DocumentationCommentCrefBinder.vb (27)
904CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, WellKnownMemberNames.TrueOperatorName, opInfo, useSiteInfo) 910CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, WellKnownMemberNames.FalseOperatorName, opInfo, useSiteInfo) 916CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, 925CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, WellKnownMemberNames.UnaryPlusOperatorName, opInfo, useSiteInfo) 928CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, WellKnownMemberNames.AdditionOperatorName, opInfo, useSiteInfo) 934CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, WellKnownMemberNames.UnaryNegationOperatorName, opInfo, useSiteInfo) 937CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, WellKnownMemberNames.SubtractionOperatorName, opInfo, useSiteInfo) 943CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, WellKnownMemberNames.MultiplyOperatorName, opInfo, useSiteInfo) 949CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, WellKnownMemberNames.DivisionOperatorName, opInfo, useSiteInfo) 955CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, WellKnownMemberNames.IntegerDivisionOperatorName, opInfo, useSiteInfo) 961CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, WellKnownMemberNames.ModulusOperatorName, opInfo, useSiteInfo) 967CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, WellKnownMemberNames.ExponentOperatorName, opInfo, useSiteInfo) 973CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, WellKnownMemberNames.EqualityOperatorName, opInfo, useSiteInfo) 979CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, WellKnownMemberNames.InequalityOperatorName, opInfo, useSiteInfo) 985CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, WellKnownMemberNames.LessThanOperatorName, opInfo, useSiteInfo) 991CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, WellKnownMemberNames.GreaterThanOperatorName, opInfo, useSiteInfo) 997CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, WellKnownMemberNames.LessThanOrEqualOperatorName, opInfo, useSiteInfo) 1003CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, WellKnownMemberNames.GreaterThanOrEqualOperatorName, opInfo, useSiteInfo) 1009CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, WellKnownMemberNames.LikeOperatorName, opInfo, useSiteInfo) 1015CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, WellKnownMemberNames.ConcatenateOperatorName, opInfo, useSiteInfo) 1021CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, 1030CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, 1039CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, WellKnownMemberNames.ExclusiveOrOperatorName, opInfo, useSiteInfo) 1045CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, 1054CollectOperatorsAndConversionsInType(type, symbols, MethodKind.UserDefinedOperator, 1063CollectOperatorsAndConversionsInType(type, symbols, MethodKind.Conversion, 1076kind As MethodKind,
Binding\SyntheticBoundTrees\SynthesizedPropertyAccessorBase.vb (2)
72If accessor.MethodKind = MethodKind.PropertyGet Then 88Debug.Assert(accessor.MethodKind = MethodKind.PropertySet)
BoundTree\BoundCall.vb (1)
80Dim isOperator As Boolean = (Method.MethodKind = MethodKind.UserDefinedOperator)
BoundTree\BoundUserDefinedBinaryOperator.vb (1)
39Debug.Assert(underlyingCall.Method.MethodKind = MethodKind.UserDefinedOperator AndAlso underlyingCall.Method.ParameterCount = 2)
BoundTree\BoundUserDefinedConversion.vb (1)
62Debug.Assert(underlyingCall.Method.MethodKind = MethodKind.Conversion AndAlso underlyingCall.Method.ParameterCount = 1)
BoundTree\BoundUserDefinedUnaryOperator.vb (1)
33Debug.Assert(underlyingCall.Method.MethodKind = MethodKind.UserDefinedOperator AndAlso underlyingCall.Method.ParameterCount = 1)
CodeGen\EmitAddress.vb (2)
279Return Me._method.MethodKind = MethodKind.SharedConstructor 281Return Me._method.MethodKind = MethodKind.Constructor AndAlso
Compilation\ClsComplianceChecker.vb (5)
217Dim methodKind As MethodKind = symbol.MethodKind 219Case MethodKind.PropertyGet, MethodKind.PropertySet 232Case MethodKind.EventAdd, MethodKind.EventRemove
Compilation\DocumentationComments\DocumentationCommentCompiler.Common.vb (3)
725Return If(method.MethodKind = MethodKind.DeclareMethod, "declare", 726If(method.MethodKind = MethodKind.UserDefinedOperator OrElse method.MethodKind = MethodKind.Conversion, "operator",
Compilation\DocumentationComments\DocumentationCommentCompiler.Includes.vb (2)
108Me.IsDeclareMethod = method.MethodKind = MethodKind.DeclareMethod 112Me.TypeParamSupported = Not Me.IsDeclareMethod AndAlso method.MethodKind <> MethodKind.UserDefinedOperator
Compilation\DocumentationComments\DocumentationCommentCompiler.Method.vb (3)
92If method.MethodKind = MethodKind.DeclareMethod Then 106If method.MethodKind = MethodKind.UserDefinedOperator OrElse method.MethodKind = MethodKind.DeclareMethod Then
Compilation\MethodCompiler.vb (10)
138DirectCast(symbol, MethodSymbol).MethodKind = MethodKind.Constructor Then 417Dim sourceTypeBinder As Binder = If(method.MethodKind = MethodKind.Ordinary, Nothing, 685If method.MethodKind = MethodKind.SharedConstructor Then 687ElseIf method.MethodKind = MethodKind.Constructor OrElse method.IsScriptInitializer Then 761sourceMethod.MethodKind = MethodKind.Constructor AndAlso 1455If method.MethodKind = MethodKind.Constructor OrElse method.MethodKind = MethodKind.SharedConstructor Then 1781If method.MethodKind = MethodKind.Constructor Then 1798If referencedMethod IsNot Nothing AndAlso referencedMethod.MethodKind = MethodKind.Constructor Then 1858Debug.Assert(constructor.MethodKind = MethodKind.Constructor)
Compilation\SemanticModel.vb (1)
1863(result.Kind = SymbolKind.Method AndAlso DirectCast(result, MethodSymbol).MethodKind = MethodKind.Constructor) Then
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.vb (1)
86If symbol.MethodKind = MethodKind.Conversion Then
Emit\MethodSymbolAdapter.vb (3)
298Return AdaptedMethodSymbol.MethodKind = MethodKind.Constructor 529Dim result = Me.MethodKind = MethodKind.Constructor OrElse 530Me.MethodKind = MethodKind.SharedConstructor
Emit\NamedTypeSymbolAdapter.vb (1)
475If handledEvent.hookupMethod.MethodKind = MethodKind.SharedConstructor Then
Emit\NoPia\EmbeddedMethod.vb (1)
55Return UnderlyingMethod.AdaptedMethodSymbol.MethodKind = MethodKind.Constructor
Emit\SynthesizedPrivateImplementationDetailsSharedConstructor.vb (2)
56Public Overrides ReadOnly Property MethodKind As MethodKind 58Return MethodKind.SharedConstructor
Lowering\Diagnostics\DiagnosticsPass.vb (1)
109If _containingSymbol.MethodKind = MethodKind.LambdaMethod Then
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter.vb (1)
382If method.MethodKind = MethodKind.DelegateInvoke Then
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_BinaryOperator.vb (2)
209Debug.Assert(helper.MethodKind = MethodKind.Ordinary OrElse helper.MethodKind = MethodKind.UserDefinedOperator)
Lowering\LambdaRewriter\LambdaFrameConstructor.vb (2)
23Public Overrides ReadOnly Property MethodKind As MethodKind 25Return MethodKind.Constructor
Lowering\LambdaRewriter\LambdaRewriter.Analysis.vb (2)
405If _currentParent.MethodKind <> MethodKind.LambdaMethod Then 432Loop While parent.MethodKind = MethodKind.LambdaMethod AndAlso parent IsNot container
Lowering\LambdaRewriter\LambdaRewriter.vb (4)
543If _innermostFramePointer.Kind = SymbolKind.Parameter AndAlso _topLevelMethod.MethodKind = MethodKind.Constructor AndAlso 1161(closureKind = ClosureKind.Static AndAlso CurrentMethod.MethodKind <> MethodKind.SharedConstructor AndAlso Not referencedMethod.IsGenericMethod) 1371If node.Method.MethodKind = MethodKind.Constructor AndAlso receiver IsNot Nothing AndAlso receiver.IsInstanceReference Then 1418If method.MethodKind = MethodKind.DelegateInvoke AndAlso
Lowering\LocalRewriter\LocalRewriter_BinaryOperators.vb (1)
202If boundCall.Method.MethodKind = MethodKind.PropertyGet AndAlso
Lowering\LocalRewriter\LocalRewriter_Constant.vb (2)
46If currentMethod.MethodKind <> MethodKind.SharedConstructor OrElse 146(currentMethod.MethodKind <> MethodKind.SharedConstructor OrElse
Lowering\LocalRewriter\LocalRewriter_Conversion.vb (2)
1064If memberSymbol.MethodKind = MethodKind.Constructor Then 1203If memberSymbol.MethodKind = MethodKind.Constructor Then
Lowering\LocalRewriter\LocalRewriter_LateAddressOf.vb (1)
36Debug.Assert(delegateInvoke.MethodKind = MethodKind.DelegateInvoke)
Lowering\LocalRewriter\LocalRewriter_RaiseEvent.vb (1)
160Dim accessorName As String = Binder.GetAccessorName(invocationListProperty.Name, MethodKind.PropertyGet, isWinMd:=False)
Semantics\Conversions.vb (1)
4172Debug.Assert(toDelegateInvokeMethod.MethodKind = MethodKind.DelegateInvoke)
Semantics\Operators.vb (29)
2814Debug.Assert(method.MethodKind = MethodKind.Conversion) 2836CollectUserDefinedOperators(source, destination, MethodKind.Conversion, 2850opKind As MethodKind, 2911opKind As MethodKind, 2955CollectUserDefinedOperators(argument.Type, Nothing, MethodKind.UserDefinedOperator, 2969CollectUserDefinedOperators(argument.Type, Nothing, MethodKind.UserDefinedOperator, 2992CollectUserDefinedOperators(argument.Type, Nothing, MethodKind.UserDefinedOperator, 2997CollectUserDefinedOperators(argument.Type, Nothing, MethodKind.UserDefinedOperator, 3002CollectUserDefinedOperators(argument.Type, Nothing, MethodKind.UserDefinedOperator, 3028CollectUserDefinedOperators(left.Type, right.Type, MethodKind.UserDefinedOperator, 3033CollectUserDefinedOperators(left.Type, right.Type, MethodKind.UserDefinedOperator, 3038CollectUserDefinedOperators(left.Type, right.Type, MethodKind.UserDefinedOperator, 3043CollectUserDefinedOperators(left.Type, right.Type, MethodKind.UserDefinedOperator, 3048CollectUserDefinedOperators(left.Type, right.Type, MethodKind.UserDefinedOperator, 3053CollectUserDefinedOperators(left.Type, right.Type, MethodKind.UserDefinedOperator, 3058CollectUserDefinedOperators(left.Type, right.Type, MethodKind.UserDefinedOperator, 3063CollectUserDefinedOperators(left.Type, right.Type, MethodKind.UserDefinedOperator, 3068CollectUserDefinedOperators(left.Type, right.Type, MethodKind.UserDefinedOperator, 3073CollectUserDefinedOperators(left.Type, right.Type, MethodKind.UserDefinedOperator, 3078CollectUserDefinedOperators(left.Type, right.Type, MethodKind.UserDefinedOperator, 3083CollectUserDefinedOperators(left.Type, right.Type, MethodKind.UserDefinedOperator, 3088CollectUserDefinedOperators(left.Type, right.Type, MethodKind.UserDefinedOperator, 3093CollectUserDefinedOperators(left.Type, right.Type, MethodKind.UserDefinedOperator, 3098CollectUserDefinedOperators(left.Type, right.Type, MethodKind.UserDefinedOperator, 3104CollectUserDefinedOperators(left.Type, right.Type, MethodKind.UserDefinedOperator, 3111CollectUserDefinedOperators(left.Type, right.Type, MethodKind.UserDefinedOperator, 3116CollectUserDefinedOperators(left.Type, right.Type, MethodKind.UserDefinedOperator, 3122CollectUserDefinedOperators(left.Type, right.Type, MethodKind.UserDefinedOperator, 3128CollectUserDefinedOperators(left.Type, right.Type, MethodKind.UserDefinedOperator,
Semantics\OverloadResolution.vb (1)
3395DirectCast(candidate.Candidate.UnderlyingSymbol, MethodSymbol).MethodKind = MethodKind.Constructor AndAlso
SymbolDisplay\SymbolDisplayVisitor.Members.vb (40)
170If symbol.MethodKind = MethodKind.ReducedExtension AndAlso format.ExtensionMethodStyle = SymbolDisplayExtensionMethodStyle.StaticMethod Then 172ElseIf symbol.MethodKind <> MethodKind.ReducedExtension AndAlso format.ExtensionMethodStyle = SymbolDisplayExtensionMethodStyle.InstanceMethod Then 197Case MethodKind.Constructor, MethodKind.StaticConstructor 201Case MethodKind.PropertyGet 212Case MethodKind.PropertySet 223Case MethodKind.EventAdd, 224MethodKind.EventRemove, 225MethodKind.EventRaise 233symbol.MethodKind = MethodKind.EventAdd, 236symbol.MethodKind = MethodKind.EventRemove, 244Case MethodKind.Conversion 259Case MethodKind.UserDefinedOperator, MethodKind.BuiltinOperator 270Case MethodKind.Ordinary, 271MethodKind.DelegateInvoke, 272MethodKind.ReducedExtension, 273MethodKind.AnonymousFunction 296If symbol.MethodKind = MethodKind.ReducedExtension Then 311Case MethodKind.Ordinary, MethodKind.DelegateInvoke, MethodKind.DeclareMethod 314Case MethodKind.ReducedExtension 319Case MethodKind.PropertyGet, 320MethodKind.PropertySet, 321MethodKind.EventAdd, 322MethodKind.EventRemove, 323MethodKind.EventRaise 338Case MethodKind.Constructor, MethodKind.StaticConstructor 345Case MethodKind.UserDefinedOperator, MethodKind.BuiltinOperator 361Case MethodKind.Conversion 370Case MethodKind.AnonymousFunction 383If symbol.MethodKind = MethodKind.BuiltinOperator Then 427AddParametersIfRequired(isExtensionMethod:=method.IsExtensionMethod AndAlso method.MethodKind <> MethodKind.ReducedExtension, 436Case MethodKind.Constructor, 437MethodKind.StaticConstructor 687Return vbMethod IsNot Nothing AndAlso vbMethod.MethodKind = MethodKind.DeclareMethod 701DirectCast(symbol, IMethodSymbol).MethodKind = MethodKind.AnonymousFunction OrElse
Symbols\AnonymousTypes\PublicSymbols\AnonymousType_PropertyPublicAccessors.vb (4)
57Public Overrides ReadOnly Property MethodKind As MethodKind 59Return MethodKind.PropertyGet 89Public Overrides ReadOnly Property MethodKind As MethodKind 91Return MethodKind.PropertySet
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType_PropertyAccessors.vb (4)
76Public Overrides ReadOnly Property MethodKind As MethodKind 78Return MethodKind.PropertyGet 108Public Overrides ReadOnly Property MethodKind As MethodKind 110Return MethodKind.PropertySet
Symbols\EmbeddedSymbols\EmbeddedSymbolManager.SymbolsCollection.vb (13)
232Dim methKind As MethodKind = DirectCast(symbol, MethodSymbol).MethodKind 234Case MethodKind.PropertyGet, MethodKind.PropertySet 239Case MethodKind.Ordinary, 240MethodKind.Constructor, 241MethodKind.SharedConstructor 288Case MethodKind.SharedConstructor, 289MethodKind.Constructor 372Debug.Assert(kind = MethodKind.Constructor OrElse 373kind = MethodKind.SharedConstructor OrElse 374kind = MethodKind.Ordinary OrElse 375kind = MethodKind.PropertyGet OrElse 376kind = MethodKind.PropertySet)
Symbols\ErrorMethodSymbol.vb (2)
186Public Overrides ReadOnly Property MethodKind As MethodKind 188Return MethodKind.Ordinary
Symbols\Metadata\PE\PEEventSymbol.vb (3)
90Me._addMethod.SetAssociatedEvent(Me, MethodKind.EventAdd) 94Me._removeMethod.SetAssociatedEvent(Me, MethodKind.EventRemove) 98Me._raiseMethod.SetAssociatedEvent(Me, MethodKind.EventRaise)
Symbols\Metadata\PE\PEMethodSymbol.vb (48)
81Public Property MethodKind As MethodKind 83Return CType((_bits >> s_methodKindOffset) And s_methodKindMask, MethodKind) 85Set(value As MethodKind) 149Public Sub InitializeMethodKind(methodKind As MethodKind) 327Public Overrides ReadOnly Property MethodKind As MethodKind 344Private Function ComputeMethodKind() As MethodKind 366Return MethodKind.SharedConstructor 369Return MethodKind.Constructor 373Return MethodKind.Ordinary 387Return MethodKind.Ordinary 392Return MethodKind.DelegateInvoke 395Return MethodKind.Ordinary 400Return _packedFlags.MethodKind = MethodKind.Constructor AndAlso ParameterCount = 0 415_packedFlags.MethodKind = MethodKind.Constructor 422Private Function ComputeMethodKindForPotentialOperatorOrConversion(opInfo As OverloadResolution.OperatorInfo) As MethodKind 428Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.Conversion, WellKnownMemberNames.ExplicitConversionName, True) 430Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.Conversion, WellKnownMemberNames.ImplicitConversionName, True) 432Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, Nothing, False) 435Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, Nothing, False) 437Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, WellKnownMemberNames.OnesComplementOperatorName, False) 461Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, Nothing, False) 465Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, Nothing, False) 467Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, WellKnownMemberNames.BitwiseAndOperatorName, False) 471Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, Nothing, False) 473Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, WellKnownMemberNames.BitwiseOrOperatorName, False) 477Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, Nothing, False) 479Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, WellKnownMemberNames.LeftShiftOperatorName, False) 483Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, Nothing, False) 485Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, WellKnownMemberNames.RightShiftOperatorName, False) 502potentialMethodKind As MethodKind, 505) As MethodKind 506Debug.Assert(potentialMethodKind = MethodKind.Conversion OrElse potentialMethodKind = MethodKind.UserDefinedOperator) 508Dim result As MethodKind = potentialMethodKind 530Case MethodKind.Ordinary 543If potentialMethodKind = MethodKind.Conversion AndAlso Not outputType.IsSameTypeIgnoringAll(contender.ReturnType) Then 559result = MethodKind.Ordinary 563contender._packedFlags.InitializeMethodKind(MethodKind.Ordinary) 647Me.MethodKind = MethodKind.Ordinary AndAlso 868Me.MethodKind = MethodKind.PropertySet AndAlso 951Friend Function SetAssociatedProperty(propertySymbol As PEPropertySymbol, methodKind As MethodKind) As Boolean 952Debug.Assert((methodKind = MethodKind.PropertyGet) OrElse (methodKind = MethodKind.PropertySet)) 960Friend Function SetAssociatedEvent(eventSymbol As PEEventSymbol, methodKind As MethodKind) As Boolean 961Debug.Assert((methodKind = MethodKind.EventAdd) OrElse (methodKind = MethodKind.EventRemove) OrElse (methodKind = MethodKind.EventRaise)) 965Private Function SetAssociatedPropertyOrEvent(propertyOrEventSymbol As Symbol, methodKind As MethodKind) As Boolean
Symbols\Metadata\PE\PEPropertySymbol.vb (2)
125_getMethod.SetAssociatedProperty(Me, MethodKind.PropertyGet) 129_setMethod.SetAssociatedProperty(Me, MethodKind.PropertySet)
Symbols\MethodKindExtensions.vb (6)
14Friend Function TryGetAccessorDisplayName(kind As MethodKind) As String 16Case MethodKind.EventAdd 19Case MethodKind.EventRaise 22Case MethodKind.EventRemove 25Case MethodKind.PropertyGet 28Case MethodKind.PropertySet
Symbols\MethodSymbol.vb (7)
22Public MustOverride ReadOnly Property MethodKind As MethodKind 31Return Me.ParameterCount = 0 AndAlso Me.MethodKind = MethodKind.Constructor 229Me.MethodKind <> MethodKind.PropertySet AndAlso 316Return DirectCast(Me.AssociatedSymbol, PropertySymbol).GetAccessorOverride(getter:=(MethodKind = MethodKind.PropertyGet)) 409Return IsExtensionMethod AndAlso MethodKind <> MethodKind.ReducedExtension 449Return Me.MethodKind = MethodKind.Constructor AndAlso Me.ContainingType.IsScriptClass 904Private ReadOnly Property IMethodSymbol_MethodKind As MethodKind Implements IMethodSymbol.MethodKind
Symbols\MethodSymbolExtensions.vb (2)
86Case MethodKind.UserDefinedOperator, MethodKind.Conversion
Symbols\NamedTypeSymbol.vb (2)
413Debug.Assert(method.MethodKind = MethodKind.Constructor) 421Debug.Assert(method.MethodKind = MethodKind.StaticConstructor)
Symbols\ObsoleteAttributeHelpers.vb (1)
130Dim accessorString = If(accessorSymbol.MethodKind = MethodKind.PropertyGet, "Get", "Set")
Symbols\PropertySymbol.vb (1)
174If If(TryCast(containingMember, MethodSymbol)?.MethodKind <> MethodKind.Constructor, True) Then
Symbols\ReducedExtensionMethodSymbol.vb (4)
42possiblyExtensionMethod.MethodKind <> MethodKind.ReducedExtension) Then 177If Not possiblyExtensionMethod.IsExtensionMethod OrElse possiblyExtensionMethod.MethodKind = MethodKind.ReducedExtension Then 345Public Overrides ReadOnly Property MethodKind As MethodKind 347Return MethodKind.ReducedExtension
Symbols\Retargeting\RetargetingMethodSymbol.vb (1)
434Public Overrides ReadOnly Property MethodKind As MethodKind
Symbols\SignatureOnlyMethodSymbol.vb (3)
23Private ReadOnly _methodKind As MethodKind 34Public Sub New(ByVal name As String, ByVal m_containingType As TypeSymbol, ByVal methodKind As MethodKind, ByVal callingConvention As CallingConvention, ByVal typeParameters As ImmutableArray(Of TypeParameterSymbol), ByVal parameters As ImmutableArray(Of ParameterSymbol), 124Public Overrides ReadOnly Property MethodKind() As MethodKind
Symbols\Source\CustomEventAccessorSymbol.vb (6)
56If Me.MethodKind = MethodKind.EventRaise Then 143Return Not (Me.MethodKind = MethodKind.EventAdd AndAlso _event.IsWindowsRuntimeEvent) 167If(Me.MethodKind = MethodKind.EventRaise, 174If Me.MethodKind = MethodKind.EventRaise Then 214If Me.MethodKind = MethodKind.EventAdd Then 220Debug.Assert(Me.MethodKind = MethodKind.EventRemove)
Symbols\Source\LambdaSymbol.vb (2)
272Public Overrides ReadOnly Property MethodKind As MethodKind 274Return MethodKind.LambdaMethod
Symbols\Source\LocalSymbol.vb (1)
155Debug.Assert((Me.IsFunctionValue AndAlso _container.Kind = SymbolKind.Method AndAlso DirectCast(_container, MethodSymbol).MethodKind = MethodKind.LambdaMethod) OrElse type.Equals(ComputeType()))
Symbols\Source\OverrideHidingHelper.vb (17)
497Case MethodKind.LambdaMethod, MethodKind.Constructor, MethodKind.SharedConstructor 499Case MethodKind.Conversion, MethodKind.DelegateInvoke, MethodKind.UserDefinedOperator, MethodKind.Ordinary, MethodKind.DeclareMethod, 500MethodKind.EventAdd, MethodKind.EventRaise, MethodKind.EventRemove, 501MethodKind.PropertyGet, MethodKind.PropertySet 626(DirectCast(DirectCast(overridingSym, Symbol), MethodSymbol).MethodKind = MethodKind.PropertyGet OrElse 627DirectCast(DirectCast(overridingSym, Symbol), MethodSymbol).MethodKind = MethodKind.PropertySet))) 688(DirectCast(DirectCast(overridingSym, Symbol), MethodSymbol).MethodKind = MethodKind.PropertyGet OrElse 689DirectCast(DirectCast(overridingSym, Symbol), MethodSymbol).MethodKind = MethodKind.PropertySet)))
Symbols\Source\SourceDeclareMethodSymbol.vb (1)
36Debug.Assert(MyBase.MethodKind = MethodKind.DeclareMethod)
Symbols\Source\SourceDelegateMethodSymbol.vb (1)
198Return Me.MethodKind = MethodKind.Constructor
Symbols\Source\SourceEventSymbol.vb (7)
103Case MethodKind.EventAdd 110Case MethodKind.EventRemove 117Case MethodKind.EventRaise 386Friend Function GetAccessorImplementations(kind As MethodKind) As ImmutableArray(Of MethodSymbol) 400Case MethodKind.EventAdd 402Case MethodKind.EventRemove 404Case MethodKind.EventRaise
Symbols\Source\SourceMemberContainerTypeSymbol.vb (19)
970Case MethodKind.EventAdd, MethodKind.EventRemove, MethodKind.PropertyGet, MethodKind.PropertySet 983If syntax Is Nothing AndAlso method.MethodKind = MethodKind.DelegateInvoke Then 1757If method IsNot Nothing AndAlso method.IsPartial AndAlso method.MethodKind = MethodKind.Ordinary Then 1807If candidate IsNot Nothing AndAlso candidate IsNot originalPartialMethod AndAlso candidate.MethodKind = MethodKind.Ordinary Then 2464Return sourceMethodSymbol.MethodKind = MethodKind.Ordinary OrElse sourceMethodSymbol.MethodKind = MethodKind.DeclareMethod 2767(DirectCast(sym, MethodSymbol).MethodKind = MethodKind.Constructor OrElse 2768DirectCast(sym, MethodSymbol).MethodKind = MethodKind.SharedConstructor) 2772If method.MethodKind = MethodKind.Constructor AndAlso method.ParameterCount = 0 Then 3442method.MethodKind <> MethodKind.Ordinary AndAlso 3443method.MethodKind <> MethodKind.UserDefinedOperator AndAlso 3444method.MethodKind <> MethodKind.Conversion Then 3606Dim methodMethodKind As MethodKind = method.MethodKind 3609Case MethodKind.Conversion 3611Case MethodKind.UserDefinedOperator 3631If methodMethodKind = MethodKind.Conversion Then
Symbols\Source\SourceMemberMethodSymbol.vb (1)
107If MethodKind = MethodKind.Ordinary Then
Symbols\Source\SourceMethodSymbol.vb (30)
629Public Overrides ReadOnly Property MethodKind As MethodKind 1274Debug.Assert(Me.MethodKind <> MethodKind.EventAdd, 1499If Not (Me.MethodKind <> MethodKind.Ordinary AndAlso Me.MethodKind <> MethodKind.DeclareMethod) AndAlso 1603If Me.MethodKind <> MethodKind.Ordinary AndAlso Me.MethodKind <> MethodKind.DeclareMethod Then 1775Case MethodKind.DeclareMethod 1779Case MethodKind.PropertyGet, MethodKind.PropertySet 1783Case MethodKind.EventAdd, MethodKind.EventRaise, MethodKind.EventRemove 1867Debug.Assert(MethodKind <> MethodKind.DeclareMethod) 1958Case MethodKind.Constructor, 1959MethodKind.SharedConstructor, 1960MethodKind.PropertyGet, 1961MethodKind.PropertySet, 1962MethodKind.EventAdd, 1963MethodKind.EventRemove, 1964MethodKind.EventRaise, 1965MethodKind.Conversion, 1966MethodKind.UserDefinedOperator 2243Case MethodKind.Constructor, 2244MethodKind.SharedConstructor, 2245MethodKind.EventRemove, 2246MethodKind.EventRaise 2251Case MethodKind.EventAdd 2257Case MethodKind.PropertyGet, MethodKind.PropertySet 2279If Me.MethodKind = MethodKind.UserDefinedOperator Then
Symbols\Source\SourceNamedTypeSymbol.vb (2)
2640If method.MethodKind = MethodKind.Constructor AndAlso method.ParameterCount = 0 Then 2649If method.MethodKind = MethodKind.Constructor AndAlso method.CanBeCalledWithNoParameters() Then
Symbols\Source\SourceNamedTypeSymbol_ComClass.vb (8)
381If DirectCast(member, MethodSymbol).MethodKind <> MethodKind.Ordinary Then 547Debug.Assert(method.MethodKind = MethodKind.Ordinary) 1212Public Overrides ReadOnly Property MethodKind As MethodKind 1215Case MethodKind.PropertyGet 1216Return MethodKind.PropertyGet 1217Case MethodKind.PropertySet 1218Return MethodKind.PropertySet 1220Return MethodKind.Ordinary
Symbols\Source\SourceNamedTypeSymbol_GroupClass.vb (2)
396ConflictsWithExistingMemberOrType(binder.GetAccessorName(propertyName, MethodKind.PropertyGet, False), membersBuilder, nestedTypes, conflictsWith) OrElse 397(disposeMethod.Length > 0 AndAlso ConflictsWithExistingMemberOrType(binder.GetAccessorName(propertyName, MethodKind.PropertySet, isWinMd), membersBuilder, nestedTypes, conflictsWith)) OrElse
Symbols\Source\SourceParameterSymbol.vb (8)
103If If(TryCast(Me.ContainingSymbol, MethodSymbol)?.MethodKind = MethodKind.DelegateInvoke, False) AndAlso 186If containingSymbol.Kind = SymbolKind.Method AndAlso DirectCast(containingSymbol, MethodSymbol).MethodKind = MethodKind.DeclareMethod Then 208Case MethodKind.Conversion, 209MethodKind.UserDefinedOperator, 210MethodKind.EventAdd, 211MethodKind.EventRemove 452If methodSymbol.MethodKind = MethodKind.DeclareMethod Then 496DirectCast(ContainingSymbol, MethodSymbol).MethodKind = MethodKind.DeclareMethod Then
Symbols\Source\SourcePropertyAccessorSymbol.vb (11)
36If(flags.ToMethodKind() = MethodKind.PropertyGet, flags, flags And Not SourceMemberFlags.Iterator), 105If methodKind = MethodKind.PropertySet Then 121Return m_property.GetAccessorOverride(getter:=(MethodKind = MethodKind.PropertyGet)) 224Case MethodKind.PropertyGet 237Case MethodKind.PropertySet 289Return If(MethodKind = MethodKind.PropertyGet, 334m_property.GetAccessorImplementations(getter:=(MethodKind = MethodKind.PropertyGet)), 349Return If(Me.MethodKind = MethodKind.PropertySet, ImmutableArray(Of CustomModifier).Empty, m_property.TypeCustomModifiers) 363Debug.Assert(Me.MethodKind = MethodKind.PropertySet) 369Return If(Me.MethodKind = MethodKind.PropertyGet, m_property, Nothing) 392Dim isSetter As Boolean = (method.MethodKind = MethodKind.PropertySet)
Symbols\Source\SourcePropertySymbol.vb (2)
202Binder.GetAccessorName(prop.Name, MethodKind.PropertyGet, isWinMd:=False), 211Binder.GetAccessorName(prop.Name, MethodKind.PropertySet,
Symbols\Source\SynthesizedEntryPointSymbol.vb (2)
163Public Overrides ReadOnly Property MethodKind As MethodKind 165Return MethodKind.Ordinary
Symbols\Source\SynthesizedEventAccessorSymbol.vb (8)
54If Me.MethodKind = MethodKind.EventRemove AndAlso m_propertyOrEvent.IsWindowsRuntimeEvent Then 84useSiteInfo = If(Me.MethodKind = MethodKind.EventRemove, Binder.GetUseSiteInfoForSpecialType(type), Nothing) 104Return Not (Me.MethodKind = MethodKind.EventAdd AndAlso m_propertyOrEvent.IsWindowsRuntimeEvent) 110Return ConstructFieldLikeEventAccessorBody(Me.m_propertyOrEvent, Me.MethodKind = MethodKind.EventAdd, compilation, diagnostics) 541Public Overrides ReadOnly Property MethodKind As MethodKind 543Return MethodKind.EventAdd 556Public Overrides ReadOnly Property MethodKind As MethodKind 558Return MethodKind.EventRemove
Symbols\Source\SynthesizedInteractiveInitializerMethod.vb (2)
105Public Overrides ReadOnly Property MethodKind As MethodKind 107Return MethodKind.Ordinary
Symbols\Source\SynthesizedMyGroupCollectionPropertyAccessorSymbol.vb (4)
157Public Overrides ReadOnly Property MethodKind As MethodKind 159Return MethodKind.PropertyGet 202Public Overrides ReadOnly Property MethodKind As MethodKind 204Return MethodKind.PropertySet
Symbols\Source\SynthesizedWithEventsAccessorSymbol.vb (6)
45Return sourceProperty.GetAccessorImplementations(getter:=(MethodKind = MethodKind.PropertyGet)) 53Return ContainingProperty.GetAccessorOverride(getter:=(MethodKind = MethodKind.PropertyGet)) 130Public Overrides ReadOnly Property MethodKind As MethodKind 132Return MethodKind.PropertyGet 178Public Overrides ReadOnly Property MethodKind As MethodKind 180Return MethodKind.PropertySet
Symbols\SubstitutedMethodSymbol.vb (1)
279Public Overrides ReadOnly Property MethodKind As MethodKind
Symbols\SubstitutedNamedType.vb (6)
457Case MethodKind.PropertyGet, MethodKind.PropertySet 460Return If(memberMethod.MethodKind = MethodKind.PropertyGet, propertySymbol.GetMethod, propertySymbol.SetMethod) 462Case MethodKind.EventAdd 467Case MethodKind.EventRemove 472Case MethodKind.EventRaise
Symbols\Symbol.vb (12)
540Case MethodKind.Ordinary, MethodKind.DeclareMethod, MethodKind.ReducedExtension 542Case MethodKind.DelegateInvoke, MethodKind.UserDefinedOperator, MethodKind.Conversion 580Case MethodKind.Ordinary, MethodKind.DeclareMethod, MethodKind.ReducedExtension, MethodKind.DelegateInvoke, MethodKind.UserDefinedOperator, MethodKind.Conversion
Symbols\Symbol_Attributes.vb (12)
74Case MethodKind.Constructor, 75MethodKind.SharedConstructor 78Case MethodKind.Ordinary, 79MethodKind.DeclareMethod, 80MethodKind.UserDefinedOperator, 81MethodKind.Conversion, 82MethodKind.PropertyGet, 83MethodKind.PropertySet, 84MethodKind.EventAdd, 85MethodKind.EventRaise, 86MethodKind.EventRemove, 87MethodKind.DelegateInvoke
Symbols\SymbolExtensions.vb (6)
59Case MethodKind.Conversion, MethodKind.UserDefinedOperator, MethodKind.BuiltinOperator 263Return kind = MethodKind.Constructor OrElse kind = MethodKind.SharedConstructor 456While If(member?.Kind = SymbolKind.Method, False) AndAlso DirectCast(member, MethodSymbol).MethodKind = MethodKind.AnonymousFunction
Symbols\SynthesizedSymbols\SynthesizedConstructorBase.vb (3)
190Public NotOverridable Overrides ReadOnly Property MethodKind As MethodKind 192Return If(m_isShared, MethodKind.SharedConstructor, MethodKind.Constructor)
Symbols\SynthesizedSymbols\SynthesizedDelegateMethodSymbol.vb (2)
311Public Overrides ReadOnly Property MethodKind As MethodKind 415Return Me.MethodKind = MethodKind.Constructor
Symbols\SynthesizedSymbols\SynthesizedGlobalMethodBase.vb (2)
156Public Overrides ReadOnly Property MethodKind As MethodKind 158Return MethodKind.Ordinary
Symbols\SynthesizedSymbols\SynthesizedInterfaceImplementationStubSymbol.vb (2)
172Public Overrides ReadOnly Property MethodKind As MethodKind 174Return MethodKind.Ordinary
Symbols\SynthesizedSymbols\SynthesizedIntrinsicOperatorSymbol.vb (2)
158Public Overrides ReadOnly Property MethodKind As MethodKind 160Return MethodKind.BuiltinOperator
Symbols\SynthesizedSymbols\SynthesizedMethod.vb (2)
197Public Overrides ReadOnly Property MethodKind As MethodKind 199Return MethodKind.Ordinary
Symbols\SynthesizedSymbols\SynthesizedParameterSymbol.vb (2)
106Debug.Assert(propertySetter.MethodKind = MethodKind.PropertySet) 116If method.MethodKind = MethodKind.PropertySet AndAlso
Symbols\SynthesizedSymbols\SynthesizedRegularMethodBase.vb (2)
140Public NotOverridable Overrides ReadOnly Property MethodKind As MethodKind 142Return MethodKind.Ordinary
Symbols\WellKnownMembers.vb (7)
428Dim targetMethodKind As MethodKind = MethodKind.Ordinary 435targetMethodKind = MethodKind.Constructor 443targetMethodKind = MethodKind.PropertyGet 473If methodKind = MethodKind.Conversion OrElse methodKind = MethodKind.UserDefinedOperator Then 474methodKind = MethodKind.Ordinary
Symbols\Wrapped\WrappedMethodSymbol.vb (1)
168Public Overrides ReadOnly Property MethodKind As MethodKind
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (2)
ExpressionSyntaxExtensions.vb (2)
159methodSymbol?.MethodKind = MethodKind.Ordinary AndAlso 397If method.MethodKind = MethodKind.ReducedExtension AndAlso
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
IMethodSymbolExtensions.vb (1)
19If symbol.IsStatic AndAlso Not symbol.MethodKind = MethodKind.ReducedExtension Then
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (3)
Attributes\AttributeTests_Tuples.vb (1)
254If DirectCast(s, MethodSymbol).MethodKind = MethodKind.EventRaise Then
Emit\EmitMetadata.vb (2)
785Assert.Equal(MethodKind.Constructor, ctor.MethodKind) 806Assert.Equal(MethodKind.SharedConstructor, cctor.MethodKind)
Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ExpressionCompiler (6)
Symbols\EEMethodSymbol.vb (2)
188Public Overrides ReadOnly Property MethodKind As MethodKind 190Return MethodKind.Ordinary
Symbols\PlaceholderMethodSymbol.vb (2)
101Public Overrides ReadOnly Property MethodKind As MethodKind 103Return MethodKind.Ordinary
Symbols\SynthesizedContextMethodSymbol.vb (2)
63Public Overrides ReadOnly Property MethodKind As MethodKind 65Return MethodKind.Ordinary
Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ExpressionCompiler.UnitTests (1)
HoistedMeTests.vb (1)
1120CheckLambdaOverloading(source, Function(m) m.MethodKind = MethodKind.Constructor)
Microsoft.CodeAnalysis.VisualBasic.Features (11)
ChangeSignature\VisualBasicChangeSignatureService.vb (1)
358If methodSymbol IsNot Nothing AndAlso methodSymbol.MethodKind = MethodKind.ReducedExtension Then
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.vb (2)
164If methodSymbol.MethodKind = MethodKind.PropertyGet Then 166ElseIf methodSymbol.MethodKind = MethodKind.PropertySet Then
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (3)
1864Case MethodKind.StaticConstructor 2513If method.MethodKind = MethodKind.Conversion OrElse method.MethodKind = MethodKind.UserDefinedOperator Then
GenerateConstructor\VisualBasicGenerateConstructorService.vb (1)
184Return If(methodSymbol IsNot Nothing AndAlso methodSymbol.MethodKind = MethodKind.Constructor, methodSymbol, Nothing)
GenerateMember\GenerateParameterizedMember\VisualBasicGenerateConversionService.vb (1)
163methodKind:=MethodKind.Conversion)
NavigationBar\VisualBasicNavigationBarItemService.vb (3)
277Return method.MethodKind = MethodKind.Ordinary OrElse 278method.MethodKind = MethodKind.UserDefinedOperator OrElse 279method.MethodKind = MethodKind.Conversion
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (23)
Compilation\SemanticModelGetDeclaredSymbolAPITests.vb (2)
1152Assert.Equal(MethodKind.Conversion, sym1.MethodKind) 1153Assert.Equal(MethodKind.UserDefinedOperator, sym2.MethodKind)
DeclaringSyntaxNodeTests.vb (2)
134Assert.Equal(MethodKind.LambdaMethod, sym.MethodKind) 514If memb.Kind = SymbolKind.Method AndAlso (DirectCast(memb, MethodSymbol)).MethodKind = MethodKind.Constructor Then
ExtensionMethods\SemanticModelTests.vb (3)
61Assert.Equal(MethodKind.ReducedExtension, method.MethodKind) 65Assert.Equal(MethodKind.Ordinary, method.CallsiteReducedFromMethod.MethodKind) 70Assert.Equal(MethodKind.ReducedExtension, reducedMethod.MethodKind)
Semantics\AnonymousTypesTests.vb (3)
1501Assert.Equal(MethodKind.LambdaMethod, lambda2.MethodKind) 1546Assert.Equal(MethodKind.LambdaMethod, lambda2.MethodKind) 1591Assert.Equal(MethodKind.LambdaMethod, lambda2.MethodKind)
Semantics\BinaryOperators.vb (2)
1109If method.MethodKind = MethodKind.UserDefinedOperator AndAlso 1225Assert.Equal(MethodKind.BuiltinOperator, symbol1.MethodKind)
Semantics\GetExtendedSemanticInfoTests.vb (4)
4359Assert.Equal(MethodKind.Constructor, method.MethodKind) 4398Assert.Equal(MethodKind.Constructor, method.MethodKind) 4434Assert.Equal(MethodKind.Constructor, method.MethodKind) 4473Assert.Equal(MethodKind.Constructor, method.MethodKind)
Semantics\OptionalArgumentTests.vb (5)
2202Dim methods = [module].GlobalNamespace.GetMember(Of NamedTypeSymbol)("C").GetMembers().OfType(Of MethodSymbol)().Where(Function(m) m.MethodKind = MethodKind.Ordinary).ToArray() 2313Dim methods = [module].GlobalNamespace.GetMember(Of NamedTypeSymbol)("C").GetMembers().OfType(Of MethodSymbol)().Where(Function(m) m.MethodKind = MethodKind.Ordinary).ToArray() 2402Dim methods = [module].GlobalNamespace.GetMember(Of NamedTypeSymbol)("C").GetMembers().OfType(Of MethodSymbol)().Where(Function(m) m.MethodKind = MethodKind.Ordinary).ToArray() 2524Dim methods = [module].GlobalNamespace.GetMember(Of NamedTypeSymbol)("C").GetMembers().OfType(Of MethodSymbol)().Where(Function(m) m.MethodKind = MethodKind.Ordinary).ToArray() 2685Dim methods = [module].GlobalNamespace.GetMember(Of NamedTypeSymbol)("C").GetMembers().OfType(Of MethodSymbol)().Where(Function(m) m.MethodKind = MethodKind.Ordinary).ToArray()
Semantics\UnaryOperators.vb (1)
756Assert.Equal(MethodKind.BuiltinOperator, symbol1.MethodKind)
Semantics\UsingStatementTest.vb (1)
345If (DirectCast(type.Symbol, MethodSymbol).MethodKind = MethodKind.Constructor) Then
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (259)
SymbolsTests\AnonymousDelegates\AnonymousDelegates_CreationAndEmit.vb (4)
306Assert.Equal(MethodKind.Constructor, x16.GetMethod(".ctor").MethodKind) 308Assert.Equal(MethodKind.DelegateInvoke, x16.GetMember(Of MethodSymbol)("Invoke").MethodKind) 310Assert.Equal(MethodKind.Ordinary, x16.GetMember(Of MethodSymbol)("BeginInvoke").MethodKind) 312Assert.Equal(MethodKind.Ordinary, x16.GetMember(Of MethodSymbol)("EndInvoke").MethodKind)
SymbolsTests\CheckedUserDefinedOperatorsTests.vb (18)
179If m.MethodKind <> MethodKind.Constructor Then 180Assert.Equal(MethodKind.Ordinary, m.MethodKind) 188Dim operators = c0_3.GetMembers().OfType(Of IMethodSymbol)().Where(Function(m) m.MethodKind <> MethodKind.Constructor).ToArray() 193Assert.Equal(MethodKind.UserDefinedOperator, m.MethodKind) 254If m.MethodKind <> MethodKind.Constructor Then 255Assert.Equal(MethodKind.UserDefinedOperator, m.MethodKind) 366If m.MethodKind <> MethodKind.Constructor Then 367Assert.Equal(MethodKind.Ordinary, m.MethodKind) 375Dim operators = c0_3.GetMembers().OfType(Of IMethodSymbol)().Where(Function(m) m.MethodKind <> MethodKind.Constructor).ToArray() 379Assert.Equal(MethodKind.UserDefinedOperator, operators(0).MethodKind) 437If m.MethodKind <> MethodKind.Constructor Then 438Assert.Equal(MethodKind.UserDefinedOperator, m.MethodKind) 545If m.MethodKind <> MethodKind.Constructor Then 546Assert.Equal(MethodKind.Ordinary, m.MethodKind) 554Dim operators = c0_3.GetMembers().OfType(Of IMethodSymbol)().Where(Function(m) m.MethodKind <> MethodKind.Constructor).ToArray() 558Assert.Equal(MethodKind.Conversion, operators(0).MethodKind) 612If m.MethodKind <> MethodKind.Constructor Then 613Assert.Equal(MethodKind.Conversion, m.MethodKind)
SymbolsTests\Metadata\MetadataMemberTests.vb (4)
168Assert.Equal(MethodKind.Constructor, ctor.MethodKind) 214Assert.Equal(MethodKind.Ordinary, member1.MethodKind) 732If m.MethodKind = MethodKind.Constructor Then 737Assert.NotEqual(MethodKind.Ordinary, m.MethodKind)
SymbolsTests\Metadata\PE\LoadingEvents.vb (2)
106Case MethodKind.EventAdd 109Case MethodKind.EventRemove
SymbolsTests\Metadata\PE\LoadingMethods.vb (16)
393Assert.Equal(MethodKind.Ordinary, classMethod.MethodKind) 422Assert.Equal(MethodKind.Ordinary, classMethod.MethodKind) 456Assert.Equal(MethodKind.Ordinary, classMethod.MethodKind) 488Assert.Equal(MethodKind.Ordinary, classMethod.MethodKind) 515Assert.Equal(MethodKind.Ordinary, classMethod.MethodKind) 541Assert.Equal(MethodKind.Ordinary, classMethod.MethodKind) 545Assert.Equal(MethodKind.Ordinary, classGenericMethod.MethodKind) 772Assert.Equal(If(m.Name = ".cctor", MethodKind.SharedConstructor, MethodKind.Constructor), DirectCast(m, MethodSymbol).MethodKind) 776Assert.Equal(MethodKind.Ordinary, DirectCast(m, MethodSymbol).MethodKind) 780Assert.Equal(MethodKind.Ordinary, DirectCast(m, MethodSymbol).MethodKind) 784Assert.Equal(MethodKind.Ordinary, DirectCast(m, MethodSymbol).MethodKind) 788Assert.Equal(MethodKind.Ordinary, DirectCast(m, MethodSymbol).MethodKind) 792Assert.Equal(MethodKind.Ordinary, DirectCast(m, MethodSymbol).MethodKind) 796Assert.Equal(MethodKind.Ordinary, DirectCast(m, MethodSymbol).MethodKind) 800Assert.Equal(MethodKind.Ordinary, DirectCast(m, MethodSymbol).MethodKind)
SymbolsTests\Metadata\PE\LoadingOperators.vb (122)
556New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator +(x As A1, y As A1) As A1"), 557New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator And(x As A1, y As A1) As A1"), 558New BaseLine(MethodKind.Ordinary, "Public Shared Overloads Function op_LogicalAnd(x As A1, y As A1) As A1"), 559New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator Or(x As A1, y As A1) As A1"), 560New BaseLine(MethodKind.Ordinary, "Public Shared Overloads Function op_LogicalOr(x As A1, y As A1) As A1"), 561New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator &(x As A1, y As A1) As A1"), 562New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator /(x As A1, y As A1) As A1"), 563New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator =(x As A1, y As A1) As A1"), 564New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator Xor(x As A1, y As A1) As A1"), 565New BaseLine(MethodKind.Conversion, "Public Shared Overloads Narrowing Operator CType(x As A1) As Byte"), 566New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator ^(x As A1, y As A1) As A1"), 567New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator IsFalse(x As A1) As Boolean"), 568New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator >(x As A1, y As A1) As A1"), 569New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator >=(x As A1, y As A1) As A1"), 570New BaseLine(MethodKind.Conversion, "Public Shared Overloads Widening Operator CType(x As A1) As Integer"), 571New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator <>(x As A1, y As A1) As A1"), 572New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator \(x As A1, y As A1) As A1"), 573New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator <<(x As A1, y As Integer) As A1"), 574New BaseLine(MethodKind.Ordinary, "Public Shared Overloads Function op_UnsignedLeftShift(x As A1, y As Integer) As A1"), 575New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator <(x As A1, y As A1) As A1"), 576New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator <=(x As A1, y As A1) As A1"), 577New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator Like(x As A1, y As A1) As A1"), 578New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator Mod(x As A1, y As A1) As A1"), 579New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator *(x As A1, y As A1) As A1"), 580New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator Not(x As A1) As A1"), 581New BaseLine(MethodKind.Ordinary, "Public Shared Overloads Function op_LogicalNot(x As A1) As A1"), 582New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator >>(x As A1, y As Integer) As A1"), 583New BaseLine(MethodKind.Ordinary, "Public Shared Overloads Function op_UnsignedRightShift(x As A1, y As Integer) As A1"), 584New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator -(x As A1, y As A1) As A1"), 585New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator IsTrue(x As A1) As Boolean"), 586New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator -(x As A1) As A1"), 587New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator +(x As A1) As A1")} 608Public ReadOnly Kind As MethodKind 611Public Sub New(kind As MethodKind, display As String) 1152New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator +(x As A1, y As A1) As A1"), 1153New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator And(x As A1, y As A1) As A1"), 1154New BaseLine(MethodKind.Ordinary, "Public Shared Overloads Function OP_LOGICALAND(x As A1, y As A1) As A1"), 1155New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator Or(x As A1, y As A1) As A1"), 1156New BaseLine(MethodKind.Ordinary, "Public Shared Overloads Function OP_LOGICALOR(x As A1, y As A1) As A1"), 1157New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator &(x As A1, y As A1) As A1"), 1158New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator /(x As A1, y As A1) As A1"), 1159New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator =(x As A1, y As A1) As A1"), 1160New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator Xor(x As A1, y As A1) As A1"), 1161New BaseLine(MethodKind.Conversion, "Public Shared Overloads Narrowing Operator CType(x As A1) As Byte"), 1162New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator ^(x As A1, y As A1) As A1"), 1163New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator IsFalse(x As A1) As Boolean"), 1164New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator >(x As A1, y As A1) As A1"), 1165New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator >=(x As A1, y As A1) As A1"), 1166New BaseLine(MethodKind.Conversion, "Public Shared Overloads Widening Operator CType(x As A1) As Integer"), 1167New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator <>(x As A1, y As A1) As A1"), 1168New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator \(x As A1, y As A1) As A1"), 1169New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator <<(x As A1, y As Integer) As A1"), 1170New BaseLine(MethodKind.Ordinary, "Public Shared Overloads Function OP_UNSIGNEDLEFTSHIFT(x As A1, y As Integer) As A1"), 1171New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator <(x As A1, y As A1) As A1"), 1172New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator <=(x As A1, y As A1) As A1"), 1173New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator Like(x As A1, y As A1) As A1"), 1174New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator Mod(x As A1, y As A1) As A1"), 1175New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator *(x As A1, y As A1) As A1"), 1176New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator Not(x As A1) As A1"), 1177New BaseLine(MethodKind.Ordinary, "Public Shared Overloads Function OP_LOGICALNOT(x As A1) As A1"), 1178New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator >>(x As A1, y As Integer) As A1"), 1179New BaseLine(MethodKind.Ordinary, "Public Shared Overloads Function OP_UNSIGNEDRIGHTSHIFT(x As A1, y As Integer) As A1"), 1180New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator -(x As A1, y As A1) As A1"), 1181New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator IsTrue(x As A1) As Boolean"), 1182New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator -(x As A1) As A1"), 1183New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator +(x As A1) As A1")} 1375Assert.Equal(MethodKind.Ordinary, method.MethodKind) 1914New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator +(x As A1, y As A1) As A1"), 1915New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator And(x As A1, y As A1) As A1"), 1916New BaseLine(MethodKind.Ordinary, "Public Shared Overloads Function op_LogicalAnd(x As A1, y As A1) As A1"), 1917New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator Or(x As A1, y As A1) As A1"), 1918New BaseLine(MethodKind.Ordinary, "Public Shared Overloads Function op_LogicalOr(x As A1, y As A1) As A1"), 1919New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator &(x As A1, y As A1) As A1"), 1920New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator /(x As A1, y As A1) As A1"), 1921New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator =(x As A1, y As A1) As A1"), 1922New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator Xor(x As A1, y As A1) As A1"), 1923New BaseLine(MethodKind.Conversion, "Public Shared Overloads Narrowing Operator CType(x As A1) As Byte"), 1924New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator ^(x As A1, y As A1) As A1"), 1925New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator IsFalse(x As A1) As Boolean"), 1926New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator >(x As A1, y As A1) As A1"), 1927New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator >=(x As A1, y As A1) As A1"), 1928New BaseLine(MethodKind.Conversion, "Public Shared Overloads Widening Operator CType(x As A1) As Integer"), 1929New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator <>(x As A1, y As A1) As A1"), 1930New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator \(x As A1, y As A1) As A1"), 1931New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator <<(x As A1, y As Integer) As A1"), 1932New BaseLine(MethodKind.Ordinary, "Public Shared Overloads Function op_UnsignedLeftShift(x As A1, y As Integer) As A1"), 1933New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator <(x As A1, y As A1) As A1"), 1934New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator <=(x As A1, y As A1) As A1"), 1935New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator Like(x As A1, y As A1) As A1"), 1936New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator Mod(x As A1, y As A1) As A1"), 1937New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator *(x As A1, y As A1) As A1"), 1938New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator Not(x As A1) As A1"), 1939New BaseLine(MethodKind.Ordinary, "Public Shared Overloads Function op_LogicalNot(x As A1) As A1"), 1940New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator >>(x As A1, y As Integer) As A1"), 1941New BaseLine(MethodKind.Ordinary, "Public Shared Overloads Function op_UnsignedRightShift(x As A1, y As Integer) As A1"), 1942New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator -(x As A1, y As A1) As A1"), 1943New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator IsTrue(x As A1) As Boolean"), 1944New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator -(x As A1) As A1"), 1945New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator +(x As A1) As A1")} 2075New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator And(x As A1, y As A1) As A1"), 2076New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator Or(x As A1, y As A1) As A1"), 2077New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator <<(x As A1, y As Integer) As A1"), 2078New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator Not(x As A1) As A1"), 2079New BaseLine(MethodKind.UserDefinedOperator, "Public Shared Overloads Operator >>(x As A1, y As Integer) As A1")} 2192Assert.Equal(MethodKind.Ordinary, DirectCast(a11.GetMembers("op_LogicalNot").Single(), MethodSymbol).MethodKind) 2195Assert.Equal(MethodKind.Ordinary, DirectCast(m, MethodSymbol).MethodKind) 2292Assert.Equal(MethodKind.Ordinary, DirectCast(a11.GetMembers().Where(Function(m) m.Name.Equals("op_OnesComplement")).Single(), MethodSymbol).MethodKind) 2293Assert.Equal(MethodKind.Ordinary, DirectCast(a11.GetMembers().Where(Function(m) m.Name.Equals("OP_ONESCOMPLEMENT")).Single(), MethodSymbol).MethodKind) 2294Assert.Equal(MethodKind.Ordinary, DirectCast(a11.GetMembers("op_LogicalNot").Single(), MethodSymbol).MethodKind) 2390Assert.Equal(MethodKind.Ordinary, DirectCast(a11.GetMembers().Where(Function(m) m.Name.Equals("OP_ONESCOMPLEMENT")).Single(), MethodSymbol).MethodKind) 2391Assert.Equal(MethodKind.Ordinary, DirectCast(a11.GetMembers().Where(Function(m) m.Name.Equals("op_OnesComplement")).Single(), MethodSymbol).MethodKind) 2392Assert.Equal(MethodKind.Ordinary, DirectCast(a11.GetMembers("op_LogicalNot").Single(), MethodSymbol).MethodKind) 2470Assert.Equal(MethodKind.Ordinary, DirectCast(a11.GetMembers("op_LogicalNot").Single(), MethodSymbol).MethodKind) 2471Assert.Equal(MethodKind.UserDefinedOperator, DirectCast(a11.GetMembers("op_OnesComplement").Single(), MethodSymbol).MethodKind) 2549Assert.Equal(MethodKind.UserDefinedOperator, DirectCast(a11.GetMembers("op_OnesComplement").Single(), MethodSymbol).MethodKind) 2550Assert.Equal(MethodKind.Ordinary, DirectCast(a11.GetMembers("op_LogicalNot").Single(), MethodSymbol).MethodKind) 2628Assert.Equal(MethodKind.UserDefinedOperator, DirectCast(a11.GetMembers().Where(Function(m) m.Name.Equals("op_OnesComplement")).Single(), MethodSymbol).MethodKind) 2629Assert.Equal(MethodKind.Ordinary, DirectCast(a11.GetMembers().Where(Function(m) m.Name.Equals("OP_ONESCOMPLEMENT")).Single(), MethodSymbol).MethodKind) 2692Assert.Equal(MethodKind.UserDefinedOperator, DirectCast(a11.GetMembers().Where(Function(m) m.Name.Equals("op_OnesComplement")).Single(), MethodSymbol).MethodKind) 2782Assert.Equal(MethodKind.UserDefinedOperator, DirectCast(m, MethodSymbol).MethodKind) 2804Assert.Equal(MethodKind.Conversion, op_Implicit.MethodKind) 2805Assert.Equal(MethodKind.Conversion, op_Explicit.MethodKind)
SymbolsTests\Source\DelegateTests.vb (1)
248Assert.Equal(MethodKind.DelegateInvoke, invoke.MethodKind)
SymbolsTests\Source\EventTests.vb (2)
1732Assert.Equal(MethodKind.EventAdd, DirectCast(mems(2), MethodSymbol).MethodKind) 1736Assert.Equal(MethodKind.EventRemove, DirectCast(mems(4), MethodSymbol).MethodKind)
SymbolsTests\Source\ImplementsTests.vb (1)
3813Single(Function(m) m.ExplicitInterfaceImplementations.Single().MethodKind = MethodKind.EventAdd)
SymbolsTests\Source\MethodTests.vb (9)
66Assert.Equal(MethodKind.Constructor, ctor.MethodKind) 85Assert.Equal(MethodKind.Ordinary, m1.MethodKind) 193Assert.Equal(MethodKind.Ordinary, m1.MethodKind) 242Assert.Equal(MethodKind.Constructor, m1.MethodKind) 261Assert.Equal(MethodKind.Constructor, m2.MethodKind) 315Assert.Equal(MethodKind.SharedConstructor, m1.MethodKind) 335Assert.Equal(MethodKind.SharedConstructor, m2.MethodKind) 388Assert.Equal(MethodKind.Constructor, m1.MethodKind) 413Assert.Equal(MethodKind.Constructor, m2.MethodKind)
SymbolsTests\Source\OperatorsTests.vb (60)
155New BaseLine(MethodKind.UserDefinedOperator, "op_UnaryPlus"), 156New BaseLine(MethodKind.UserDefinedOperator, "op_UnaryNegation"), 157New BaseLine(MethodKind.UserDefinedOperator, "op_OnesComplement"), 158New BaseLine(MethodKind.UserDefinedOperator, "op_True"), 159New BaseLine(MethodKind.UserDefinedOperator, "op_False"), 160New BaseLine(MethodKind.UserDefinedOperator, "op_Addition"), 161New BaseLine(MethodKind.UserDefinedOperator, "op_Subtraction"), 162New BaseLine(MethodKind.UserDefinedOperator, "op_Multiply"), 163New BaseLine(MethodKind.UserDefinedOperator, "op_Division"), 164New BaseLine(MethodKind.UserDefinedOperator, "op_IntegerDivision"), 165New BaseLine(MethodKind.UserDefinedOperator, "op_Modulus"), 166New BaseLine(MethodKind.UserDefinedOperator, "op_Exponent"), 167New BaseLine(MethodKind.UserDefinedOperator, "op_Equality"), 168New BaseLine(MethodKind.UserDefinedOperator, "op_Inequality"), 169New BaseLine(MethodKind.UserDefinedOperator, "op_LessThan"), 170New BaseLine(MethodKind.UserDefinedOperator, "op_GreaterThan"), 171New BaseLine(MethodKind.UserDefinedOperator, "op_LessThanOrEqual"), 172New BaseLine(MethodKind.UserDefinedOperator, "op_GreaterThanOrEqual"), 173New BaseLine(MethodKind.UserDefinedOperator, "op_Like"), 174New BaseLine(MethodKind.UserDefinedOperator, "op_Concatenate"), 175New BaseLine(MethodKind.UserDefinedOperator, "op_BitwiseAnd"), 176New BaseLine(MethodKind.UserDefinedOperator, "op_BitwiseOr"), 177New BaseLine(MethodKind.UserDefinedOperator, "op_ExclusiveOr"), 178New BaseLine(MethodKind.UserDefinedOperator, "op_LeftShift"), 179New BaseLine(MethodKind.UserDefinedOperator, "op_RightShift"), 180New BaseLine(MethodKind.Conversion, "op_Implicit"), 181New BaseLine(MethodKind.Conversion, "op_Explicit") 240Public ReadOnly Kind As MethodKind 243Public Sub New(kind As MethodKind, name As String) 360New BaseLine(MethodKind.UserDefinedOperator, "op_UnaryPlus"), 361New BaseLine(MethodKind.UserDefinedOperator, "op_UnaryNegation"), 362New BaseLine(MethodKind.UserDefinedOperator, "op_OnesComplement"), 363New BaseLine(MethodKind.UserDefinedOperator, "op_True"), 364New BaseLine(MethodKind.UserDefinedOperator, "op_False"), 365New BaseLine(MethodKind.UserDefinedOperator, "op_Addition"), 366New BaseLine(MethodKind.UserDefinedOperator, "op_Subtraction"), 367New BaseLine(MethodKind.UserDefinedOperator, "op_Multiply"), 368New BaseLine(MethodKind.UserDefinedOperator, "op_Division"), 369New BaseLine(MethodKind.UserDefinedOperator, "op_IntegerDivision"), 370New BaseLine(MethodKind.UserDefinedOperator, "op_Modulus"), 371New BaseLine(MethodKind.UserDefinedOperator, "op_Exponent"), 372New BaseLine(MethodKind.UserDefinedOperator, "op_Equality"), 373New BaseLine(MethodKind.UserDefinedOperator, "op_Inequality"), 374New BaseLine(MethodKind.Conversion, "op_Explicit"), 375New BaseLine(MethodKind.Conversion, "op_Implicit"), 376New BaseLine(MethodKind.Conversion, "op_Explicit"), 377New BaseLine(MethodKind.UserDefinedOperator, "op_LeftShift"), 378New BaseLine(MethodKind.UserDefinedOperator, "op_RightShift"), 379New BaseLine(MethodKind.UserDefinedOperator, "op_ExclusiveOr") 528New BaseLine(MethodKind.UserDefinedOperator, "op_UnaryPlus"), 529New BaseLine(MethodKind.UserDefinedOperator, "op_UnaryNegation"), 530New BaseLine(MethodKind.UserDefinedOperator, "op_OnesComplement"), 531New BaseLine(MethodKind.UserDefinedOperator, "op_True"), 532New BaseLine(MethodKind.UserDefinedOperator, "op_False"), 533New BaseLine(MethodKind.UserDefinedOperator, "op_Addition"), 534New BaseLine(MethodKind.UserDefinedOperator, "op_Subtraction"), 535New BaseLine(MethodKind.UserDefinedOperator, "op_Multiply"), 536New BaseLine(MethodKind.UserDefinedOperator, "op_Division"), 537New BaseLine(MethodKind.Conversion, "op_Implicit"), 538New BaseLine(MethodKind.Conversion, "op_Explicit")
SymbolsTests\Source\PropertyTests.vb (20)
5600VerifyAccessor(goodStatic.GetMethod, goodStatic, MethodKind.PropertyGet) 5601VerifyAccessor(goodStatic.SetMethod, goodStatic, MethodKind.PropertySet) 5602VerifyAccessor(badStatic.GetMethod, goodStatic, MethodKind.PropertyGet) 5603VerifyAccessor(badStatic.SetMethod, goodStatic, MethodKind.PropertySet) 5604VerifyAccessor(mismatchedStatic.GetMethod, goodStatic, MethodKind.PropertyGet) 5605VerifyAccessor(mismatchedStatic.SetMethod, mismatchedStatic, MethodKind.PropertySet) 5617VerifyAccessor(goodInstance.GetMethod, goodInstance, MethodKind.PropertyGet) 5618VerifyAccessor(goodInstance.SetMethod, goodInstance, MethodKind.PropertySet) 5619VerifyAccessor(badInstance.GetMethod, goodInstance, MethodKind.PropertyGet) 5620VerifyAccessor(badInstance.SetMethod, goodInstance, MethodKind.PropertySet) 5621VerifyAccessor(mismatchedInstance.GetMethod, goodInstance, MethodKind.PropertyGet) 5622VerifyAccessor(mismatchedInstance.SetMethod, mismatchedInstance, MethodKind.PropertySet) 5626VerifyAccessor(staticAndInstance.GetMethod, goodStatic, MethodKind.PropertyGet) 5627VerifyAccessor(staticAndInstance.SetMethod, goodInstance, MethodKind.PropertySet) 5632VerifyAccessor(getUsedAsSet.GetMethod, goodInstance, MethodKind.PropertyGet) 5633VerifyAccessor(getUsedAsSet.SetMethod, goodInstance, MethodKind.PropertyGet) 8110Dim isAccessor = accessor.MethodKind = MethodKind.PropertyGet OrElse accessor.MethodKind = MethodKind.PropertySet 8165Private Sub VerifyAccessor(accessor As MethodSymbol, associatedProperty As PEPropertySymbol, methodKind As MethodKind) 8170Dim method = If((methodKind = MethodKind.PropertyGet), associatedProperty.GetMethod, associatedProperty.SetMethod)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (5)
BasicTrackingDiagnosticAnalyzer.vb (3)
14Protected Overrides Function IsOnCodeBlockSupported(symbolKind As SymbolKind, methodKind As MethodKind, returnsVoid As Boolean) As Boolean 16methodKind <> MethodKind.Destructor AndAlso 17methodKind <> MethodKind.ExplicitInterfaceImplementation
MockSymbols.vb (2)
571Public Overrides ReadOnly Property MethodKind As MethodKind 573Return MethodKind.Ordinary
Microsoft.CodeAnalysis.VisualBasic.Workspaces (13)
CaseCorrection\VisualBasicCaseCorrectionService.Rewriter.vb (1)
169(symbol.IsKind(SymbolKind.Method) AndAlso DirectCast(symbol, IMethodSymbol).MethodKind = MethodKind.Constructor)
Classification\SyntaxClassification\NameSyntaxClassifier.vb (3)
212Case MethodKind.Constructor 224Case MethodKind.BuiltinOperator, 225MethodKind.UserDefinedOperator
Classification\SyntaxClassification\OperatorOverloadSyntaxClassifier.vb (1)
29DirectCast(symbolInfo.Symbol, IMethodSymbol).MethodKind = MethodKind.UserDefinedOperator Then
CodeCleanup\Providers\AddMissingTokensCodeCleanupProvider.vb (1)
124Function(s) If(TryCast(s, IMethodSymbol)?.MethodKind = MethodKind.Ordinary, False))
CodeGeneration\VisualBasicCodeGenerationService.vb (2)
154If method.MethodKind = MethodKind.UserDefinedOperator Then 158If method.MethodKind = MethodKind.Conversion Then
IMethodSymbolExtensions.vb (1)
19If symbol.IsStatic AndAlso Not symbol.MethodKind = MethodKind.ReducedExtension Then
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb\ExpressionSyntaxExtensions.vb (2)
159methodSymbol?.MethodKind = MethodKind.Ordinary AndAlso 397If method.MethodKind = MethodKind.ReducedExtension AndAlso
Recommendations\VisualBasicRecommendationServiceRunner.vb (2)
337symbols = symbols.WhereAsArray(Function(s) s.Kind <> SymbolKind.Method OrElse DirectCast(s, IMethodSymbol).MethodKind <> MethodKind.UserDefinedOperator) 376If method IsNot Nothing AndAlso method.MethodKind = MethodKind.Constructor Then
Microsoft.CodeAnalysis.Workspaces (157)
AbstractSpeculationAnalyzer.cs (3)
374if (methodSymbol.MethodKind == MethodKind.LocalFunction && newMethodSymbol.MethodKind == MethodKind.LocalFunction) 839((IMethodSymbol)symbol).MethodKind == MethodKind.DelegateInvoke;
AccessibilityExtensions.cs (2)
39case MethodKind.AnonymousFunction: 40case MethodKind.LocalFunction:
CodeGenerationAbstractMethodSymbol.cs (2)
77public virtual MethodKind MethodKind => MethodKind.Ordinary;
CodeGenerationConstructorSymbol.cs (2)
39public override MethodKind MethodKind => MethodKind.Constructor;
CodeGenerationConversionSymbol.cs (2)
46public override MethodKind MethodKind => MethodKind.Conversion;
CodeGenerationDestructorSymbol.cs (2)
30public override MethodKind MethodKind => MethodKind.Destructor;
CodeGenerationMethodSymbol.cs (5)
25public override MethodKind MethodKind { get; } 40MethodKind methodKind = MethodKind.Ordinary, 47Debug.Assert(!isInitOnly || methodKind == MethodKind.PropertySet); 48this.IsInitOnly = methodKind == MethodKind.PropertySet && isInitOnly;
CodeGenerationNamedTypeSymbol.cs (2)
174this.GetMembers().OfType<IMethodSymbol>().Where(m => m.MethodKind == MethodKind.Constructor && !m.IsStatic)); 184this.GetMembers().OfType<IMethodSymbol>().Where(m => m.MethodKind == MethodKind.StaticConstructor && m.IsStatic));
CodeGenerationOperatorSymbol.cs (2)
45public override MethodKind MethodKind => MethodKind.UserDefinedOperator;
CodeGenerationSymbolFactory.cs (4)
165MethodKind methodKind = MethodKind.Ordinary, 186MethodKind methodKind = MethodKind.Ordinary,
Editing\SyntaxGenerator.cs (12)
262if (method.MethodKind is not (MethodKind.UserDefinedOperator or MethodKind.Conversion)) 748case MethodKind.Constructor: 749case MethodKind.SharedConstructor: 752case MethodKind.Destructor: 755case MethodKind.Ordinary or MethodKind.ExplicitInterfaceImplementation: 758case MethodKind.UserDefinedOperator or MethodKind.Conversion: 845case MethodKind.Constructor: 846case MethodKind.SharedConstructor: 848case MethodKind.Ordinary:
EditorConfigNamingStyleParser_SymbolSpec.cs (4)
130private static readonly SymbolKindOrTypeKind _method = new(MethodKind.Ordinary); 131private static readonly SymbolKindOrTypeKind _localFunction = new(MethodKind.LocalFunction); 370case MethodKind.Ordinary: 373case MethodKind.LocalFunction:
FindSymbols\FindReferences\Finders\ConstructorInitializerSymbolReferenceFinder.cs (1)
20=> symbol.MethodKind == MethodKind.Constructor;
FindSymbols\FindReferences\Finders\ConstructorSymbolReferenceFinder.cs (3)
27=> symbol.MethodKind is MethodKind.Constructor or MethodKind.StaticConstructor; 66result.AddRange(symbol.MethodKind == MethodKind.Constructor
FindSymbols\FindReferences\Finders\DestructorSymbolReferenceFinder.cs (1)
16=> symbol.MethodKind == MethodKind.Destructor;
FindSymbols\FindReferences\Finders\ExplicitConversionSymbolReferenceFinder.cs (1)
20=> symbol is { MethodKind: MethodKind.Conversion, Name: WellKnownMemberNames.ExplicitConversionName or WellKnownMemberNames.ImplicitConversionName } &&
FindSymbols\FindReferences\Finders\ExplicitInterfaceMethodReferenceFinder.cs (1)
16=> symbol.MethodKind == MethodKind.ExplicitInterfaceImplementation;
FindSymbols\FindReferences\Finders\OperatorSymbolReferenceFinder.cs (2)
18=> symbol.MethodKind is MethodKind.UserDefinedOperator or MethodKind.BuiltinOperator;
FindSymbols\FindReferences\Finders\OrdinaryMethodReferenceFinder.cs (5)
15=> symbol.MethodKind is MethodKind.Ordinary or 16MethodKind.DelegateInvoke or 17MethodKind.DeclareMethod or 18MethodKind.ReducedExtension or 19MethodKind.LocalFunction;
FindSymbols\FindReferences\Finders\ParameterSymbolReferenceFinder.cs (2)
170if (declaredSymbol is IMethodSymbol { MethodKind: not MethodKind.AnonymousFunction } method) 208if (containingMethod.MethodKind == MethodKind.DelegateInvoke)
FindSymbols\ReferenceLocationExtensions.cs (1)
95if (method.MethodKind != MethodKind.AnonymousFunction)
IMethodSymbolExtensions.cs (1)
49if (symbol.MethodKind == MethodKind.BuiltinOperator)
IParameterSymbolExtensions.cs (2)
30MethodKind: MethodKind.Constructor, 62MethodKind: MethodKind.Constructor,
ISemanticFactsExtensions.cs (1)
113methodSymbol.MethodKind == MethodKind.UserDefinedOperator;
ISymbolExtensions_Accessibility.cs (3)
154((IMethodSymbol)symbol).MethodKind == MethodKind.BuiltinOperator && 163Debug.Assert(!(symbol.IsKind(SymbolKind.Method) && ((IMethodSymbol)symbol).MethodKind == MethodKind.BuiltinOperator && symbol.ContainingSymbol.IsKind(SymbolKind.FunctionPointerType))); 165((IMethodSymbol)symbol).MethodKind == MethodKind.BuiltinOperator &&
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs\INamedTypeSymbolExtensions.cs (5)
233if (member is IMethodSymbol { IsStatic: true, IsAbstract: true, MethodKind: MethodKind.UserDefinedOperator } method) 416where m.Kind != SymbolKind.Method || ((IMethodSymbol)m).MethodKind is MethodKind.Ordinary or MethodKind.UserDefinedOperator or MethodKind.Conversion 572IMethodSymbol { MethodKind: MethodKind.Ordinary, CanBeReferencedByName: true } => true,
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs\ISymbolExtensions.cs (19)
138if (methodSymbol.MethodKind is MethodKind.Ordinary or 139MethodKind.PropertyGet or 140MethodKind.PropertySet or 141MethodKind.UserDefinedOperator or 142MethodKind.Conversion) 178=> symbol is IMethodSymbol { MethodKind: MethodKind.AnonymousFunction }; 205=> symbol is IMethodSymbol { MethodKind: MethodKind.ReducedExtension }; 214=> symbol is IMethodSymbol { MethodKind: MethodKind.LocalFunction }; 223=> symbol is IMethodSymbol { MethodKind: MethodKind.Constructor }; 226=> symbol is IMethodSymbol { MethodKind: MethodKind.StaticConstructor }; 229=> symbol is IMethodSymbol { MethodKind: MethodKind.Destructor }; 232=> symbol is IMethodSymbol { MethodKind: MethodKind.UserDefinedOperator }; 235=> symbol is IMethodSymbol { MethodKind: MethodKind.Conversion }; 238=> symbol is IMethodSymbol { MethodKind: MethodKind.Ordinary }; 241=> symbol is IMethodSymbol { MethodKind: MethodKind.Ordinary or MethodKind.LocalFunction }; 552=> symbol is IMethodSymbol { MethodKind: MethodKind.EventAdd or MethodKind.EventRaise or MethodKind.EventRemove };
MethodKindExtensions.cs (3)
9public static bool IsPropertyAccessor(this MethodKind kind) 10=> kind is MethodKind.PropertyGet or MethodKind.PropertySet;
NamingStyleRules.cs (2)
54return method.MethodKind is MethodKind.Ordinary or 55MethodKind.LocalFunction;
ReassignedVariable\AbstractReassignedVariableService.cs (2)
156if (methodOrProperty is IMethodSymbol { MethodKind: MethodKind.PropertyGet or MethodKind.PropertySet } method)
Recommendations\AbstractRecommendationService.cs (5)
89case MethodKind.EventAdd: 90case MethodKind.EventRemove: 91case MethodKind.EventRaise: 92case MethodKind.PropertyGet: 93case MethodKind.PropertySet:
Recommendations\AbstractRecommendationServiceRunner.cs (1)
68if (parameter.ContainingSymbol is not IMethodSymbol { MethodKind: MethodKind.AnonymousFunction } owningMethod)
Rename\RenameUtilities.cs (3)
361if (methodSymbol.MethodKind is MethodKind.Constructor or 362MethodKind.StaticConstructor or 363MethodKind.Destructor)
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (3)
196if (!method.IsImplicitlyDeclared && (method.MethodKind == MethodKind.Constructor || 197method.MethodKind == MethodKind.StaticConstructor || 198method.MethodKind == MethodKind.Destructor))
Shared\Extensions\ISymbolExtensions.cs (2)
478if (methodSymbol.MethodKind is MethodKind.Constructor or MethodKind.StaticConstructor)
Shared\Extensions\ISymbolExtensions_2.cs (3)
17if (method.MethodKind is MethodKind.EventAdd or 18MethodKind.EventRemove or 19MethodKind.PropertySet)
Shared\Extensions\SemanticModelExtensions.cs (1)
54methodSymbol.MethodKind == MethodKind.BuiltinOperator &&
Shared\Utilities\SignatureComparer.cs (3)
77if ((method1.MethodKind == MethodKind.AnonymousFunction) != 78(method2.MethodKind == MethodKind.AnonymousFunction)) 83if (method1.MethodKind != MethodKind.AnonymousFunction)
SymbolEquivalenceComparer.cs (2)
184if (x.MethodKind == MethodKind.DelegateInvoke && 190else if (x.MethodKind == MethodKind.FunctionPointerSignature)
SymbolEquivalenceComparer.EquivalenceVisitor.cs (11)
178if (x.MethodKind == MethodKind.ReducedExtension) 197if (x.MethodKind is MethodKind.AnonymousFunction or 198MethodKind.LocalFunction) 250private static bool AreCompatibleMethodKinds(MethodKind kind1, MethodKind kind2) 257if ((kind1 == MethodKind.Ordinary && kind2.IsPropertyAccessor()) || 258(kind1.IsPropertyAccessor() && kind2 == MethodKind.Ordinary)) 264if ((kind1 == MethodKind.BuiltinOperator && kind2 == MethodKind.UserDefinedOperator) || 265(kind1 == MethodKind.UserDefinedOperator && kind2 == MethodKind.BuiltinOperator))
SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
115if (x.MethodKind == MethodKind.AnonymousFunction)
SymbolKey.cs (2)
73/// cref="IRangeVariableSymbol"/> and <see cref="MethodKind.LocalFunction"/> <see cref="IMethodSymbol"/>s can also 326IMethodSymbol { MethodKind: MethodKind.LocalFunction } => true,
SymbolKey.MethodSymbolKey.cs (1)
144if (symbol.MethodKind == MethodKind.Conversion)
SymbolKey.SymbolKeyWriter.cs (4)
370case MethodKind.AnonymousFunction: 375case MethodKind.BuiltinOperator: 380case MethodKind.ReducedExtension: 385case MethodKind.LocalFunction:
SymbolSpecification.cs (15)
83new SymbolKindOrTypeKind(MethodKind.Ordinary), 84new SymbolKindOrTypeKind(MethodKind.LocalFunction), 318foreach (var methodKindElement in symbolKindListElement.Elements(nameof(MethodKind))) 387public SymbolKindOrTypeKind(MethodKind methodKind) 394public MethodKind? MethodKind => (_category == SymbolCategory.Method) ? (MethodKind)_kind : null; 401SymbolCategory.Method => symbol is IMethodSymbol method && method.MethodKind == (MethodKind)_kind, 410SymbolCategory.Method => new XElement(nameof(MethodKind), GetMethodKindString((MethodKind)_kind)), 426private static string GetMethodKindString(MethodKind methodKind) 433CodeAnalysis.MethodKind.SharedConstructor => nameof(CodeAnalysis.MethodKind.StaticConstructor), 434CodeAnalysis.MethodKind.AnonymousFunction => nameof(CodeAnalysis.MethodKind.LambdaMethod), 466=> new((MethodKind)Enum.Parse(typeof(MethodKind), methodKindElement.Value));
SymbolUsageAnalysis.Walker.cs (3)
298case MethodKind.AnonymousFunction: 299case MethodKind.DelegateInvoke: 311case MethodKind.LocalFunction:
Microsoft.CodeAnalysis.Workspaces.UnitTests (16)
CodeStyle\NamingStylePreferencesUpgradeTests.cs (5)
191[InlineData(typeof(MethodKind), nameof(MethodKind.AnonymousFunction), nameof(MethodKind.LambdaMethod), nameof(MethodKind.SharedConstructor), nameof(MethodKind.StaticConstructor))]
EditorConfigParsing\NamingStyleParserTests.cs (3)
162symbolKind => Assert.Equal(new SymbolKindOrTypeKind(MethodKind.Ordinary), symbolKind), 163symbolKind => Assert.Equal(new SymbolKindOrTypeKind(MethodKind.LocalFunction), symbolKind), 240symbolKind => Assert.Equal(new SymbolKindOrTypeKind(MethodKind.LocalFunction), symbolKind));
UtilityTest\DocumentationCommentIdTests.cs (8)
155CheckDeclarationId<IMethodSymbol>("M:Acme.Widget.#cctor", compilation, s => s.MethodKind == MethodKind.StaticConstructor); 156CheckDeclarationId<IMethodSymbol>("M:Acme.Widget.#ctor", compilation, s => s.MethodKind == MethodKind.Constructor && s.Parameters.Length == 0); 157CheckDeclarationId<IMethodSymbol>("M:Acme.Widget.#ctor(System.String)", compilation, s => s.MethodKind == MethodKind.Constructor && s.Parameters.Length == 1); 174CheckDeclarationId<IMethodSymbol>("M:Acme.Widget.Finalize", compilation, s => s.MethodKind == MethodKind.Destructor); 281CheckDeclarationId<IMethodSymbol>("M:Acme.Widget.op_UnaryPlus(Acme.Widget)", compilation, m => m.MethodKind == MethodKind.UserDefinedOperator && m.Parameters.Length == 1); 297CheckDeclarationId<IMethodSymbol>("M:Acme.Widget.op_Addition(Acme.Widget,Acme.Widget)", compilation, m => m.MethodKind == MethodKind.UserDefinedOperator && m.Parameters.Length == 2); 314CheckDeclarationId<IMethodSymbol>("M:Acme.Widget.op_Explicit(Acme.Widget)~System.Int32", compilation, m => m.MethodKind == MethodKind.Conversion && m.Parameters.Length == 1 && m.ReturnType.Name == "Int32"); 315CheckDeclarationId<IMethodSymbol>("M:Acme.Widget.op_Implicit(Acme.Widget)~System.Int64", compilation, m => m.MethodKind == MethodKind.Conversion && m.Parameters.Length == 1 && m.ReturnType.Name == "Int64");
Microsoft.VisualStudio.LanguageServices (23)
Implementation\VsRefactorNotifyService.cs (2)
165if (methodSymbol.MethodKind is MethodKind.Constructor or 166MethodKind.Destructor)
Library\ObjectBrowser\AbstractListItemFactory.cs (2)
348if (methodSymbol.MethodKind == MethodKind.Destructor || 349methodSymbol.MethodKind == MethodKind.Constructor ||
Library\ObjectBrowser\Lists\MemberListItem.cs (2)
45_kind = methodSymbol.MethodKind is MethodKind.Conversion or 46MethodKind.UserDefinedOperator
Progression\GraphBuilder.cs (14)
372if (methodSymbol.MethodKind == MethodKind.Constructor) 376else if (methodSymbol.MethodKind == MethodKind.StaticConstructor) 380else if (methodSymbol.MethodKind == MethodKind.Destructor) 508case MethodKind.AnonymousFunction: 512case MethodKind.BuiltinOperator: 513case MethodKind.UserDefinedOperator: 517case MethodKind.Constructor: 518case MethodKind.StaticConstructor: 522case MethodKind.Conversion: 527case MethodKind.Destructor: 531case MethodKind.PropertyGet: 535case MethodKind.PropertySet: 610var isOperator = method.MethodKind is MethodKind.UserDefinedOperator or MethodKind.Conversion;
Progression\GraphNodeIdCreation.cs (1)
320if (member is IMethodSymbol methodSymbol && methodSymbol.MethodKind == MethodKind.Conversion)
Progression\GraphQueries\CallsGraphQuery.cs (1)
56(newSymbol.CanBeReferencedByName || ((IMethodSymbol)newSymbol).MethodKind == MethodKind.Constructor))
Progression\RoslynGraphProperties.cs (1)
86dataType: typeof(MethodKind),
Microsoft.VisualStudio.LanguageServices.CSharp (37)
CodeModel\CSharpCodeModelService.cs (27)
999if (methodSymbol.MethodKind is MethodKind.PropertyGet or 1000MethodKind.PropertySet or 1001MethodKind.EventAdd or 1002MethodKind.EventRemove or 1003MethodKind.EventRaise) 1494public override MethodKind GetAccessorKind(SyntaxNode node) 1497SyntaxKind.GetAccessorDeclaration => MethodKind.PropertyGet, 1498SyntaxKind.SetAccessorDeclaration => MethodKind.PropertySet, 1499SyntaxKind.AddAccessorDeclaration => MethodKind.EventAdd, 1500SyntaxKind.RemoveAccessorDeclaration => MethodKind.EventRemove, 1504private static SyntaxKind GetAccessorSyntaxKind(MethodKind methodKind) 1507MethodKind.PropertyGet => SyntaxKind.GetAccessorDeclaration, 1508MethodKind.PropertySet => SyntaxKind.SetAccessorDeclaration, 1509MethodKind.EventAdd => SyntaxKind.AddAccessorDeclaration, 1510MethodKind.EventRemove => SyntaxKind.RemoveAccessorDeclaration, 1514public override bool TryGetAccessorNode(SyntaxNode parentNode, MethodKind kind, [NotNullWhen(true)] out SyntaxNode? accessorNode) 2194case MethodKind.Ordinary: 2195case MethodKind.ExplicitInterfaceImplementation: 2198case MethodKind.Constructor: 2199case MethodKind.StaticConstructor: 2202case MethodKind.Destructor: 2205case MethodKind.UserDefinedOperator: 2206case MethodKind.Conversion: 2209case MethodKind.PropertyGet: 2210case MethodKind.EventRemove: 2213case MethodKind.PropertySet: 2214case MethodKind.EventAdd:
LanguageService\CSharpHelpContextService.cs (1)
198if (symbol is IMethodSymbol method && method.MethodKind == MethodKind.BuiltinOperator)
ObjectBrowser\DescriptionBuilder.cs (7)
194if (methodSymbol.MethodKind is not MethodKind.Constructor and 195not MethodKind.Destructor and 196not MethodKind.StaticConstructor and 197not MethodKind.Conversion) 203if (methodSymbol.MethodKind == MethodKind.Conversion) 253methodSymbol.MethodKind == MethodKind.Destructor) 268methodSymbol.MethodKind != MethodKind.StaticConstructor)
Progression\CSharpProgressionLanguageService.cs (2)
133=> f.MethodKind is MethodKind.Ordinary or MethodKind.ExplicitInterfaceImplementation;
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (7)
GlyphExtensionsTests.cs (7)
48methodKind: MethodKind.ReducedExtension); 155methodKind: MethodKind.UserDefinedOperator); 164methodKind: MethodKind.Conversion); 181MethodKind methodKind = MethodKind.Ordinary, 198MethodKind methodKind = MethodKind.Ordinary,
Microsoft.VisualStudio.LanguageServices.Implementation (53)
CodeModel\AbstractCodeModelService.cs (3)
346var accessorKind = GetAccessorKind(node); 635public abstract MethodKind GetAccessorKind(SyntaxNode node); 637public abstract bool TryGetAccessorNode(SyntaxNode parentNode, MethodKind kind, [NotNullWhen(true)] out SyntaxNode? accessorNode);
CodeModel\Collections\ExternalOverloadsCollection.cs (2)
53if (symbol.MethodKind is not MethodKind.Ordinary and 54not MethodKind.Constructor)
CodeModel\Collections\OverloadsCollection.cs (2)
55if (symbol.MethodKind is not MethodKind.Ordinary and 56not MethodKind.Constructor)
CodeModel\ExternalElements\ExternalCodeAccessorFunction.cs (13)
31Debug.Assert(symbol.MethodKind is MethodKind.EventAdd or 32MethodKind.EventRaise or 33MethodKind.EventRemove or 34MethodKind.PropertyGet or 35MethodKind.PropertySet); 47var methodKind = MethodSymbol.MethodKind; 48return methodKind is MethodKind.PropertyGet 49or MethodKind.PropertySet; 91case MethodKind.PropertyGet: 92case MethodKind.EventRemove: 95case MethodKind.PropertySet: 96case MethodKind.EventAdd: 99case MethodKind.EventRaise:
CodeModel\ExternalElements\ExternalCodeFunction.cs (7)
51case MethodKind.Constructor: 53case MethodKind.Destructor: 55case MethodKind.UserDefinedOperator: 56case MethodKind.Conversion: 58case MethodKind.Ordinary: 73if (symbol.MethodKind is not MethodKind.Ordinary and 74not MethodKind.Constructor)
CodeModel\ICodeModelService.cs (2)
156MethodKind GetAccessorKind(SyntaxNode node); 158bool TryGetAccessorNode(SyntaxNode parentNode, MethodKind kind, [NotNullWhen(true)] out SyntaxNode? accessorNode);
CodeModel\InternalElements\CodeAccessorFunction.cs (10)
20internal static EnvDTE.CodeFunction Create(CodeModelState state, AbstractCodeMember parent, MethodKind kind) 27private readonly MethodKind _kind; 29private CodeAccessorFunction(CodeModelState state, AbstractCodeMember parent, MethodKind kind) 32Debug.Assert(kind is MethodKind.EventAdd or 33MethodKind.EventRaise or 34MethodKind.EventRemove or 35MethodKind.PropertyGet or 36MethodKind.PropertySet); 45=> _kind is MethodKind.PropertyGet or MethodKind.PropertySet;
CodeModel\InternalElements\CodeEvent.cs (3)
82return CodeAccessorFunction.Create(this.State, this, MethodKind.EventAdd); 110return CodeAccessorFunction.Create(this.State, this, MethodKind.EventRemove); 134return CodeAccessorFunction.Create(this.State, this, MethodKind.EventRaise);
CodeModel\InternalElements\CodeFunction.cs (2)
122if (symbol.MethodKind is not MethodKind.Ordinary and 123not MethodKind.Constructor)
CodeModel\InternalElements\CodeProperty.cs (5)
139private bool HasAccessorNode(MethodKind methodKind) 149if (!HasAccessorNode(MethodKind.PropertyGet) && 155return CodeAccessorFunction.Create(this.State, this, MethodKind.PropertyGet); 168if (!HasAccessorNode(MethodKind.PropertySet)) 173return CodeAccessorFunction.Create(this.State, this, MethodKind.PropertySet);
Options\Style\NamingPreferences\SymbolSpecification\SymbolSpecificationViewModel.cs (4)
57new SymbolKindViewModel(MethodKind.Ordinary, ServicesVSResources.NamingSpecification_CSharp_Method, specification), 58new SymbolKindViewModel(MethodKind.LocalFunction, ServicesVSResources.NamingSpecification_CSharp_LocalFunction, specification), 184private readonly MethodKind? _methodKind; 202public SymbolKindViewModel(MethodKind methodKind, string name, SymbolSpecification specification)
Microsoft.VisualStudio.LanguageServices.UnitTests (2)
CommonControls\NewTypeDestinationSelectionViewModelTests.vb (1)
238Dim extractableMembers = DirectCast(symbol, INamedTypeSymbol).GetMembers().Where(Function(s) Not (TypeOf s Is IMethodSymbol) OrElse DirectCast(s, IMethodSymbol).MethodKind <> MethodKind.Constructor)
ExtractInterface\ExtractInterfaceViewModelTests.vb (1)
301Dim extractableMembers = DirectCast(symbol, INamedTypeSymbol).GetMembers().Where(Function(s) Not (TypeOf s Is IMethodSymbol) OrElse DirectCast(s, IMethodSymbol).MethodKind <> MethodKind.Constructor)
Microsoft.VisualStudio.LanguageServices.VisualBasic (33)
CodeModel\VisualBasicCodeModelService.vb (28)
1096Public Overrides Function GetAccessorKind(node As SyntaxNode) As MethodKind 1099Return MethodKind.PropertyGet 1101Return MethodKind.PropertySet 1103Return MethodKind.EventAdd 1105Return MethodKind.EventRemove 1107Return MethodKind.EventRaise 1113Private Overloads Shared Function GetAccessorKind(methodKind As MethodKind) As SyntaxKind 1115Case MethodKind.PropertyGet 1117Case MethodKind.PropertySet 1119Case MethodKind.EventAdd 1121Case MethodKind.EventRemove 1123Case MethodKind.EventRaise 1141Public Overrides Function TryGetAccessorNode(parentNode As SyntaxNode, kind As MethodKind, ByRef accessorNode As SyntaxNode) As Boolean 1387If methodSymbol.MethodKind = MethodKind.PropertyGet OrElse 1388methodSymbol.MethodKind = MethodKind.PropertySet OrElse 1389methodSymbol.MethodKind = MethodKind.EventAdd OrElse 1390methodSymbol.MethodKind = MethodKind.EventRemove OrElse 1391methodSymbol.MethodKind = MethodKind.EventRaise Then 2544Case MethodKind.Ordinary, 2545MethodKind.DeclareMethod 2548Case MethodKind.Constructor, 2549MethodKind.StaticConstructor 2552Case MethodKind.UserDefinedOperator 2555Case MethodKind.PropertyGet 2557Case MethodKind.PropertySet 2560Case MethodKind.EventAdd 2562Case MethodKind.EventRemove 2564Case MethodKind.EventRaise
CodeModel\VisualBasicCodeModelService_Prototype.vb (1)
96If methodSymbol.MethodKind = MethodKind.Ordinary AndAlso
ObjectBrowser\DescriptionBuilder.vb (4)
116Case MethodKind.Conversion, MethodKind.UserDefinedOperator 118Case MethodKind.DeclareMethod 341(methodSymbol Is Nothing OrElse Not methodSymbol.MethodKind = MethodKind.DeclareMethod) AndAlso