@@ -187,13 +187,13 @@ private static bool TryGatherDependentPropertyChangedNames(
187
187
// Validates a property name using existing properties
188
188
bool IsPropertyNameValid ( string propertyName )
189
189
{
190
- return fieldSymbol . ContainingType . GetMembers ( propertyName ) . OfType < IPropertySymbol > ( ) . Any ( ) ;
190
+ return fieldSymbol . ContainingType . GetAllMembers ( propertyName ) . OfType < IPropertySymbol > ( ) . Any ( ) ;
191
191
}
192
192
193
193
// Validate a property name including generated properties too
194
194
bool IsPropertyNameValidWithGeneratedMembers ( string propertyName )
195
195
{
196
- foreach ( ISymbol member in fieldSymbol . ContainingType . GetMembers ( ) )
196
+ foreach ( ISymbol member in fieldSymbol . ContainingType . GetAllMembers ( ) )
197
197
{
198
198
if ( member is IFieldSymbol otherFieldSymbol &&
199
199
! SymbolEqualityComparer . Default . Equals ( fieldSymbol , otherFieldSymbol ) &&
@@ -256,7 +256,7 @@ bool IsCommandNameValid(string commandName, out bool shouldLookForGeneratedMembe
256
256
{
257
257
// Each target must be a string matching the name of a property from the containing type of the annotated field, and the
258
258
// property must be of type IRelayCommand, or any type that implements that interface (to avoid generating invalid code).
259
- if ( fieldSymbol . ContainingType . GetMembers ( commandName ) . OfType < IPropertySymbol > ( ) . FirstOrDefault ( ) is IPropertySymbol propertySymbol )
259
+ if ( fieldSymbol . ContainingType . GetAllMembers ( commandName ) . OfType < IPropertySymbol > ( ) . FirstOrDefault ( ) is IPropertySymbol propertySymbol )
260
260
{
261
261
// If there is a property member with the specified name, check that it's valid. If it isn't, the
262
262
// target is definitely not valid, and the additional checks below can just be skipped. The property
@@ -285,7 +285,7 @@ bool IsCommandNameValid(string commandName, out bool shouldLookForGeneratedMembe
285
285
// Validate a command name including generated command too
286
286
bool IsCommandNameValidWithGeneratedMembers ( string commandName )
287
287
{
288
- foreach ( ISymbol member in fieldSymbol . ContainingType . GetMembers ( ) )
288
+ foreach ( ISymbol member in fieldSymbol . ContainingType . GetAllMembers ( ) )
289
289
{
290
290
if ( member is IMethodSymbol methodSymbol &&
291
291
methodSymbol . HasAttributeWithFullyQualifiedName ( "global::CommunityToolkit.Mvvm.Input.ICommandAttribute" ) &&
0 commit comments