163 references to PropertyGet
Microsoft.CodeAnalysis (1)
Symbols\IMethodSymbol.cs (1)
233/// If this method has <see cref="MethodKind"/> of <see cref="MethodKind.PropertyGet"/> or <see cref="MethodKind.PropertySet"/>,
Microsoft.CodeAnalysis.CodeStyle (2)
ISymbolExtensions.cs (1)
139MethodKind.PropertyGet or
MethodKindExtensions.cs (1)
10=> kind is MethodKind.PropertyGet or MethodKind.PropertySet;
Microsoft.CodeAnalysis.CSharp (30)
Compiler\MethodBodySynthesizer.cs (2)
175Debug.Assert(accessor.MethodKind == MethodKind.PropertyGet || accessor.MethodKind == MethodKind.PropertySet); 190if (accessor.MethodKind == MethodKind.PropertyGet)
Emitter\Model\PropertySymbolAdapter.cs (1)
75return GetSynthesizedSealedAccessor(MethodKind.PropertyGet);
Lowering\LocalRewriter\LocalRewriter_Range.cs (1)
189case MethodKind.PropertyGet:
SymbolDisplay\SymbolDisplayVisitor.Members.cs (2)
440case MethodKind.PropertyGet: 451AddKeyword(symbol.MethodKind == MethodKind.PropertyGet ? SyntaxKind.GetKeyword :
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertyAccessorSymbol.cs (1)
31get { return MethodKind.PropertyGet; }
Symbols\Compilation_WellKnownMembers.cs (1)
270targetMethodKind = MethodKind.PropertyGet;
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
758Debug.Assert((methodKind == MethodKind.PropertyGet) || (methodKind == MethodKind.PropertySet));
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
259_getMethod.SetAssociatedProperty(this, MethodKind.PropertyGet);
Symbols\MethodSymbol.cs (1)
614case MethodKind.PropertyGet:
Symbols\MethodSymbolExtensions.cs (2)
137case MethodKind.PropertyGet: 220method.MethodKind is (MethodKind.Ordinary or MethodKind.ExplicitInterfaceImplementation or MethodKind.PropertyGet or MethodKind.PropertySet) &&
Symbols\OverriddenOrHiddenMembersHelpers.cs (1)
246bool accessorIsGetter = accessor.MethodKind == MethodKind.PropertyGet;
Symbols\PublicModel\MethodSymbol.cs (2)
60case MethodKind.PropertyGet: 61return MethodKind.PropertyGet;
Symbols\Source\SourceMemberContainerSymbol.cs (1)
3807case MethodKind.PropertyGet:
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1220case MethodKind.PropertyGet:
Symbols\Source\SourcePropertyAccessorSymbol.cs (8)
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, 381if (this.MethodKind == MethodKind.PropertyGet) 485MethodKind == MethodKind.PropertyGet; 616MethodSymbol implementedAccessor = this.MethodKind == MethodKind.PropertyGet 654bool isGetMethod = this.MethodKind == MethodKind.PropertyGet; 738bool isGetMethod = this.MethodKind == MethodKind.PropertyGet;
Symbols\Symbol.cs (2)
548case MethodKind.PropertyGet: 603case MethodKind.PropertyGet:
Symbols\Synthesized\Records\SynthesizedRecordEqualityContractProperty.cs (1)
144MethodKind.PropertyGet,
Symbols\TypeSymbol.cs (1)
1561case MethodKind.PropertyGet:
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
74MethodKind: MethodKind.Ordinary or MethodKind.ExplicitInterfaceImplementation or MethodKind.PropertyGet or MethodKind.PropertySet,
CSharpUseIndexOperatorDiagnosticAnalyzer.InfoCache.cs (1)
79if (method.MethodKind == MethodKind.PropertyGet)
Helpers.cs (1)
70(method.MethodKind == MethodKind.PropertyGet || method.MethodKind == MethodKind.Ordinary) &&
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
BreakingChanges.cs (1)
131Assert.Equal(MethodKind.PropertyGet, derivedProperty2Synthesized.MethodKind);
CodeGen\IndexerTests.cs (1)
269Assert.Equal(MethodKind.PropertyGet, getMethod.MethodKind);
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (1)
CSharpInstructionDecoder.cs (1)
39var displayFormat = (method.MethodKind == MethodKind.PropertyGet || method.MethodKind == MethodKind.PropertySet)
Microsoft.CodeAnalysis.CSharp.Features (5)
CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
74MethodKind: MethodKind.Ordinary or MethodKind.ExplicitInterfaceImplementation or MethodKind.PropertyGet or MethodKind.PropertySet,
CSharpUseIndexOperatorDiagnosticAnalyzer.InfoCache.cs (1)
79if (method.MethodKind == MethodKind.PropertyGet)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
1946MethodKind.PropertyGet => symbol.AssociatedSymbol is IPropertySymbol { IsIndexer: true } ? CSharpFeaturesResources.indexer_getter : CSharpFeaturesResources.property_getter,
J\s\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs\Helpers.cs (1)
70(method.MethodKind == MethodKind.PropertyGet || method.MethodKind == MethodKind.Ordinary) &&
NavigationBar\CSharpNavigationBarItemService.cs (1)
180return method.MethodKind is MethodKind.PropertyGet or MethodKind.PropertySet;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\NativeIntegerTests.cs (2)
329case MethodKind.PropertyGet: 443case MethodKind.PropertyGet:
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (31)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (2)
354Assert.Equal(MethodKind.PropertyGet, getterSymbol.MethodKind); 2874Assert.Equal(MethodKind.PropertyGet, explicitPropertyGetterSymbol.MethodKind);
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (1)
483Assert.Equal(MethodKind.PropertyGet, derivedGetter.MethodKind);
Symbols\InterfaceImplementationTests.cs (1)
1022Assert.Equal(MethodKind.PropertyGet, synthesizedExplicitImpls[1].MethodKind);
Symbols\Metadata\PE\LoadingIndexers.cs (1)
1067Assert.Equal(propertyIsIndexer ? MethodKind.PropertyGet : MethodKind.Ordinary, accessor.MethodKind);
Symbols\Source\CustomModifierCopyTests.cs (1)
607var explicitGetterImpl = explicitImpls.Where(impl => impl.ImplementingMethod.MethodKind == MethodKind.PropertyGet).Single();
Symbols\Source\PropertyTests.cs (11)
604Assert.True(accessor.MethodKind == MethodKind.PropertyGet || accessor.MethodKind == MethodKind.PropertySet, 724VerifyAccessor(goodStatic.GetMethod, goodStatic, MethodKind.PropertyGet); 726VerifyAccessor(badStatic.GetMethod, goodStatic, MethodKind.PropertyGet); 728VerifyAccessor(mismatchedStatic.GetMethod, goodStatic, MethodKind.PropertyGet); 741VerifyAccessor(goodInstance.GetMethod, goodInstance, MethodKind.PropertyGet); 743VerifyAccessor(badInstance.GetMethod, goodInstance, MethodKind.PropertyGet); 745VerifyAccessor(mismatchedInstance.GetMethod, goodInstance, MethodKind.PropertyGet); 750VerifyAccessor(staticAndInstance.GetMethod, goodStatic, MethodKind.PropertyGet); 756VerifyAccessor(getUsedAsSet.GetMethod, goodInstance, MethodKind.PropertyGet); 757VerifyAccessor(getUsedAsSet.SetMethod, goodInstance, MethodKind.PropertyGet); 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 (12)
22981Assert.Equal(MethodKind.PropertyGet, cM01Get.MethodKind); 23077Assert.Equal(MethodKind.PropertyGet, cM01Get.MethodKind); 23167Assert.Equal(MethodKind.PropertyGet, cM01Get.MethodKind); 23700Assert.Equal(MethodKind.PropertyGet, cM01Get.MethodKind); 23758Assert.Equal(MethodKind.PropertyGet, cM01Get.MethodKind); 23862Assert.Equal(MethodKind.PropertyGet, cM01Get.MethodKind); 24122Assert.Equal(MethodKind.PropertyGet, cM01Get.MethodKind); 24471Assert.Equal(MethodKind.PropertyGet, c1M01Get.MethodKind); 24496Assert.Equal(MethodKind.PropertyGet, c2M01Get.MethodKind); 24620Assert.Equal(MethodKind.PropertyGet, c1M01Get.MethodKind); 24681Assert.Equal(MethodKind.PropertyGet, c2M01Get.MethodKind); 24721Assert.Equal(MethodKind.PropertyGet, c3M01Get.MethodKind);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Extensions.cs (1)
540case MethodKind.PropertyGet:
Microsoft.CodeAnalysis.Features (7)
ChangeSignature\AbstractChangeSignatureService.cs (1)
273(methodSymbol.MethodKind == MethodKind.PropertyGet || methodSymbol.MethodKind == MethodKind.PropertySet))
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (1)
354var getMethod = prop.GetMethod != null ? CreateAccessorSymbol(prop, MethodKind.PropertyGet) : null;
DocumentHighlighting\AbstractDocumentHighlightsService.cs (1)
143case MethodKind.PropertyGet:
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
363MethodKind.PropertyGet or MethodKind.PropertySet => FeaturesResources.property_accessor, 3461MethodKind.PropertyGet or
RQName\RQNodeBuilder.cs (1)
205MethodKind.PropertyGet)
Shared\Extensions\ISymbolExtensions_2.cs (1)
248case MethodKind.PropertyGet:
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\TrackingDiagnosticAnalyzer.cs (1)
128new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.PropertyGet, ReturnsVoid = false },
Microsoft.CodeAnalysis.VisualBasic (45)
Analysis\FlowAnalysis\DataFlowPass.vb (3)
1254Case MethodKind.PropertyGet 1266Case MethodKind.PropertyGet 1282Case MethodKind.PropertyGet
Binding\Binder_Utils.vb (2)
1522Case MethodKind.PropertyGet 1650MethodKindPropertyGet = CUInt(MethodKind.PropertyGet) << MethodKindShift
Binding\SyntheticBoundTrees\SynthesizedPropertyAccessorBase.vb (1)
72If accessor.MethodKind = MethodKind.PropertyGet Then
Compilation\ClsComplianceChecker.vb (1)
219Case MethodKind.PropertyGet, MethodKind.PropertySet
Lowering\LocalRewriter\LocalRewriter_BinaryOperators.vb (1)
202If boundCall.Method.MethodKind = MethodKind.PropertyGet AndAlso
Lowering\LocalRewriter\LocalRewriter_RaiseEvent.vb (1)
160Dim accessorName As String = Binder.GetAccessorName(invocationListProperty.Name, MethodKind.PropertyGet, isWinMd:=False)
SymbolDisplay\SymbolDisplayVisitor.Members.vb (2)
201Case MethodKind.PropertyGet 319Case MethodKind.PropertyGet,
Symbols\AnonymousTypes\PublicSymbols\AnonymousType_PropertyPublicAccessors.vb (1)
59Return MethodKind.PropertyGet
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType_PropertyAccessors.vb (1)
78Return MethodKind.PropertyGet
Symbols\EmbeddedSymbols\EmbeddedSymbolManager.SymbolsCollection.vb (2)
234Case MethodKind.PropertyGet, MethodKind.PropertySet 375kind = MethodKind.PropertyGet OrElse
Symbols\Metadata\PE\PEMethodSymbol.vb (1)
952Debug.Assert((methodKind = MethodKind.PropertyGet) OrElse (methodKind = MethodKind.PropertySet))
Symbols\Metadata\PE\PEPropertySymbol.vb (1)
125_getMethod.SetAssociatedProperty(Me, MethodKind.PropertyGet)
Symbols\MethodKindExtensions.vb (1)
25Case MethodKind.PropertyGet
Symbols\MethodSymbol.vb (1)
316Return DirectCast(Me.AssociatedSymbol, PropertySymbol).GetAccessorOverride(getter:=(MethodKind = MethodKind.PropertyGet))
Symbols\ObsoleteAttributeHelpers.vb (1)
130Dim accessorString = If(accessorSymbol.MethodKind = MethodKind.PropertyGet, "Get", "Set")
Symbols\Source\OverrideHidingHelper.vb (3)
501MethodKind.PropertyGet, MethodKind.PropertySet 626(DirectCast(DirectCast(overridingSym, Symbol), MethodSymbol).MethodKind = MethodKind.PropertyGet OrElse 688(DirectCast(DirectCast(overridingSym, Symbol), MethodSymbol).MethodKind = MethodKind.PropertyGet OrElse
Symbols\Source\SourceMemberContainerTypeSymbol.vb (1)
970Case MethodKind.EventAdd, MethodKind.EventRemove, MethodKind.PropertyGet, MethodKind.PropertySet
Symbols\Source\SourceMethodSymbol.vb (3)
1779Case MethodKind.PropertyGet, MethodKind.PropertySet 1960MethodKind.PropertyGet, 2257Case MethodKind.PropertyGet, MethodKind.PropertySet
Symbols\Source\SourceNamedTypeSymbol_ComClass.vb (2)
1215Case MethodKind.PropertyGet 1216Return MethodKind.PropertyGet
Symbols\Source\SourceNamedTypeSymbol_GroupClass.vb (1)
396ConflictsWithExistingMemberOrType(binder.GetAccessorName(propertyName, MethodKind.PropertyGet, False), membersBuilder, nestedTypes, conflictsWith) OrElse
Symbols\Source\SourcePropertyAccessorSymbol.vb (6)
36If(flags.ToMethodKind() = MethodKind.PropertyGet, flags, flags And Not SourceMemberFlags.Iterator), 121Return m_property.GetAccessorOverride(getter:=(MethodKind = MethodKind.PropertyGet)) 224Case MethodKind.PropertyGet 289Return If(MethodKind = MethodKind.PropertyGet, 334m_property.GetAccessorImplementations(getter:=(MethodKind = MethodKind.PropertyGet)), 369Return If(Me.MethodKind = MethodKind.PropertyGet, m_property, Nothing)
Symbols\Source\SourcePropertySymbol.vb (1)
202Binder.GetAccessorName(prop.Name, MethodKind.PropertyGet, isWinMd:=False),
Symbols\Source\SynthesizedMyGroupCollectionPropertyAccessorSymbol.vb (1)
159Return MethodKind.PropertyGet
Symbols\Source\SynthesizedWithEventsAccessorSymbol.vb (3)
45Return sourceProperty.GetAccessorImplementations(getter:=(MethodKind = MethodKind.PropertyGet)) 53Return ContainingProperty.GetAccessorOverride(getter:=(MethodKind = MethodKind.PropertyGet)) 132Return MethodKind.PropertyGet
Symbols\SubstitutedNamedType.vb (2)
457Case MethodKind.PropertyGet, MethodKind.PropertySet 460Return If(memberMethod.MethodKind = MethodKind.PropertyGet, propertySymbol.GetMethod, propertySymbol.SetMethod)
Symbols\Symbol_Attributes.vb (1)
82MethodKind.PropertyGet,
Symbols\WellKnownMembers.vb (1)
443targetMethodKind = MethodKind.PropertyGet
Microsoft.CodeAnalysis.VisualBasic.Features (1)
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.vb (1)
164If methodSymbol.MethodKind = MethodKind.PropertyGet Then
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (11)
SymbolsTests\Source\PropertyTests.vb (11)
5600VerifyAccessor(goodStatic.GetMethod, goodStatic, MethodKind.PropertyGet) 5602VerifyAccessor(badStatic.GetMethod, goodStatic, MethodKind.PropertyGet) 5604VerifyAccessor(mismatchedStatic.GetMethod, goodStatic, MethodKind.PropertyGet) 5617VerifyAccessor(goodInstance.GetMethod, goodInstance, MethodKind.PropertyGet) 5619VerifyAccessor(badInstance.GetMethod, goodInstance, MethodKind.PropertyGet) 5621VerifyAccessor(mismatchedInstance.GetMethod, goodInstance, MethodKind.PropertyGet) 5626VerifyAccessor(staticAndInstance.GetMethod, goodStatic, MethodKind.PropertyGet) 5632VerifyAccessor(getUsedAsSet.GetMethod, goodInstance, MethodKind.PropertyGet) 5633VerifyAccessor(getUsedAsSet.SetMethod, goodInstance, MethodKind.PropertyGet) 8110Dim isAccessor = accessor.MethodKind = MethodKind.PropertyGet OrElse accessor.MethodKind = MethodKind.PropertySet 8170Dim method = If((methodKind = MethodKind.PropertyGet), associatedProperty.GetMethod, associatedProperty.SetMethod)
Microsoft.CodeAnalysis.Workspaces (4)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs\ISymbolExtensions.cs (1)
139MethodKind.PropertyGet or
MethodKindExtensions.cs (1)
10=> kind is MethodKind.PropertyGet or MethodKind.PropertySet;
ReassignedVariable\AbstractReassignedVariableService.cs (1)
156if (methodOrProperty is IMethodSymbol { MethodKind: MethodKind.PropertyGet or MethodKind.PropertySet } method)
Recommendations\AbstractRecommendationService.cs (1)
92case MethodKind.PropertyGet:
Microsoft.VisualStudio.LanguageServices (1)
Progression\GraphBuilder.cs (1)
531case MethodKind.PropertyGet:
Microsoft.VisualStudio.LanguageServices.CSharp (4)
CodeModel\CSharpCodeModelService.cs (4)
999if (methodSymbol.MethodKind is MethodKind.PropertyGet or 1497SyntaxKind.GetAccessorDeclaration => MethodKind.PropertyGet, 1507MethodKind.PropertyGet => SyntaxKind.GetAccessorDeclaration, 2209case MethodKind.PropertyGet:
Microsoft.VisualStudio.LanguageServices.Implementation (7)
CodeModel\ExternalElements\ExternalCodeAccessorFunction.cs (3)
34MethodKind.PropertyGet or 48return methodKind is MethodKind.PropertyGet 91case MethodKind.PropertyGet:
CodeModel\InternalElements\CodeAccessorFunction.cs (2)
35MethodKind.PropertyGet or 45=> _kind is MethodKind.PropertyGet or MethodKind.PropertySet;
CodeModel\InternalElements\CodeProperty.cs (2)
149if (!HasAccessorNode(MethodKind.PropertyGet) && 155return CodeAccessorFunction.Create(this.State, this, MethodKind.PropertyGet);
Microsoft.VisualStudio.LanguageServices.VisualBasic (4)
CodeModel\VisualBasicCodeModelService.vb (4)
1099Return MethodKind.PropertyGet 1115Case MethodKind.PropertyGet 1387If methodSymbol.MethodKind = MethodKind.PropertyGet OrElse 2555Case MethodKind.PropertyGet