Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve XML comment indenting #13095

Merged
merged 1 commit into from
Mar 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Common/src/PlatformAttributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace System.Runtime.Versioning;

/// <summary>
/// Base type for all platform-specific API attributes.
/// Base type for all platform-specific API attributes.
/// </summary>
#if SYSTEM_PRIVATE_CORELIB
public
Expand All @@ -22,7 +22,7 @@ private protected OSPlatformAttribute(string platformName)
}

/// <summary>
/// Records the platform that the project targeted.
/// Records the platform that the project targeted.
/// </summary>
[AttributeUsage(AttributeTargets.Assembly,
AllowMultiple = false, Inherited = false)]
Expand All @@ -39,8 +39,8 @@ public TargetPlatformAttribute(string platformName) : base(platformName)
}

/// <summary>
/// Records the operating system (and minimum version) that supports an API. Multiple attributes can be
/// applied to indicate support on multiple operating systems.
/// Records the operating system (and minimum version) that supports an API. Multiple attributes can be
/// applied to indicate support on multiple operating systems.
/// </summary>
/// <remarks>
/// <para>
Expand Down
14 changes: 7 additions & 7 deletions src/Common/tests/TestUtilities/XUnit/UseCultureAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public UseCultureAttribute(string culture, string uiCulture)
}

/// <summary>
/// Gets the culture.
/// Gets the culture.
/// </summary>
public CultureInfo Culture => _culture.Value;

Expand All @@ -59,14 +59,14 @@ public UseCultureAttribute(string culture, string uiCulture)
public bool SetUnmanagedUiThreadCulture { get; set; }

/// <summary>
/// Gets the UI culture.
/// Gets the UI culture.
/// </summary>
public CultureInfo UICulture => _uiCulture.Value;

/// <summary>
/// Stores the current <see cref="Thread.CurrentPrincipal" />
/// <see cref="CultureInfo.CurrentCulture" /> and <see cref="CultureInfo.CurrentUICulture" />
/// and replaces them with the new cultures defined in the constructor.
/// Stores the current <see cref="Thread.CurrentPrincipal" />
/// <see cref="CultureInfo.CurrentCulture" /> and <see cref="CultureInfo.CurrentUICulture" />
/// and replaces them with the new cultures defined in the constructor.
/// </summary>
/// <param name="methodUnderTest">The method under test</param>
public override unsafe void Before(MethodInfo methodUnderTest)
Expand All @@ -89,8 +89,8 @@ public override unsafe void Before(MethodInfo methodUnderTest)
}

