Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Zohar Peled authored and Zohar Peled committed May 5, 2021
1 parent ff83202 commit 15accce
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
20 changes: 10 additions & 10 deletions ExtendedConsole/ExConsoleRead.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ public static T ReadUntilConverted<T>(this ExConsole self, string title, string
}

/// <summary>
/// Reads an input line from the user and converts it to a nullable T.
/// Reads an input line from the user and converts it to a nullable <typeparamref name="T"/>.
/// </summary>
/// <typeparam name="T">The underlying type of the nullable to convert to.</typeparam>
/// <param name="self">The current instance of ExConsole.</param>
/// <param name="title">The title to show the user before asking for input.</param>
/// <param name="errorMessage">The error message to show the user if the conversion failed.</param>
/// <param name="converter">A function that takes in a string and returns a value tuple of bool success and T value.</param>
/// <returns>An instance of T? that has a value unless the user entered ^Z.</returns>
/// <param name="converter">A function that takes in a string and returns a <see cref="ValueTuple"/> of <see cref="bool"/> success and <typeparamref name="T"/> value.</param>
/// <returns>An instance of <typeparamref name="T"/>? that has a value unless the user entered ^Z.</returns>
/// <exception cref="ArgumentNullException">Thrown when any of the parameters is null.</exception>
/// <exception cref="ArgumentException">Thrown when <paramref name="title"/> or <paramref name="errorMessage"/> are empty.</exception>
/// <exception cref="System.Xml.XmlException">Thrown when <paramref name="title"/> or <paramref name="errorMessage"/> aren't properly formatted xml.</exception>
Expand All @@ -156,14 +156,14 @@ public static T ReadUntilConverted<T>(this ExConsole self, string title, string
}

/// <summary>
/// Reads an input line from the user and converts it to T.
/// Reads an input line from the user and converts it to <typeparamref name="T"/>.
/// </summary>
/// <typeparam name="T">The target type of the conversion.</typeparam>
/// <param name="self">The current instance of ExConsole.</param>
/// <param name="title">The title to show the user before asking for input.</param>
/// <param name="errorMessage">The error message to show the user if the conversion failed.</param>
/// <param name="converter">A function that takes in a string and returns a value tuple of bool success and T value.</param>
/// <returns>The T value converted from the input string, or null if the user entered ^Z.</returns>
/// <param name="converter">A function that takes in a string and returns a <see cref="ValueTuple"/> of <see cref="bool"/> success and <typeparamref name="T"/> value.</param>
/// <returns>The <typeparamref name="T"/> value converted from the input string, or null if the user entered ^Z.</returns>
/// <exception cref="ArgumentNullException">Thrown when any of the parameters is null.</exception>
/// <exception cref="ArgumentException">Thrown when <paramref name="title"/> or <paramref name="errorMessage"/> are empty.</exception>
/// <exception cref="System.Xml.XmlException">Thrown when <paramref name="title"/> or <paramref name="errorMessage"/> aren't properly formatted xml.</exception>
Expand Down Expand Up @@ -196,7 +196,7 @@ public static T ReadClass<T>(this ExConsole self, string title, string errorMess
}

