Skip to content

Commit

Permalink
improve doc comments for FSharp.Core (#9844)
Browse files Browse the repository at this point in the history
* improve xml doc spacing

* improve cref nodes

* fix broken xml doc

* fix more crefs

* doc improvements
  • Loading branch information
dsyme authored Jul 31, 2020
1 parent e2e29f3 commit be9280e
Show file tree
Hide file tree
Showing 31 changed files with 2,484 additions and 636 deletions.
6 changes: 6 additions & 0 deletions src/absil/ilnativeres.fs
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,10 @@ type VersionHelper() =
/// <summary>
/// Parses a version string of the form "major [ '.' minor [ '.' build [ '.' revision ] ] ]".
/// </summary>
///
/// <param name="s">The version string to parse.</param>
/// <param name="version">If parsing succeeds, the parsed version. Otherwise a version that represents as much of the input as could be parsed successfully.</param>
///
/// <returns>True when parsing succeeds completely (i.e. every character in the string was consumed), false otherwise.</returns>
static member TryParse(s: string, [<Out>] version: byref<Version>) =
VersionHelper.TryParse (s, false, UInt16.MaxValue, true, ref version)
Expand All @@ -289,12 +291,14 @@ type VersionHelper() =
/// Parses a version string of the form "major [ '.' minor [ '.' ( '*' | ( build [ '.' ( '*' | revision ) ] ) ) ] ]"
/// as accepted by System.Reflection.AssemblyVersionAttribute.
/// </summary>
///
/// <param name="s">The version string to parse.</param>
/// <param name="allowWildcard">Indicates whether or not a wildcard is accepted as the terminal component.</param>
/// <param name="version">
/// If parsing succeeded, the parsed version. Otherwise a version instance with all parts set to zero.
/// If <paramref name="s"/> contains * the version build and/or revision numbers are set to <see cref="ushort.MaxValue"/>.
/// </param>
///
/// <returns>True when parsing succeeds completely (i.e. every character in the string was consumed), false otherwise.</returns>
static member TryParseAssemblyVersion (s: string, allowWildcard: bool, [<Out>] version: byref<Version>) =
Expand All @@ -306,6 +310,7 @@ type VersionHelper() =
/// Parses a version string of the form "major [ '.' minor [ '.' ( '*' | ( build [ '.' ( '*' | revision ) ] ) ) ] ]"
/// as accepted by System.Reflection.AssemblyVersionAttribute.
/// </summary>
///
/// <param name="s">The version string to parse.</param>
/// <param name="allowWildcard">Indicates whether or not we're parsing an assembly version string. If so, wildcards are accepted and each component must be less than 65535.</param>
/// <param name="maxValue">The maximum value that a version component may have.</param>
Expand All @@ -314,6 +319,7 @@ type VersionHelper() =
/// If parsing succeeded, the parsed version. When <paramref name="allowPartialParse"/> is true a version with values up to the first invalid character set. Otherwise a version with all parts set to zero.
/// If <paramref name="s"/> contains * and wildcard is allowed the version build and/or revision numbers are set to <see cref="ushort.MaxValue"/>.
/// </param>
///
/// <returns>True when parsing succeeds completely (i.e. every character in the string was consumed), false otherwise.</returns>
static member private TryParse(s: string, allowWildcard: bool, maxValue: uint16, allowPartialParse: bool, [<Out>] version: byref<Version>) =
Debug.Assert (not allowWildcard || maxValue < UInt16.MaxValue)
Expand Down
41 changes: 41 additions & 0 deletions src/fsharp/FSharp.Core/Nullable.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -117,163 +117,204 @@ module Nullable =
/// primitive numeric types. The operation requires an appropriate
/// static conversion method on the input type.</summary>
/// <param name="value">The input value.</param>
///
/// <returns>The converted byte</returns>
[<CompiledName("ToByte")>]
val inline byte : value:Nullable< ^T > -> Nullable<byte> when ^T : (static member op_Explicit : ^T -> byte) and default ^T : int

/// <summary>Converts the argument to byte. This is a direct conversion for all
/// primitive numeric types. The operation requires an appropriate
/// static conversion method on the input type.</summary>
///
/// <param name="value">The input value.</param>
///
/// <returns>The converted byte</returns>
[<CompiledName("ToUInt8")>]
val inline uint8 : value:Nullable< ^T > -> Nullable<uint8> when ^T : (static member op_Explicit : ^T -> uint8) and default ^T : int

/// <summary>Converts the argument to signed byte. This is a direct conversion for all
/// primitive numeric types. The operation requires an appropriate
/// static conversion method on the input type.</summary>
///
/// <param name="value">The input value.</param>
///
/// <returns>The converted sbyte</returns>
[<CompiledName("ToSByte")>]
val inline sbyte : value:Nullable< ^T > -> Nullable<sbyte> when ^T : (static member op_Explicit : ^T -> sbyte) and default ^T : int

/// <summary>Converts the argument to signed byte. This is a direct conversion for all
/// primitive numeric types. The operation requires an appropriate
/// static conversion method on the input type.</summary>
///
/// <param name="value">The input value.</param>
///
/// <returns>The converted sbyte</returns>
[<CompiledName("ToInt8")>]
val inline int8 : value:Nullable< ^T > -> Nullable<int8> when ^T : (static member op_Explicit : ^T -> int8) and default ^T : int

/// <summary>Converts the argument to signed 16-bit integer. This is a direct conversion for all
/// primitive numeric types. The operation requires an appropriate
/// static conversion method on the input type.</summary>
///
/// <param name="value">The input value.</param>
///
/// <returns>The converted int16</returns>
[<CompiledName("ToInt16")>]
val inline int16 : value:Nullable< ^T > -> Nullable<int16> when ^T : (static member op_Explicit : ^T -> int16) and default ^T : int

/// <summary>Converts the argument to unsigned 16-bit integer. This is a direct conversion for all
/// primitive numeric types. The operation requires an appropriate
/// static conversion method on the input type.</summary>
///
/// <param name="value">The input value.</param>
///
/// <returns>The converted uint16</returns>
[<CompiledName("ToUInt16")>]
val inline uint16 : value:Nullable< ^T > -> Nullable<uint16> when ^T : (static member op_Explicit : ^T -> uint16) and default ^T : int

/// <summary>Converts the argument to signed 32-bit integer. This is a direct conversion for all
/// primitive numeric types. The operation requires an appropriate
/// static conversion method on the input type.</summary>
///
/// <param name="value">The input value.</param>
///
/// <returns>The converted int</returns>
[<CompiledName("ToInt")>]
val inline int : value:Nullable< ^T > -> Nullable<int> when ^T : (static member op_Explicit : ^T -> int) and default ^T : int

/// <summary>Converts the argument to an unsigned 32-bit integer. This is a direct conversion for all
/// primitive numeric types. The operation requires an appropriate
/// static conversion method on the input type.</summary>
///
/// <param name="value">The input value.</param>
///
/// <returns>The converted unsigned integer</returns>
[<CompiledName("ToUInt")>]
val inline uint: value: Nullable< ^T > -> Nullable<uint> when ^T :(static member op_Explicit: ^T -> uint) and default ^T : uint

/// <summary>Converts the argument to a particular enum type.</summary>
///
/// <param name="value">The input value.</param>
///
/// <returns>The converted enum type.</returns>
[<CompiledName("ToEnum")>]
val inline enum : value:Nullable< int32 > -> Nullable< ^U > when ^U : enum<int32>

/// <summary>Converts the argument to signed 32-bit integer. This is a direct conversion for all
/// primitive numeric types. The operation requires an appropriate
/// static conversion method on the input type.</summary>
///
/// <param name="value">The input value.</param>
///
/// <returns>The converted int32</returns>
[<CompiledName("ToInt32")>]
val inline int32 : value:Nullable< ^T > -> Nullable<int32> when ^T : (static member op_Explicit : ^T -> int32) and default ^T : int

/// <summary>Converts the argument to unsigned 32-bit integer. This is a direct conversion for all
/// primitive numeric types. The operation requires an appropriate
/// static conversion method on the input type.</summary>
///
/// <param name="value">The input value.</param>
///
/// <returns>The converted uint32</returns>
[<CompiledName("ToUInt32")>]
val inline uint32 : value:Nullable< ^T > -> Nullable<uint32> when ^T : (static member op_Explicit : ^T -> uint32) and default ^T : int

/// <summary>Converts the argument to signed 64-bit integer. This is a direct conversion for all
/// primitive numeric types. The operation requires an appropriate
/// static conversion method on the input type.</summary>
///
/// <param name="value">The input value.</param>
///
/// <returns>The converted int64</returns>
[<CompiledName("ToInt64")>]
val inline int64 : value:Nullable< ^T > -> Nullable<int64> when ^T : (static member op_Explicit : ^T -> int64) and default ^T : int

/// <summary>Converts the argument to unsigned 64-bit integer. This is a direct conversion for all
/// primitive numeric types. The operation requires an appropriate
/// static conversion method on the input type.</summary>
///
/// <param name="value">The input value.</param>
///
/// <returns>The converted uint64</returns>
[<CompiledName("ToUInt64")>]
val inline uint64 : value:Nullable< ^T > -> Nullable<uint64> when ^T : (static member op_Explicit : ^T -> uint64) and default ^T : int

/// <summary>Converts the argument to 32-bit float. This is a direct conversion for all
/// primitive numeric types. The operation requires an appropriate
/// static conversion method on the input type.</summary>
///
/// <param name="value">The input value.</param>
///
/// <returns>The converted float32</returns>
[<CompiledName("ToFloat32")>]
val inline float32 : value:Nullable< ^T > -> Nullable<float32> when ^T : (static member op_Explicit : ^T -> float32) and default ^T : int

/// <summary>Converts the argument to 64-bit float. This is a direct conversion for all
/// primitive numeric types. The operation requires an appropriate
/// static conversion method on the input type.</summary>
///
/// <param name="value">The input value.</param>
///
/// <returns>The converted float</returns>
[<CompiledName("ToFloat")>]
val inline float : value:Nullable< ^T > -> Nullable<float> when ^T : (static member op_Explicit : ^T -> float) and default ^T : int

/// <summary>Converts the argument to 32-bit float. This is a direct conversion for all
/// primitive numeric types. The operation requires an appropriate
/// static conversion method on the input type.</summary>
///
/// <param name="value">The input value.</param>
///
/// <returns>The converted float32</returns>
[<CompiledName("ToSingle")>]
val inline single : value:Nullable< ^T > -> Nullable<single> when ^T : (static member op_Explicit : ^T -> single) and default ^T : int

/// <summary>Converts the argument to 64-bit float. This is a direct conversion for all
/// primitive numeric types. The operation requires an appropriate
/// static conversion method on the input type.</summary>
///
/// <param name="value">The input value.</param>
///
/// <returns>The converted float</returns>
[<CompiledName("ToDouble")>]
val inline double : value:Nullable< ^T > -> Nullable<double> when ^T : (static member op_Explicit : ^T -> double) and default ^T : int

/// <summary>Converts the argument to signed native integer. This is a direct conversion for all
/// primitive numeric types. Otherwise the operation requires an appropriate
/// static conversion method on the input type.</summary>
///
/// <param name="value">The input value.</param>
///
/// <returns>The converted nativeint</returns>
[<CompiledName("ToIntPtr")>]
val inline nativeint : value:Nullable< ^T > -> Nullable<nativeint> when ^T : (static member op_Explicit : ^T -> nativeint) and default ^T : int

/// <summary>Converts the argument to unsigned native integer using a direct conversion for all
/// primitive numeric types. Otherwise the operation requires an appropriate
/// static conversion method on the input type.</summary>
///
/// <param name="value">The input value.</param>
///
/// <returns>The converted unativeint</returns>
[<CompiledName("ToUIntPtr")>]
val inline unativeint : value:Nullable< ^T > -> Nullable<unativeint> when ^T : (static member op_Explicit : ^T -> unativeint) and default ^T : int

/// <summary>Converts the argument to System.Decimal using a direct conversion for all
/// primitive numeric types. The operation requires an appropriate
/// static conversion method on the input type.</summary>
///
/// <param name="value">The input value.</param>
///
/// <returns>The converted decimal.</returns>
[<CompiledName("ToDecimal")>]
val inline decimal : value:Nullable< ^T > -> Nullable<decimal> when ^T : (static member op_Explicit : ^T -> decimal) and default ^T : int

/// <summary>Converts the argument to character. Numeric inputs are converted according to the UTF-16
/// encoding for characters. The operation requires an appropriate static conversion method on the input type.</summary>
///
/// <param name="value">The input value.</param>
///
/// <returns>The converted char.</returns>
[<CompiledName("ToChar")>]
val inline char : value:Nullable< ^T > -> Nullable<char> when ^T : (static member op_Explicit : ^T -> char) and default ^T : int
Loading

0 comments on commit be9280e

Please sign in to comment.