You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f18d662
Browse filesBrowse the repository at this point in the historyBrowse files
Update parameter and property metadata logic and docs
- Consider IsRetval flag for method return parameters.
- Refine read-only detection: adjust attribute/modifier checks and order.
- Expand isMarkedReadOnly to include optional IsReadOnlyAttribute modifiers.
- Clarify XML docs for IsReadOnly and IsInit in PropertyData.
/// Gets a value indicating whether the current property has a setter or not.
916
916
/// </summary>
917
-
/// <remarks>A read-only instance cannot be modified. Use this property to determine if changes to the
918
-
/// instance are permitted.</remarks>
917
+
/// <remarks>The <see cref="IsReadOnly"/> property is an alias for the inverted <see cref="CanWrite"/>:
918
+
/// <br/><c>IsReadOnly == !CanWrite</c></remarks>
919
919
/// <value><see langword="true"/> if the property does not have a setter and is therefore read-only; otherwise, <see langword="false"/>.</value>
920
920
internalboolIsReadOnly=>!CanWrite;
921
921
922
922
/// <summary>
923
923
/// Returns whether the property is an init-only property.
924
924
/// </summary>
925
-
/// <remarks>This is determined by checking if the property has a setter method and if that setter method is marked with the <see cref="IsExternalInit"/> attribute,
925
+
/// <remarks>This is determined by checking if the property has a setter method and if that setter method is marked with the <see cref="IsExternalInit"/> modifier,
926
926
/// which is used by the C# compiler to indicate init-only properties.
927
927
/// If the property does not have a setter or if the setter is not marked as init-only, this property returns <see langword="false"/>.</remarks>
928
928
/// <value><see langword="true"/> if the property is an init-only property; otherwise, <see langword="false"/>.</value>
0 commit comments