/// <summary>
/// Restores the original <see cref="CultureInfo.CurrentCulture" /> and
/// <see cref="CultureInfo.CurrentUICulture" /> to <see cref="Thread.CurrentPrincipal" />
/// Restores the original <see cref="CultureInfo.CurrentCulture" /> and
/// <see cref="CultureInfo.CurrentUICulture" /> to <see cref="Thread.CurrentPrincipal" />
/// </summary>
/// <param name="methodUnderTest">The method under test</param>
public override void After(MethodInfo methodUnderTest)
Expand Down
22 changes: 11 additions & 11 deletions src/System.Drawing.Common/src/Special/NullableAttributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ sealed class MaybeNullWhenAttribute : Attribute
{
/// <summary>Initializes the attribute with the specified return value condition.</summary>
/// <param name="returnValue">
/// The return value condition. If the method returns this value, the associated parameter may be null.
/// The return value condition. If the method returns this value, the associated parameter may be null.
/// </param>
public MaybeNullWhenAttribute(bool returnValue) => ReturnValue = returnValue;

Expand All @@ -74,7 +74,7 @@ sealed class NotNullWhenAttribute : Attribute
{
/// <summary>Initializes the attribute with the specified return value condition.</summary>
/// <param name="returnValue">
/// The return value condition. If the method returns this value, the associated parameter will not be null.
/// The return value condition. If the method returns this value, the associated parameter will not be null.
/// </param>
public NotNullWhenAttribute(bool returnValue) => ReturnValue = returnValue;

Expand All @@ -93,7 +93,7 @@ sealed class NotNullIfNotNullAttribute : Attribute
{
/// <summary>Initializes the attribute with the associated parameter name.</summary>
/// <param name="parameterName">
/// The associated parameter name. The output will be non-null if the argument to the parameter specified is non-null.
/// The associated parameter name. The output will be non-null if the argument to the parameter specified is non-null.
/// </param>
public NotNullIfNotNullAttribute(string parameterName) => ParameterName = parameterName;

Expand Down Expand Up @@ -122,8 +122,8 @@ sealed class DoesNotReturnIfAttribute : Attribute
{
/// <summary>Initializes the attribute with the specified parameter value.</summary>
/// <param name="parameterValue">
/// The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to
/// the associated parameter matches this value.
/// The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to
/// the associated parameter matches this value.
/// </param>
public DoesNotReturnIfAttribute(bool parameterValue) => ParameterValue = parameterValue;

Expand All @@ -143,13 +143,13 @@ sealed class MemberNotNullAttribute : Attribute
{
/// <summary>Initializes the attribute with a field or property member.</summary>
/// <param name="member">
/// The field or property member that is promised to be not-null.
/// The field or property member that is promised to be not-null.
/// </param>
public MemberNotNullAttribute(string member) => Members = [member];

/// <summary>Initializes the attribute with the list of field and property members.</summary>
/// <param name="members">
/// The list of field and property members that are promised to be not-null.
/// The list of field and property members that are promised to be not-null.
/// </param>
public MemberNotNullAttribute(params string[] members) => Members = members;

Expand All @@ -168,10 +168,10 @@ sealed class MemberNotNullWhenAttribute : Attribute
{
/// <summary>Initializes the attribute with the specified return value condition and a field or property member.</summary>
/// <param name="returnValue">
/// The return value condition. If the method returns this value, the associated parameter will not be null.
/// The return value condition. If the method returns this value, the associated parameter will not be null.
/// </param>
/// <param name="member">
/// The field or property member that is promised to be not-null.
/// The field or property member that is promised to be not-null.
/// </param>
public MemberNotNullWhenAttribute(bool returnValue, string member)
{
Expand All @@ -181,10 +181,10 @@ public MemberNotNullWhenAttribute(bool returnValue, string member)

/// <summary>Initializes the attribute with the specified return value condition and list of field and property members.</summary>
/// <param name="returnValue">
/// The return value condition. If the method returns this value, the associated parameter will not be null.
/// The return value condition. If the method returns this value, the associated parameter will not be null.
/// </param>
/// <param name="members">
/// The list of field and property members that are promised to be not-null.
/// The list of field and property members that are promised to be not-null.
/// </param>
public MemberNotNullWhenAttribute(bool returnValue, params string[] members)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ namespace System.Diagnostics.CodeAnalysis;
/// </summary>
/// <remarks>
/// <para>
/// This allows tools to understand which methods are unsafe to call when removing unreferenced
/// code from an application.
/// This allows tools to understand which methods are unsafe to call when removing unreferenced
/// code from an application.
/// </para>
/// </remarks>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class, Inherited = false)]
Expand All @@ -22,25 +22,25 @@ namespace System.Diagnostics.CodeAnalysis;
sealed class RequiresUnreferencedCodeAttribute : Attribute
{
/// <summary>
/// Initializes a new instance of the <see cref="RequiresUnreferencedCodeAttribute"/> class
/// with the specified message.
/// Initializes a new instance of the <see cref="RequiresUnreferencedCodeAttribute"/> class
/// with the specified message.
/// </summary>
/// <param name="message">
/// A message that contains information about the usage of unreferenced code.
/// A message that contains information about the usage of unreferenced code.
/// </param>
public RequiresUnreferencedCodeAttribute(string message)
{
Message = message;
}

/// <summary>
/// Gets a message that contains information about the usage of unreferenced code.
/// Gets a message that contains information about the usage of unreferenced code.
/// </summary>
public string Message { get; }

/// <summary>
/// Gets or sets an optional URL that contains more information about the method,
/// why it requires unreferenced code, and what options a consumer has to deal with it.
/// Gets or sets an optional URL that contains more information about the method,
/// why it requires unreferenced code, and what options a consumer has to deal with it.
/// </summary>
public string? Url { get; set; }
}
10 changes: 5 additions & 5 deletions src/System.Drawing.Common/src/System/Drawing/BitmapSelector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
namespace System.Drawing;

/// <summary>
/// Provides methods to select bitmaps.
/// Provides methods to select bitmaps.
/// </summary>
internal static class BitmapSelector
{
/// <summary>
/// Returns a resource stream loaded from the appropriate location according to the current
/// suffix.
/// Returns a resource stream loaded from the appropriate location according to the current
/// suffix.
/// </summary>
/// <param name="assembly">The assembly from which the stream is loaded</param>
/// <param name="type">The type whose namespace is used to scope the manifest resource name</param>
/// <param name="originalName">The name of the manifest resource being requested</param>
/// <returns>
/// The manifest resource stream corresponding to <paramref name="originalName"/>.
/// The manifest resource stream corresponding to <paramref name="originalName"/>.
/// </returns>
public static Stream? GetResourceStream(Assembly assembly, Type type, string originalName)
{
Expand All @@ -28,7 +28,7 @@ internal static class BitmapSelector

/// <summary>
/// Returns a resource stream loaded from the appropriate location according to the current
/// suffix.
/// suffix.
/// </summary>
/// <param name="type">
/// The type from whose assembly the stream is loaded and whose namespace is used to scope the resource name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
namespace System.Drawing;

/// <summary>
/// Opt-In flag to look for resources in the same assembly but with the "bitmapSuffix" config setting.
/// i.e. System.Web.UI.WebControl.Button.bmp -> System.Web.UI.WebControl.Button.VisualStudio.11.0.bmp
/// Opt-In flag to look for resources in the same assembly but with the "bitmapSuffix" config setting.
/// i.e. System.Web.UI.WebControl.Button.bmp -> System.Web.UI.WebControl.Button.VisualStudio.11.0.bmp
/// </summary>
[AttributeUsage(AttributeTargets.Assembly)]
public class BitmapSuffixInSameAssemblyAttribute : Attribute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
namespace System.Drawing;

/// <summary>
/// Opt-In flag to look for resources in the another assembly with the "bitmapSuffix" config setting
/// i.e. System.Web.dll -> System.Web.VisualStudio.11.0.dll
/// Opt-In flag to look for resources in the another assembly with the "bitmapSuffix" config setting
/// i.e. System.Web.dll -> System.Web.VisualStudio.11.0.dll
/// </summary>
[AttributeUsage(AttributeTargets.Assembly)]
public class BitmapSuffixInSatelliteAssemblyAttribute : Attribute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
namespace System.Drawing;

/// <summary>
/// The BufferedGraphics class can be thought of as a "Token" or "Reference" to the buffer that a
/// BufferedGraphicsContext creates. While a BufferedGraphics is outstanding, the memory associated with the
/// buffer is locked. The general design is such that under normal conditions a single BufferedGraphics will be in
/// use at one time for a given BufferedGraphicsContext.
/// The BufferedGraphics class can be thought of as a "Token" or "Reference" to the buffer that a
/// BufferedGraphicsContext creates. While a BufferedGraphics is outstanding, the memory associated with the
/// buffer is locked. The general design is such that under normal conditions a single BufferedGraphics will be in
/// use at one time for a given BufferedGraphicsContext.
/// </summary>
public sealed class BufferedGraphics : IDisposable
{
Expand All @@ -21,7 +21,7 @@ public sealed class BufferedGraphics : IDisposable
private readonly Size _virtualSize;

/// <summary>
/// Internal constructor, this class is created by BufferedGraphicsContext.
/// Internal constructor, this class is created by BufferedGraphicsContext.
/// </summary>
internal BufferedGraphics(Graphics bufferedGraphicsSurface, BufferedGraphicsContext context, Graphics? targetGraphics,
IntPtr targetDC, Point targetLoc, Size virtualSize)
Expand Down Expand Up @@ -55,12 +55,12 @@ public void Dispose()
}

/// <summary>
/// Allows access to the Graphics wrapper for the buffer.
/// Allows access to the Graphics wrapper for the buffer.
/// </summary>
public Graphics Graphics => _bufferedGraphicsSurface;

/// <summary>
/// Renders the buffer to the specified target graphics.
/// Renders the buffer to the specified target graphics.
/// </summary>
public void Render(Graphics? target)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public sealed unsafe class BufferedGraphicsContext : IDisposable
private const int BufferBusyDisposing = 2; // The graphics buffer is busy disposing.

/// <summary>
/// Basic constructor.
/// Basic constructor.
/// </summary>
public BufferedGraphicsContext()
{
Expand Down Expand Up @@ -68,7 +68,7 @@ public Size MaximumBuffer
~BufferedGraphicsContext() => Dispose(false);

/// <summary>
/// Returns a BufferedGraphics that is matched for the specified target Graphics object.
/// Returns a BufferedGraphics that is matched for the specified target Graphics object.
/// </summary>
public BufferedGraphics Allocate(Graphics targetGraphics, Rectangle targetRectangle)
{
Expand All @@ -81,7 +81,7 @@ public BufferedGraphics Allocate(Graphics targetGraphics, Rectangle targetRectan
}

/// <summary>
/// Returns a BufferedGraphics that is matched for the specified target HDC object.
/// Returns a BufferedGraphics that is matched for the specified target HDC object.
/// </summary>
public BufferedGraphics Allocate(IntPtr targetDC, Rectangle targetRectangle)
{
Expand All @@ -94,7 +94,7 @@ public BufferedGraphics Allocate(IntPtr targetDC, Rectangle targetRectangle)
}

/// <summary>
/// Returns a BufferedGraphics that is matched for the specified target HDC object.
/// Returns a BufferedGraphics that is matched for the specified target HDC object.
/// </summary>
private BufferedGraphics AllocBuffer(Graphics? targetGraphics, HDC targetDC, Rectangle targetRectangle)
{
Expand Down Expand Up @@ -143,7 +143,7 @@ private BufferedGraphics AllocBuffer(Graphics? targetGraphics, HDC targetDC, Rec
}

/// <summary>
/// Returns a BufferedGraphics that is matched for the specified target HDC object.
/// Returns a BufferedGraphics that is matched for the specified target HDC object.
/// </summary>
private static BufferedGraphics AllocBufferInTempManager(Graphics? targetGraphics, HDC targetDC, Rectangle targetRectangle)
{
Expand Down Expand Up @@ -174,11 +174,11 @@ public void Dispose()
}

/// <summary>
/// This routine allows us to control the point were we start using throw away
/// managers for painting. Since the buffer manager stays around (by default)
/// for the life of the app, we don't want to consume too much memory
/// in the buffer. However, re-allocating the buffer for small things (like
/// buttons, labels, etc) will hit us on runtime performance.
/// This routine allows us to control the point were we start using throw away
/// managers for painting. Since the buffer manager stays around (by default)
/// for the life of the app, we don't want to consume too much memory
/// in the buffer. However, re-allocating the buffer for small things (like
/// buttons, labels, etc) will hit us on runtime performance.
/// </summary>
private bool ShouldUseTempManager(Rectangle targetBounds)
{
Expand Down Expand Up @@ -336,17 +336,17 @@ private Graphics CreateBuffer(HDC src, int width, int height)
}

/// <summary>
/// Create a DIB section with an optimal format w.r.t. the specified hdc.
/// Create a DIB section with an optimal format w.r.t. the specified hdc.
///
/// If DIB &lt;= 8bpp, then the DIB color table is initialized based on the
/// specified palette. If the palette handle is NULL, then the system
/// palette is used.
/// If DIB &lt;= 8bpp, then the DIB color table is initialized based on the
/// specified palette. If the palette handle is NULL, then the system
/// palette is used.
///
/// Note: The hdc must be a direct DC (not an info or memory DC).
/// Note: The hdc must be a direct DC (not an info or memory DC).
///
/// Note: On palettized displays, if the system palette changes the
/// UpdateDIBColorTable function should be called to maintain
/// the identity palette mapping between the DIB and the display.
/// Note: On palettized displays, if the system palette changes the
/// UpdateDIBColorTable function should be called to maintain
/// the identity palette mapping between the DIB and the display.
/// </summary>
/// <returns>A valid bitmap handle if successful, IntPtr.Zero otherwise.</returns>
private HBITMAP CreateCompatibleDIB(HDC hdc, HPALETTE hpalette, int ulWidth, int ulHeight)
Expand Down Expand Up @@ -453,7 +453,7 @@ private void DisposeBitmap()
}

/// <summary>
/// Disposes of the Graphics buffer.
/// Disposes of the Graphics buffer.
/// </summary>
private void Dispose(bool disposing)
{
Expand Down Expand Up @@ -489,7 +489,7 @@ private void Dispose(bool disposing)
}

/// <summary>
/// Invalidates the cached graphics buffer.
/// Invalidates the cached graphics buffer.
/// </summary>
public void Invalidate()
{
Expand All @@ -509,7 +509,7 @@ public void Invalidate()
}

/// <summary>
/// Returns a Graphics object representing a buffer.
/// Returns a Graphics object representing a buffer.
/// </summary>
internal void ReleaseBuffer()
{
Expand Down
Loading