Skip to content

Commit a35944f

Browse files
committed
Remove leftover 'required' handling code
1 parent d5f3a0c commit a35944f

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

src/CommunityToolkit.Mvvm.SourceGenerators/ComponentModel/ObservablePropertyGenerator.Execute.cs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -390,11 +390,6 @@ public static bool TryGetInfo(
390390

391391
token.ThrowIfCancellationRequested();
392392

393-
// Check whether the property should be required
394-
bool isRequired = GetIsRequiredProperty(memberSymbol);
395-
396-
token.ThrowIfCancellationRequested();
397-
398393
propertyInfo = new PropertyInfo(
399394
memberSyntax.Kind(),
400395
typeNameWithNullabilityAnnotations,
@@ -1094,20 +1089,6 @@ private static bool TryGetAccessibilityModifiers(
10941089
return true;
10951090
}
10961091

1097-
/// <summary>
1098-
/// Checks whether an input member is a required property.
1099-
/// </summary>
1100-
/// <param name="memberSymbol">The input <see cref="ISymbol"/> instance to process.</param>
1101-
/// <returns>Whether <paramref name="memberSymbol"/> is a required property.</returns>
1102-
private static bool GetIsRequiredProperty(ISymbol memberSymbol)
1103-
{
1104-
#if ROSLYN_4_3_1_OR_GREATER
1105-
return memberSymbol is IPropertySymbol { IsRequired: true };
1106-
#else
1107-
return false;
1108-
#endif
1109-
}
1110-
11111092
/// <summary>
11121093
/// Gets a <see cref="CompilationUnitSyntax"/> instance with the cached args for property changing notifications.
11131094
/// </summary>

0 commit comments

Comments
 (0)