144 references to PropertySet
ILLink.RoslynAnalyzer (4)
DynamicallyAccessedMembersAnalyzer.cs (2)
281 if ((methodSymbol.MethodKind != MethodKind.PropertyGet && methodSymbol.MethodKind != MethodKind.PropertySet) 291 || methodSymbol.MethodKind == MethodKind.PropertySet
TrimAnalysis\FlowAnnotations.cs (1)
159 if (parameterMethod!.MethodKind == MethodKind.PropertySet
TrimAnalysis\HandleCallAction.cs (1)
236 if (method.Method.MethodKind == MethodKind.PropertyGet || method.Method.MethodKind == MethodKind.PropertySet) {
Microsoft.Analyzers.Local (1)
ApiLifecycle\AssemblyAnalysis.cs (1)
210and not MethodKind.PropertySet
Microsoft.AspNetCore.Components.Analyzers (1)
InternalUsageAnalyzer.cs (1)
107if (method.MethodKind != MethodKind.PropertySet)
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
InternalUsageAnalyzer.cs (1)
107if (method.MethodKind != MethodKind.PropertySet)
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)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
140MethodKind.PropertySet or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\MethodKindExtensions.cs (1)
10=> kind is MethodKind.PropertyGet or MethodKind.PropertySet;
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (2)
47Debug.Assert(!isInitOnly || methodKind == MethodKind.PropertySet); 48this.IsInitOnly = methodKind == MethodKind.PropertySet && isInitOnly;
Microsoft.CodeAnalysis.CSharp (27)
Binder\LocalBinderFactory.cs (1)
311SourcePropertyAccessorSymbol { MethodKind: MethodKind.PropertySet } setter => getSetterParameters(setter),
Compiler\MethodBodySynthesizer.cs (2)
176Debug.Assert(accessor.MethodKind == MethodKind.PropertyGet || accessor.MethodKind == MethodKind.PropertySet); 197Debug.Assert(accessor.MethodKind == MethodKind.PropertySet);
Emitter\Model\PropertySymbolAdapter.cs (1)
133return GetSynthesizedSealedAccessor(MethodKind.PropertySet);
SymbolDisplay\SymbolDisplayVisitor.Members.cs (1)
431case MethodKind.PropertySet:
Symbols\Metadata\PE\PEMethodSymbol.cs (2)
786Debug.Assert((methodKind == MethodKind.PropertyGet) || (methodKind == MethodKind.PropertySet)); 1413this.MethodKind == MethodKind.PropertySet &&
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
331_setMethod.SetAssociatedProperty(this, MethodKind.PropertySet);
Symbols\MethodSymbol.cs (1)
619case MethodKind.PropertySet:
Symbols\MethodSymbolExtensions.cs (2)
138case MethodKind.PropertySet: 221method.MethodKind is (MethodKind.Ordinary or MethodKind.ExplicitInterfaceImplementation or MethodKind.PropertyGet or MethodKind.PropertySet) &&
Symbols\PublicModel\MethodSymbol.cs (2)
63case MethodKind.PropertySet: 64return MethodKind.PropertySet;
Symbols\Source\SourceMemberContainerSymbol.cs (1)
4071case MethodKind.PropertySet:
Symbols\Source\SourceMethodSymbolWithAttributes.cs (2)
161case MethodKind.PropertySet: 1660case MethodKind.PropertySet:
Symbols\Source\SourcePropertyAccessorSymbol.cs (5)
41var methodKind = isGetMethod ? MethodKind.PropertyGet : MethodKind.PropertySet; 94var methodKind = isGetMethod ? MethodKind.PropertyGet : MethodKind.PropertySet; 358if (MethodKind == MethodKind.PropertySet) 562else if (LocalDeclaredReadOnly && _isAutoPropertyAccessor && MethodKind == MethodKind.PropertySet) 646Debug.Assert(MethodKind == MethodKind.PropertySet);
Symbols\Source\SourcePropertySymbolBase.cs (3)
347{ MethodKind: MethodKind.PropertySet, IsInitOnly: false } => SyntaxFacts.GetText(SyntaxKind.SetKeyword), 348{ MethodKind: MethodKind.PropertySet, IsInitOnly: true } => SyntaxFacts.GetText(SyntaxKind.InitKeyword), 1181Debug.Assert(thisAccessor.MethodKind == MethodKind.PropertySet);
Symbols\Symbol.cs (2)
681case MethodKind.PropertySet: 736case MethodKind.PropertySet:
Symbols\TypeSymbol.cs (1)
1566case MethodKind.PropertySet:
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
176if (owningMethod.MethodKind is not (MethodKind.Ordinary or MethodKind.ExplicitInterfaceImplementation or MethodKind.PropertyGet or MethodKind.PropertySet)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
BreakingChanges.cs (1)
128Assert.Equal(MethodKind.PropertySet, derivedProperty1Synthesized.MethodKind);
CodeGen\IndexerTests.cs (1)
282Assert.Equal(MethodKind.PropertySet, setMethod.MethodKind);
Microsoft.CodeAnalysis.CSharp.Features (3)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
1985MethodKind.PropertySet => symbol.AssociatedSymbol is IPropertySymbol { IsIndexer: true } ? CSharpFeaturesResources.indexer_setter : CSharpFeaturesResources.property_setter,
NavigationBar\CSharpNavigationBarItemService.cs (1)
185return method.MethodKind is MethodKind.PropertyGet or MethodKind.PropertySet;
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
176if (owningMethod.MethodKind is not (MethodKind.Ordinary or MethodKind.ExplicitInterfaceImplementation or MethodKind.PropertyGet or MethodKind.PropertySet)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\InitOnlyMemberTests.cs (1)
2565bool isSetter = method.MethodKind == MethodKind.PropertySet;
Semantics\NativeIntegerTests.cs (2)
330case MethodKind.PropertySet: 444case MethodKind.PropertySet:
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (25)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (2)
360Assert.Equal(MethodKind.PropertySet, setterSymbol.MethodKind); 2884Assert.Equal(MethodKind.PropertySet, explicitPropertySetterSymbol.MethodKind);
Compilation\SemanticModelGetSemanticInfoTests.cs (1)
5413Assert.Equal(MethodKind.PropertySet, ((IMethodSymbol)sortedCandidates[0]).MethodKind);
Symbols\InterfaceImplementationTests.cs (1)
1026Assert.Equal(MethodKind.PropertySet, synthesizedExplicitImpls[2].MethodKind);
Symbols\Metadata\PE\LoadingIndexers.cs (1)
1084Assert.Equal(propertyIsIndexer ? MethodKind.PropertySet : MethodKind.Ordinary, accessor.MethodKind);
Symbols\Source\CustomModifierCopyTests.cs (2)
533AssertAllParametersHaveConstModOpt(explicitImpl, ignoreLast: explicitImpl.MethodKind == MethodKind.PropertySet); 741var explicitSetterImpl = explicitImpls.Where(impl => impl.ImplementingMethod.MethodKind == MethodKind.PropertySet).Single();
Symbols\Source\PropertyTests.cs (6)
604Assert.True(accessor.MethodKind == MethodKind.PropertyGet || accessor.MethodKind == MethodKind.PropertySet, 725VerifyAccessor(goodStatic.SetMethod, goodStatic, MethodKind.PropertySet); 727VerifyAccessor(badStatic.SetMethod, goodStatic, MethodKind.PropertySet); 742VerifyAccessor(goodInstance.SetMethod, goodInstance, MethodKind.PropertySet); 744VerifyAccessor(badInstance.SetMethod, goodInstance, MethodKind.PropertySet); 751VerifyAccessor(staticAndInstance.SetMethod, goodInstance, MethodKind.PropertySet);
Symbols\StaticAbstractMembersInInterfacesTests.cs (12)
22972Assert.Equal(MethodKind.PropertySet, cM01Set.MethodKind); 23065Assert.Equal(MethodKind.PropertySet, cM01Set.MethodKind); 23158Assert.Equal(MethodKind.PropertySet, cM01Set.MethodKind); 23746Assert.Equal(MethodKind.PropertySet, cM01Set.MethodKind); 24028Assert.Equal(MethodKind.PropertySet, cM01Set.MethodKind); 24086Assert.Equal(MethodKind.PropertySet, cM01Set.MethodKind); 24190Assert.Equal(MethodKind.PropertySet, cM01Set.MethodKind); 24458Assert.Equal(MethodKind.PropertySet, c1M01Set.MethodKind); 24478Assert.Equal(MethodKind.PropertySet, c2M01Set.MethodKind); 24606Assert.Equal(MethodKind.PropertySet, c1M01Set.MethodKind); 24668Assert.Equal(MethodKind.PropertySet, c2M01Set.MethodKind); 24708Assert.Equal(MethodKind.PropertySet, c3M01Set.MethodKind);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
Extensions.cs (2)
581case MethodKind.PropertySet: 583var isSetter = accessor.MethodKind == MethodKind.PropertySet;
Microsoft.CodeAnalysis.Features (6)
ChangeSignature\AbstractChangeSignatureService.cs (1)
272if (methodSymbol is { MethodKind: MethodKind.PropertyGet or MethodKind.PropertySet })
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (1)
353var setMethod = prop.SetMethod != null ? CreateAccessorSymbol(prop, MethodKind.PropertySet) : null;
DocumentHighlighting\AbstractDocumentHighlightsService.cs (1)
146case MethodKind.PropertySet:
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
358MethodKind.PropertyGet or MethodKind.PropertySet => FeaturesResources.property_accessor,
RQName\RQNodeBuilder.cs (1)
204MethodKind.PropertySet or
Shared\Extensions\ISymbolExtensions_2.cs (1)
254case MethodKind.PropertySet:
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\TrackingDiagnosticAnalyzer.cs (1)
129new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.PropertySet, ReturnsVoid = true },
Microsoft.CodeAnalysis.VisualBasic (37)
Binding\Binder_Utils.vb (2)
1524Case MethodKind.PropertySet 1651MethodKindPropertySet = CUInt(MethodKind.PropertySet) << MethodKindShift
Binding\SyntheticBoundTrees\SynthesizedPropertyAccessorBase.vb (1)
88Debug.Assert(accessor.MethodKind = MethodKind.PropertySet)
Compilation\ClsComplianceChecker.vb (1)
219Case MethodKind.PropertyGet, MethodKind.PropertySet
SymbolDisplay\SymbolDisplayVisitor.Members.vb (2)
212Case MethodKind.PropertySet 320MethodKind.PropertySet,
Symbols\AnonymousTypes\PublicSymbols\AnonymousType_PropertyPublicAccessors.vb (1)
91Return MethodKind.PropertySet
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType_PropertyAccessors.vb (1)
110Return MethodKind.PropertySet
Symbols\EmbeddedSymbols\EmbeddedSymbolManager.SymbolsCollection.vb (2)
234Case MethodKind.PropertyGet, MethodKind.PropertySet 376kind = MethodKind.PropertySet)
Symbols\Metadata\PE\PEMethodSymbol.vb (2)
891Me.MethodKind = MethodKind.PropertySet AndAlso 975Debug.Assert((methodKind = MethodKind.PropertyGet) OrElse (methodKind = MethodKind.PropertySet))
Symbols\Metadata\PE\PEPropertySymbol.vb (1)
131_setMethod.SetAssociatedProperty(Me, MethodKind.PropertySet)
Symbols\MethodKindExtensions.vb (1)
28Case MethodKind.PropertySet
Symbols\MethodSymbol.vb (1)
230Me.MethodKind <> MethodKind.PropertySet AndAlso
Symbols\Source\OverrideHidingHelper.vb (3)
501MethodKind.PropertyGet, MethodKind.PropertySet 627DirectCast(DirectCast(overridingSym, Symbol), MethodSymbol).MethodKind = MethodKind.PropertySet))) 689DirectCast(DirectCast(overridingSym, Symbol), MethodSymbol).MethodKind = MethodKind.PropertySet)))
Symbols\Source\SourceMemberContainerTypeSymbol.vb (1)
961Case MethodKind.EventAdd, MethodKind.EventRemove, MethodKind.PropertyGet, MethodKind.PropertySet
Symbols\Source\SourceMethodSymbol.vb (3)
1779Case MethodKind.PropertyGet, MethodKind.PropertySet 1961MethodKind.PropertySet, 2267Case MethodKind.PropertyGet, MethodKind.PropertySet
Symbols\Source\SourceNamedTypeSymbol_ComClass.vb (2)
1228Case MethodKind.PropertySet 1229Return MethodKind.PropertySet
Symbols\Source\SourceNamedTypeSymbol_GroupClass.vb (1)
403(disposeMethod.Length > 0 AndAlso ConflictsWithExistingMemberOrType(binder.GetAccessorName(propertyName, MethodKind.PropertySet, isWinMd), membersBuilder, nestedTypes, conflictsWith)) OrElse
Symbols\Source\SourcePropertyAccessorSymbol.vb (5)
105If methodKind = MethodKind.PropertySet Then 239Case MethodKind.PropertySet 353Return If(Me.MethodKind = MethodKind.PropertySet, ImmutableArray(Of CustomModifier).Empty, m_property.TypeCustomModifiers) 367Debug.Assert(Me.MethodKind = MethodKind.PropertySet) 396Dim isSetter As Boolean = (method.MethodKind = MethodKind.PropertySet)
Symbols\Source\SourcePropertySymbol.vb (1)
213Binder.GetAccessorName(prop.Name, MethodKind.PropertySet,
Symbols\Source\SynthesizedMyGroupCollectionPropertyAccessorSymbol.vb (1)
205Return MethodKind.PropertySet
Symbols\Source\SynthesizedWithEventsAccessorSymbol.vb (1)
180Return MethodKind.PropertySet
Symbols\SubstitutedNamedType.vb (1)
457Case MethodKind.PropertyGet, MethodKind.PropertySet
Symbols\Symbol_Attributes.vb (1)
83MethodKind.PropertySet,
Symbols\SynthesizedSymbols\SynthesizedParameterSymbol.vb (2)
106Debug.Assert(propertySetter.MethodKind = MethodKind.PropertySet) 116If method.MethodKind = MethodKind.PropertySet AndAlso
Microsoft.CodeAnalysis.VisualBasic.Features (1)
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.vb (1)
166ElseIf methodSymbol.MethodKind = MethodKind.PropertySet Then
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (8)
SymbolsTests\Source\PropertyTests.vb (8)
5601VerifyAccessor(goodStatic.SetMethod, goodStatic, MethodKind.PropertySet) 5603VerifyAccessor(badStatic.SetMethod, goodStatic, MethodKind.PropertySet) 5605VerifyAccessor(mismatchedStatic.SetMethod, mismatchedStatic, MethodKind.PropertySet) 5618VerifyAccessor(goodInstance.SetMethod, goodInstance, MethodKind.PropertySet) 5620VerifyAccessor(badInstance.SetMethod, goodInstance, MethodKind.PropertySet) 5622VerifyAccessor(mismatchedInstance.SetMethod, mismatchedInstance, MethodKind.PropertySet) 5627VerifyAccessor(staticAndInstance.SetMethod, goodInstance, MethodKind.PropertySet) 8110Dim isAccessor = accessor.MethodKind = MethodKind.PropertyGet OrElse accessor.MethodKind = MethodKind.PropertySet
Microsoft.CodeAnalysis.Workspaces (7)
ReassignedVariable\AbstractReassignedVariableService.cs (1)
184if (methodOrProperty is IMethodSymbol { MethodKind: MethodKind.PropertyGet or MethodKind.PropertySet } method)
Recommendations\AbstractRecommendationService.cs (1)
93case MethodKind.PropertySet:
Shared\Extensions\ISymbolExtensions_2.cs (1)
19MethodKind.PropertySet)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
140MethodKind.PropertySet or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\MethodKindExtensions.cs (1)
10=> kind is MethodKind.PropertyGet or MethodKind.PropertySet;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (2)
47Debug.Assert(!isInitOnly || methodKind == MethodKind.PropertySet); 48this.IsInitOnly = methodKind == MethodKind.PropertySet && isInitOnly;
Microsoft.VisualStudio.LanguageServices (1)
Progression\GraphBuilder.cs (1)
549case MethodKind.PropertySet:
Microsoft.VisualStudio.LanguageServices.CSharp (4)
CodeModel\CSharpCodeModelService.cs (4)
997MethodKind.PropertySet or 1495SyntaxKind.SetAccessorDeclaration => MethodKind.PropertySet, 1505MethodKind.PropertySet => SyntaxKind.SetAccessorDeclaration, 2209case MethodKind.PropertySet:
Microsoft.VisualStudio.LanguageServices.VisualBasic (4)
CodeModel\VisualBasicCodeModelService.vb (4)
1101Return MethodKind.PropertySet 1117Case MethodKind.PropertySet 1388methodSymbol.MethodKind = MethodKind.PropertySet OrElse 2557Case MethodKind.PropertySet