Skip to content

Commit

Permalink
Added common build properties file, added XML documentation, clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
AustinWinstanley committed Mar 19, 2019
1 parent 261d3b4 commit a507e92
Show file tree
Hide file tree
Showing 10 changed files with 94 additions and 141 deletions.
3 changes: 2 additions & 1 deletion Dewey.sln
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_", "_", "{C87D31C5-FF81-4A
.gitignore = .gitignore
.travis.yml = .travis.yml
build.ps1 = build.ps1
Directory.Build.props = Directory.Build.props
LICENSE = LICENSE
README.md = README.md
EndProjectSection
Expand All @@ -24,7 +25,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dewey.Json", "src\Dewey.Jso
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dewey.Temporal", "src\Dewey.Temporal\Dewey.Temporal.csproj", "{91BBA13E-0924-4D54-A934-9FAAE69FCA88}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dewey.Test", "src\Dewey.Test\Dewey.Test.csproj", "{38381A77-15C2-405D-82E1-69B2565EAAAD}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dewey.Test", "src\Dewey.Test\Dewey.Test.csproj", "{38381A77-15C2-405D-82E1-69B2565EAAAD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
21 changes: 21 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project>
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>6.8.0</Version>
<AssemblyVersion>6.8.0.0</AssemblyVersion>
<FileVersion>6.8.0.0</FileVersion>
<Authors>Cady Technologies &lt;contact@cady.io&gt;</Authors>
<Company>Cady Technologies</Company>
<Copyright>Copyright @ Cady Technologies</Copyright>
<PackageLicenseUrl>https://github.com/CadyIO/Dewey/blob/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/CadyIO/Dewey</PackageProjectUrl>
<RepositoryUrl>https://github.com/CadyIO/Dewey</RepositoryUrl>
<PackageIconUrl>https://raw.githubusercontent.com/CadyIO/Dewey/master/assets/icon.png</PackageIconUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>Utilities;Extensions</PackageTags>
</PropertyGroup>

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
</Project>
36 changes: 10 additions & 26 deletions src/Dewey.Azure/Dewey.Azure.csproj
Original file line number Diff line number Diff line change
@@ -1,32 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>6.7.0</Version>
<AssemblyVersion>6.7.0.0</AssemblyVersion>
<FileVersion>6.7.0.0</FileVersion>
<Description>A collection of .Net utilities for Azure</Description>
<Authors>Cady IO &lt;contact@cady.io&gt;</Authors>
<Company>Cady IO</Company>
<Copyright>Copyright @ Cady IO</Copyright>
<PackageLicenseUrl>https://github.com/CadyIO/Dewey/blob/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/CadyIO/Dewey</PackageProjectUrl>
<RepositoryUrl>https://github.com/CadyIO/Dewey</RepositoryUrl>
<PackageIconUrl>https://raw.githubusercontent.com/CadyIO/Dewey/master/assets/icon.png</PackageIconUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>Utilities;Extensions;Azure</PackageTags>
</PropertyGroup>
<PropertyGroup>
<Description>A collection of .Net utilities for Azure</Description>
<PackageTags>Utilities;Extensions;Azure</PackageTags>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Debug\netstandard1.4\Dewey.Azure.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="WindowsAzure.Storage" Version="9.3.3" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="WindowsAzure.Storage" Version="9.2.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Dewey\Dewey.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Dewey\Dewey.csproj" />
</ItemGroup>

</Project>
32 changes: 8 additions & 24 deletions src/Dewey.Caching/Dewey.Caching.csproj
Original file line number Diff line number Diff line change
@@ -1,28 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>6.7.0</Version>
<AssemblyVersion>6.7.0.0</AssemblyVersion>
<FileVersion>6.7.0.0</FileVersion>
<Description>A collection of .Net utilities for caching</Description>
<Authors>Cady IO &lt;contact@cady.io&gt;</Authors>
<Company>Cady IO</Company>
<Copyright>Copyright @ Cady IO</Copyright>
<PackageLicenseUrl>https://github.com/CadyIO/Dewey/blob/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/CadyIO/Dewey</PackageProjectUrl>
<RepositoryUrl>https://github.com/CadyIO/Dewey</RepositoryUrl>
<PackageIconUrl>https://raw.githubusercontent.com/CadyIO/Dewey/master/assets/icon.png</PackageIconUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>Utilities;Extensions;Caching</PackageTags>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Debug\netstandard1.4\Dewey.Caching.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="2.1.0" />
</ItemGroup>
<PropertyGroup>
<Description>A collection of .Net utilities for caching</Description>
<PackageTags>Utilities;Extensions;Caching</PackageTags>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="2.2.0" />
</ItemGroup>

</Project>
34 changes: 9 additions & 25 deletions src/Dewey.Dynamic/Dewey.Dynamic.csproj
Original file line number Diff line number Diff line change
@@ -1,29 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>6.7.0</Version>
<AssemblyVersion>6.7.0.0</AssemblyVersion>
<FileVersion>6.7.0.0</FileVersion>
<Description>A collection of .Net utilities for dynamic types</Description>
<Authors>Cady IO &lt;contact@cady.io&gt;</Authors>
<Company>Cady IO</Company>
<Copyright>Copyright @ Cady IO</Copyright>
<PackageLicenseUrl>https://github.com/CadyIO/Dewey/blob/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/CadyIO/Dewey</PackageProjectUrl>
<RepositoryUrl>https://github.com/CadyIO/Dewey</RepositoryUrl>
<PackageIconUrl>https://raw.githubusercontent.com/CadyIO/Dewey/master/assets/icon.png</PackageIconUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>Utilities;Extensions;Dynamic</PackageTags>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Debug\netstandard1.4\Dewey.Dynamic.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="System.Dynamic.Runtime" Version="4.3.0" />
</ItemGroup>
<PropertyGroup>
<Description>A collection of .Net utilities for dynamic types</Description>
<PackageTags>Utilities;Extensions;Dynamic</PackageTags>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="System.Dynamic.Runtime" Version="4.3.0" />
</ItemGroup>

</Project>
32 changes: 8 additions & 24 deletions src/Dewey.Json/Dewey.Json.csproj
Original file line number Diff line number Diff line change
@@ -1,28 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>6.7.0</Version>
<AssemblyVersion>6.7.0.0</AssemblyVersion>
<FileVersion>6.7.0.0</FileVersion>
<Description>A collection of .Net utilities for JSON</Description>
<Authors>Cady IO &lt;contact@cady.io&gt;</Authors>
<Company>Cady IO</Company>
<Copyright>Copyright @ Cady IO</Copyright>
<PackageLicenseUrl>https://github.com/CadyIO/Dewey/blob/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/CadyIO/Dewey</PackageProjectUrl>
<RepositoryUrl>https://github.com/CadyIO/Dewey</RepositoryUrl>
<PackageIconUrl>https://raw.githubusercontent.com/CadyIO/Dewey/master/assets/icon.png</PackageIconUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>Utilities;Extensions;JSON</PackageTags>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Debug\netstandard1.4\Dewey.Json.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
</ItemGroup>
<PropertyGroup>
<Description>A collection of .Net utilities for JSON</Description>
<PackageTags>Utilities;Extensions;JSON</PackageTags>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
</ItemGroup>

</Project>
16 changes: 0 additions & 16 deletions src/Dewey.Temporal/Dewey.Temporal.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>6.7.0</Version>
<AssemblyVersion>6.7.0.0</AssemblyVersion>
<FileVersion>6.7.0.0</FileVersion>
<Description>A collection of .Net utilities for Dates and Times</Description>
<Authors>Cady IO &lt;contact@cady.io&gt;</Authors>
<Company>Cady IO</Company>
<Copyright>Copyright @ Cady IO</Copyright>
<PackageLicenseUrl>https://github.com/CadyIO/Dewey/blob/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/CadyIO/Dewey</PackageProjectUrl>
<RepositoryUrl>https://github.com/CadyIO/Dewey</RepositoryUrl>
<PackageIconUrl>https://raw.githubusercontent.com/CadyIO/Dewey/master/assets/icon.png</PackageIconUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>Utilities;Extensions;Temporal;Date;Time;DateTime</PackageTags>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Debug\netstandard1.4\Dewey.Temporal.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Dewey\Dewey.csproj" />
</ItemGroup>
Expand Down
17 changes: 12 additions & 5 deletions src/Dewey.Test/Dewey.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<Description>Tests for a collection of .Net utilities</Description>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.2" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Dewey\Dewey.csproj" />
</ItemGroup>

<PropertyGroup>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
</PropertyGroup>

</Project>
24 changes: 4 additions & 20 deletions src/Dewey/Dewey.csproj
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>6.7.0</Version>
<AssemblyVersion>6.7.0.0</AssemblyVersion>
<FileVersion>6.7.0.0</FileVersion>
<Description>A collection of .Net utilities</Description>
<Authors>Cady IO &lt;contact@cady.io&gt;</Authors>
<Company>Cady IO</Company>
<Copyright>Copyright @ Cady IO</Copyright>
<PackageLicenseUrl>https://github.com/CadyIO/Dewey/blob/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/CadyIO/Dewey</PackageProjectUrl>
<RepositoryUrl>https://github.com/CadyIO/Dewey</RepositoryUrl>
<PackageIconUrl>https://raw.githubusercontent.com/CadyIO/Dewey/master/assets/icon.png</PackageIconUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>Utilities;Extensions</PackageTags>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Debug\netstandard1.4\Dewey.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<Description>A collection of .Net utilities</Description>
<PackageTags>Utilities;Extensions</PackageTags>
</PropertyGroup>

</Project>
20 changes: 20 additions & 0 deletions src/Dewey/Types/ListExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,29 @@ namespace Dewey.Types
/// </summary>
public static class ListExtensions
{
/// <summary>
/// Check if a list is empty.
/// </summary>
/// <typeparam name="T">The list type.</typeparam>
/// <param name="value">The object to check.</param>
/// <returns>True if empty, False otherwise.</returns>
public static bool IsEmpty<T>(this List<T> value) => (value == null || value.Count == 0);

/// <summary>
/// Check if a list has elements.
/// </summary>
/// <typeparam name="T">The list type.</typeparam>
/// <param name="value">The object to check.</param>
/// <returns>True if has elements, False otherwise.</returns>
public static bool IsNotEmpty<T>(this List<T> value) => !value.IsEmpty();

/// <summary>
/// Fill a list with a type.
/// </summary>
/// <typeparam name="T">The list type.</typeparam>
/// <param name="size">The number of elements to add.</param>
/// <param name="value">The value to add.</param>
/// <returns>The new list with filled values.</returns>
public static List<T> Fill<T>(int size, T value)
{
var result = new List<T>();
Expand Down

0 comments on commit a507e92

Please sign in to comment.