Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit699b780

Browse files
authored
[Foundation] Fix nullability in NSValue.
This is file 10 of 47 files with nullability disabled in Foundation.Also:* Remove 'To be added.' placeholders.* Improve XML comments with proper formatting and see cref attributes.* Remove unnecessary whitespace in documentation.* Mark ObjCType property as nullable (Marshal.PtrToStringAnsi can return null).* Update property documentation to use 'Gets' instead of 'Returns'.* Add proper parameter and return descriptions.* Remove the NO_SYSTEM_DRAWING condition, NO_SYSTEM_DRAWING is not defined anymore.Contributes towards#17285.
1 parente0dcad9 commit699b780

File tree

1 file changed

+19
-34
lines changed

1 file changed

+19
-34
lines changed

‎src/Foundation/NSValue.cs‎

Lines changed: 19 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -23,77 +23,62 @@
2323
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2424
//
2525

26-
#if!NO_SYSTEM_DRAWING
2726
usingSystem.Drawing;
28-
#endif
2927

30-
// Disable until we get around to enable + fix any issues.
31-
#nullable disable
28+
#nullable enable
3229

3330
namespaceFoundation{
3431
publicpartialclassNSValue:NSObject{
3532
#if!COREBUILD
36-
/// <summary>To be added.</summary>
37-
/// <value>To be added.</value>
38-
/// <remarks>To be added.</remarks>
39-
publicstringObjCType{
33+
/// <summary>Gets the Objective-C type encoding string for the data contained in the receiver.</summary>
34+
/// <value>A C string containing the Objective-C type encoding for the data contained in the receiver.</value>
35+
publicstring?ObjCType{
4036
get{
4137
returnMarshal.PtrToStringAnsi(ObjCTypePtr());
4238
}
4339
}
4440

45-
#if!NO_SYSTEM_DRAWING
46-
/// <param name="rect">To be added.</param>
47-
/// <summary>Creates an NSValue that wraps a RectangleF object.</summary>
48-
/// <returns>To be added.</returns>
49-
/// <remarks>To be added.</remarks>
41+
/// <summary>Creates an <see cref="NSValue" /> that wraps a <see cref="RectangleF" /> object.</summary>
42+
/// <param name="rect">The rectangle to wrap.</param>
43+
/// <returns>A new <see cref="NSValue" /> instance containing the specified rectangle.</returns>
5044
publicstaticNSValueFromRectangleF(RectangleFrect)
5145
{
5246
returnFromCGRect(rect);
5347
}
5448

55-
/// <param name="size">To be added.</param>
56-
/// <summary>Creates an NSValue that wraps a SizeF object.</summary>
57-
/// <returns>To be added.</returns>
58-
/// <remarks>To be added.</remarks>
49+
/// <summary>Creates an <see cref="NSValue" /> that wraps a <see cref="SizeF" /> object.</summary>
50+
/// <param name="size">The size to wrap.</param>
51+
/// <returns>A new <see cref="NSValue" /> instance containing the specified size.</returns>
5952
publicstaticNSValueFromSizeF(SizeFsize)
6053
{
6154
returnFromCGSize(size);
6255
}
6356

64-
/// <param name="point">To be added.</param>
65-
/// <summary>Creates an NSValue that wraps a PointF object.</summary>
66-
/// <returns>To be added.</returns>
67-
/// <remarks>To be added.</remarks>
57+
/// <summary>Creates an <see cref="NSValue" /> that wraps a <see cref="PointF" /> object.</summary>
58+
/// <param name="point">The point to wrap.</param>
59+
/// <returns>A new <see cref="NSValue" /> instance containing the specified point.</returns>
6860
publicstaticNSValueFromPointF(PointFpoint)
6961
{
7062
returnFromCGPoint(point);
7163
}
7264

73-
/// <summary>Returns the RectangleF value wrapped by this NSValue object.</summary>
74-
/// <value>To be added.</value>
75-
/// <remarks>To be added.</remarks>
65+
/// <summary>Gets the <see cref="RectangleF" /> value wrapped by this <see cref="NSValue" /> object.</summary>
66+
/// <value>The rectangle value.</value>
7667
publicRectangleFRectangleFValue{
7768
get{return(RectangleF)CGRectValue;}
7869
}
7970

80-
/// <summary>Returns the SizeF value wrapped by this NSValue object.</summary>
81-
/// <value>
82-
/// </value>
83-
/// <remarks>
84-
/// </remarks>
71+
/// <summary>Gets the <see cref="SizeF" /> value wrapped by this <see cref="NSValue" /> object.</summary>
72+
/// <value>The size value.</value>
8573
publicSizeFSizeFValue{
8674
get{return(SizeF)CGSizeValue;}
8775
}
8876

89-
/// <summary>Returns the PointF value wrapped by this NSValue object.</summary>
90-
/// <value>To be added.</value>
91-
/// <remarks>To be added.</remarks>
77+
/// <summary>Gets the <see cref="PointF" /> value wrapped by this <see cref="NSValue" /> object.</summary>
78+
/// <value>The point value.</value>
9279
publicPointFPointFValue{
9380
get{return(PointF)CGPointValue;}
9481
}
95-
#endif
96-
9782
#endif
9883
}
9984
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp