Skip to content

Commit 8d5c303

Browse files
tarekgheerhardt
andauthored
Port the doc changes to source (#72638)
* Port the doc changes to source * Address the feedback * Update src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/DateOnlyConverter.cs Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com> * Remove duplicated summary section * reorder the doc elements * reorder the remaining doc elements Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
1 parent c0b9416 commit 8d5c303

2 files changed

Lines changed: 12 additions & 16 deletions

File tree

src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/DateOnlyConverter.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,21 @@
99
namespace System.ComponentModel
1010
{
1111
/// <summary>
12-
/// Provides a type converter to convert <see cref='System.DateOnly'/>
13-
/// objects to and from various other representations.
12+
/// Provides a type converter to convert <see cref='System.DateOnly'/> objects to and from various other representations.
1413
/// </summary>
1514
public class DateOnlyConverter : TypeConverter
1615
{
1716
/// <summary>
18-
/// Gets a value indicating whether this converter can convert an
19-
/// object in the given source type to a <see cref='System.DateOnly'/>
17+
/// Gets a value indicating whether this converter can convert an object in the given source type to a <see cref='System.DateOnly'/>
2018
/// object using the specified context.
2119
/// </summary>
20+
/// <inheritdoc />
2221
public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType)
2322
{
2423
return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
2524
}
2625

27-
/// <summary>
28-
/// Gets a value indicating whether this converter can convert an object
29-
/// to the given destination type using the context.
30-
/// </summary>
26+
/// <inheritdoc />
3127
public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType)
3228
{
3329
return destinationType == typeof(InstanceDescriptor) || base.CanConvertTo(context, destinationType);
@@ -36,6 +32,7 @@ public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(
3632
/// <summary>
3733
/// Converts the given value object to a <see cref='System.DateOnly'/> object.
3834
/// </summary>
35+
/// <inheritdoc />
3936
public override object? ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value)
4037
{
4138
if (value is string text)
@@ -77,6 +74,7 @@ public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(
7774
/// <summary>
7875
/// Converts the given value object from a <see cref='System.DateOnly'/> object using the arguments.
7976
/// </summary>
77+
/// <inheritdoc />
8078
public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType)
8179
{
8280
if (destinationType == typeof(string) && value is DateOnly dateOnly)

src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/TimeOnlyConverter.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,21 @@
99
namespace System.ComponentModel
1010
{
1111
/// <summary>
12-
/// Provides a type converter to convert <see cref='System.TimeOnly'/>
13-
/// objects to and from various other representations.
12+
/// Provides a type converter to convert <see cref='System.TimeOnly'/> objects to and from various other representations.
1413
/// </summary>
1514
public class TimeOnlyConverter : TypeConverter
1615
{
1716
/// <summary>
18-
/// Gets a value indicating whether this converter can convert an
19-
/// object in the given source type to a <see cref='System.TimeOnly'/>
17+
/// Gets a value indicating whether this converter can convert an object in the given source type to a <see cref='System.TimeOnly'/>
2018
/// object using the specified context.
2119
/// </summary>
20+
/// <inheritdoc />
2221
public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType)
2322
{
2423
return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
2524
}
2625

27-
/// <summary>
28-
/// Gets a value indicating whether this converter can convert an object
29-
/// to the given destination type using the context.
30-
/// </summary>
26+
/// <inheritdoc />
3127
public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType)
3228
{
3329
return destinationType == typeof(InstanceDescriptor) || base.CanConvertTo(context, destinationType);
@@ -36,6 +32,7 @@ public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(
3632
/// <summary>
3733
/// Converts the given value object to a <see cref='System.TimeOnly'/> object.
3834
/// </summary>
35+
/// <inheritdoc />
3936
public override object? ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value)
4037
{
4138
if (value is string text)
@@ -77,6 +74,7 @@ public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(
7774
/// <summary>
7875
/// Converts the given value object from a <see cref='System.TimeOnly'/> object using the arguments.
7976
/// </summary>
77+
/// <inheritdoc />
8078
public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType)
8179
{
8280
if (destinationType == typeof(string) && value is TimeOnly timeOnly)

0 commit comments

Comments
 (0)