Skip to content

Commit

Permalink
Merge pull request #5 from Kritner/master
Browse files Browse the repository at this point in the history
Adds xml documentation to package (i think?)
  • Loading branch information
Kritner authored Dec 2, 2018
2 parents b1fe4df + e9966f8 commit c3070ea
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
19 changes: 9 additions & 10 deletions src/Kritner.ExtensionMethods/EnumerableExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,20 @@ namespace Kritner.ExtensionMethods
public static class EnumerableExtensions
{
/// <summary>
/// Attempts to find the first item in <see cref="items"/>
/// Attempts to find the first item in items.
/// meeting <see cref="Predicate{T}"/>.
///
/// Returns the <see cref="true"/> when item found,
/// <see cref="false"/> when not.
/// Returns the true when item found, false when not.
///
/// Found result is contained within out parameter <see cref="result"/>.
/// Found result is contained within out parameter result.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="items"></param>
/// <param name="predicate"></param>
/// <param name="result"></param>
/// <returns><see cref="true"/> when item found. <see cref="false"/> otherwise.</returns>
/// <typeparam name="T">The generic enumerable type.</typeparam>
/// <param name="items">The items to enumerate.</param>
/// <param name="predicate">The predicate to search for within items.</param>
/// <param name="result">The result (when found).</param>
/// <returns>true when item found, false otherwise.</returns>
/// <exception cref="ArgumentNullException">
/// Thrown when <see cref="items"/> or <see cref="Predicate{T}"/> is null.
/// Thrown when items or predicate is null.
/// </exception>
public static bool TryFirst<T>(
this IEnumerable<T> items,
Expand Down
10 changes: 8 additions & 2 deletions src/Kritner.ExtensionMethods/Kritner.ExtensionMethods.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Description>Some extension methods I find useful</Description>
<PackageTags>extension methods</PackageTags>
<Version>1.0.1</Version>
<Version>1.0.1.1</Version>
<RepositoryUrl>https://github.com/Kritner-Blogs/ExtensionMethods</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageReleaseNotes>Adds xml documentation</PackageReleaseNotes>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DocumentationFile>bin\Release\netstandard2.0\Kritner.ExtensionMethods.xml</DocumentationFile>
</PropertyGroup>

</Project>
6 changes: 3 additions & 3 deletions src/Kritner.ExtensionMethods/ListExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static class ListExtensions
/// <typeparam name="T">The type contained within the <see cref="IList{T}"/>.</typeparam>
/// <param name="obj">The <see cref="IList{T}"/>.</param>
/// <param name="item">The item to potentially add.</param>
/// <exception cref="ArgumentNullException">Thrown if <see cref="obj"/> is null</exception>
/// <exception cref="ArgumentNullException">Thrown if obj is null</exception>
public static void AddIfNotNull<T>(this IList<T> obj, T item)
{
if (obj == null)
Expand All @@ -36,8 +36,8 @@ public static void AddIfNotNull<T>(this IList<T> obj, T item)
/// </summary>
/// <typeparam name="T">The type contained within the <see cref="IList{T}"/>.</typeparam>
/// <param name="obj">The <see cref="IList{T}"/>.</param>
/// <param name="item">The items to potentially add.</param>
/// <exception cref="ArgumentNullException">Thrown if <see cref="obj"/> is null</exception>
/// <param name="items">The items to potentially add.</param>
/// <exception cref="ArgumentNullException">Thrown if obj is null</exception>
public static void AddRangeIfNotNull<T>(this IList<T> obj, IEnumerable<T> items)
{
if (obj == null)
Expand Down

0 comments on commit c3070ea

Please sign in to comment.