Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Add missing inheritdocs for TryParse
  • Loading branch information
dakersnar committed Sep 16, 2022
commit 49a1ca2f0145b6de1a4793cd2c3ca71ca605f76c
1 change: 1 addition & 0 deletions src/libraries/System.Private.CoreLib/src/System/Decimal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1813,6 +1813,7 @@ private static bool TryConvertTo<TOther>(decimal value, [MaybeNullWhen(false)] o
// IParsable
//

/// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out decimal result) => TryParse(s, NumberStyles.Number, provider, out result);

//
Expand Down
1 change: 1 addition & 0 deletions src/libraries/System.Private.CoreLib/src/System/Double.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1411,6 +1411,7 @@ private static bool TryConvertTo<TOther>(double value, [MaybeNullWhen(false)] ou
// IParsable
//

/// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out double result) => TryParse(s, NumberStyles.Float | NumberStyles.AllowThousands, provider, out result);

//
Expand Down
1 change: 1 addition & 0 deletions src/libraries/System.Private.CoreLib/src/System/Half.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1888,6 +1888,7 @@ private static bool TryConvertTo<TOther>(Half value, [MaybeNullWhen(false)] out
// IParsable
//

/// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out Half result) => TryParse(s, DefaultParseStyle, provider, out result);

//
Expand Down
1 change: 1 addition & 0 deletions src/libraries/System.Private.CoreLib/src/System/Int128.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2013,6 +2013,7 @@ static bool INumberBase<Int128>.TryConvertToTruncating<TOther>(Int128 value, [Ma
// IParsable
//

/// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out Int128 result) => TryParse(s, NumberStyles.Integer, provider, out result);

//
Expand Down
1 change: 1 addition & 0 deletions src/libraries/System.Private.CoreLib/src/System/Int16.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1355,6 +1355,7 @@ static bool INumberBase<short>.TryConvertToTruncating<TOther>(short value, [Mayb
// IParsable
//

/// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out short result) => TryParse(s, NumberStyles.Integer, provider, out result);

//
Expand Down
1 change: 1 addition & 0 deletions src/libraries/System.Private.CoreLib/src/System/Int32.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1367,6 +1367,7 @@ static bool INumberBase<int>.TryConvertToTruncating<TOther>(int value, [MaybeNul
// IParsable
//

/// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out int result) => TryParse(s, NumberStyles.Integer, provider, out result);

//
Expand Down
1 change: 1 addition & 0 deletions src/libraries/System.Private.CoreLib/src/System/Int64.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1360,6 +1360,7 @@ static bool INumberBase<long>.TryConvertToTruncating<TOther>(long value, [MaybeN
// IParsable
//

/// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out long result) => TryParse(s, NumberStyles.Integer, provider, out result);

//
Expand Down
1 change: 1 addition & 0 deletions src/libraries/System.Private.CoreLib/src/System/IntPtr.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ public static bool TryParse([NotNullWhen(true)] string? s, out nint result)
return nint_t.TryParse(s, out Unsafe.As<nint, nint_t>(ref result));
}

/// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out nint result)
{
Unsafe.SkipInit(out result);
Expand Down
1 change: 1 addition & 0 deletions src/libraries/System.Private.CoreLib/src/System/SByte.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1320,6 +1320,7 @@ static bool INumberBase<sbyte>.TryConvertToTruncating<TOther>(sbyte value, [Mayb
// IParsable
//

/// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out sbyte result) => TryParse(s, NumberStyles.Integer, provider, out result);

//
Expand Down
1 change: 1 addition & 0 deletions src/libraries/System.Private.CoreLib/src/System/Single.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1391,6 +1391,7 @@ private static bool TryConvertTo<TOther>(float value, [MaybeNullWhen(false)] out
// IParsable
//

/// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out float result) => TryParse(s, NumberStyles.Float | NumberStyles.AllowThousands, provider, out result);

//
Expand Down
1 change: 1 addition & 0 deletions src/libraries/System.Private.CoreLib/src/System/UInt128.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2023,6 +2023,7 @@ static bool INumberBase<UInt128>.TryConvertToTruncating<TOther>(UInt128 value, [
// IParsable
//

/// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out UInt128 result) => TryParse(s, NumberStyles.Integer, provider, out result);

//
Expand Down
1 change: 1 addition & 0 deletions src/libraries/System.Private.CoreLib/src/System/UInt16.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,7 @@ static bool INumberBase<ushort>.TryConvertToTruncating<TOther>(ushort value, [Ma
// IParsable
//

/// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out ushort result) => TryParse(s, NumberStyles.Integer, provider, out result);

//
Expand Down
1 change: 1 addition & 0 deletions src/libraries/System.Private.CoreLib/src/System/UInt32.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,7 @@ static bool INumberBase<uint>.TryConvertToTruncating<TOther>(uint value, [MaybeN
// IParsable
//

/// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out uint result) => TryParse(s, NumberStyles.Integer, provider, out result);

//
Expand Down
1 change: 1 addition & 0 deletions src/libraries/System.Private.CoreLib/src/System/UInt64.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1172,6 +1172,7 @@ static bool INumberBase<ulong>.TryConvertToTruncating<TOther>(ulong value, [Mayb
// IParsable
//

/// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out ulong result) => TryParse(s, NumberStyles.Integer, provider, out result);

//
Expand Down
1 change: 1 addition & 0 deletions src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ public static bool TryParse([NotNullWhen(true)] string? s, out nuint result)
return nuint_t.TryParse(s, out Unsafe.As<nuint, nuint_t>(ref result));
}

/// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out nuint result)
{
Unsafe.SkipInit(out result);
Expand Down