/// <summary>
/// Reads multiple values from the user, converts and returns them as an IEnumerable&lt;T&gt;.
/// Reads multiple values from the user, converts and returns them as an <see cref="IEnumerable{T}"/>.
/// Repeats until the user enters the quit text.
/// </summary>
/// <typeparam name="T">The type of values to convert to.</typeparam>
Expand All @@ -205,14 +205,14 @@ public static T ReadClass<T>(this ExConsole self, string title, string errorMess
/// <param name="errorMessage">The error message to show the user if the conversion failed.</param>
/// <param name="quit">A string the user should enter when they are done entering values.</param>
/// <param name="converter">A function that takes in a string and returns a value tuple of bool success and T value.</param>
/// <returns>An IEnumerable&lt;T&gt; containing values conveted from the user input.</returns>
/// <returns>An <see cref="IEnumerable{T}"/> containing values conveted from the user input.</returns>
/// <exception cref="ArgumentNullException">Thrown when any of the parameters is null.</exception>
/// <exception cref="ArgumentException">Thrown when <paramref name="title"/>, <paramref name="errorMessage"/> or <paramref name="quit"/> are empty.</exception>
/// <exception cref="System.Xml.XmlException">Thrown when <paramref name="title"/> or <paramref name="errorMessage"/> aren't properly formatted xml.</exception>
/// <example>
/// Read a collection of int values from the user.
/// The integers vairable is of type IEnumerable&lt;T&gt;, and will never be null.
/// If the user enters "done" before entering any valid integers, the retun value is an empty IEnumerable&lt;T&gt;.
/// The integers vairable is of type <see cref="IEnumerable{T}"/>, and will never be null.
/// If the user enters "done" before entering any valid integers, the retun value is an empty <see cref="IEnumerable{T}"/>.
/// <code>
/// var integers = _exConsole.ReadValues(
/// "Please enter integer values, or &lt;c f='red'&gt;done&lt;/c&gt; to quit.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ef8071651cf4e103b87806d4c4189735735f2b8e
1eeb4faa63f5260e8b23a1893dfd1caddbbf630a
2 changes: 1 addition & 1 deletion ExtendedConsole/obj/ExtendedConsole.csproj.nuget.cache
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 1,
"dgSpecHash": "+jpn8PeOMdH/lO9P0ukLX4xhBn/OOD/G7ih4ceJiTNmvUX1w12awpOmJUQBYk7kobQu7RzXla9cBwoaS18eTVg==",
"dgSpecHash": "hZyLDrXvy5BC7wdw24jq+2EoZr0u1xk9JCbh5/463EVkKYt5RrKVgu64rzDdzBPRr2uDpfT1EHn+Gw/UBUsm2w==",
"success": true
}
4 changes: 2 additions & 2 deletions ExtendedConsole/obj/ExtendedConsole.csproj.nuget.g.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">C:\Development\ExtendedConsole\ExtendedConsole\obj\project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\support\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder</NuGetPackageFolders>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\zohar\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">4.9.0</NuGetToolVersion>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">4.9.3</NuGetToolVersion>
</PropertyGroup>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
Expand Down
12 changes: 6 additions & 6 deletions ExtendedConsole/obj/project.assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
]
},
"packageFolders": {
"C:\\Users\\support\\.nuget\\packages\\": {},
"C:\\Users\\zohar\\.nuget\\packages\\": {},
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder": {}
},
"project": {
Expand All @@ -188,24 +188,24 @@
"projectUniqueName": "C:\\Development\\ExtendedConsole\\ExtendedConsole\\ExtendedConsole.csproj",
"projectName": "ExtendedConsole",
"projectPath": "C:\\Development\\ExtendedConsole\\ExtendedConsole\\ExtendedConsole.csproj",
"packagesPath": "C:\\Users\\support\\.nuget\\packages\\",
"packagesPath": "C:\\Users\\zohar\\.nuget\\packages\\",
"outputPath": "C:\\Development\\ExtendedConsole\\ExtendedConsole\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder"
],
"configFilePaths": [
"C:\\Users\\support\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Users\\zohar\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"netstandard2.0"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"http://ds-proget:8624/nuget/DS.thirdparty/": {},
"http://ds-proget:8624/nuget/default/": {},
"https://www.nuget.org/api/v2/": {}
"http://ds-proget:8624/nuget/DS.thirdparty": {},
"http://ds-proget:8624/nuget/Default": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netstandard2.0": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6ea9190f77852b60880a707e8afec4a8b73aa837
b5c646ebcc21f8f827cf0aadd5df27f9195c5d0c
Binary file not shown.

0 comments on commit 15accce

Please sign in to comment.