Skip to content

Commit

Permalink
fix: Improved project structure and documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
hennadiilu authored Mar 31, 2024
1 parent 56d4a33 commit 647b1d3
Show file tree
Hide file tree
Showing 20 changed files with 166 additions and 245 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/pr-net.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: "PR: .NET"

on:
pull_request:

jobs:
Checks:
uses: Heleonix/workflows/.github/workflows/pr-net.yml@main
18 changes: 18 additions & 0 deletions .github/workflows/release-net-nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Release: .NET / NuGet"

permissions:
contents: write

on:
push:
branches:
- master
paths:
- 'src/**'
- 'LICENSE'
- 'README.md'

jobs:
Release:
uses: Heleonix/workflows/.github/workflows/release-net-nuget.yml@main
secrets: inherit
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -321,5 +321,8 @@ ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog

# Visual Studio 2022 folders
Visual Studio 2022/

# Custom
Hxb-Artifacts/
Hx_Artifacts/
47 changes: 47 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<Project>
<PropertyGroup>
<Version>1.0.0</Version>
<Description>Provides predicative and other useful extensions for objects, strings, enumerables etc.</Description>
<PackageTags>Heleonix extensions predicate format</PackageTags>

<Authors>Heleonix - Hennadii Lutsyshyn</Authors>
<Copyright>Copyright (c) Heleonix - Hennadii Lutsyshyn</Copyright>

<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/Heleonix/Heleonix.Extensions</RepositoryUrl>
<PackageProjectUrl>https://heleonix.github.io/docs/Heleonix.Extensions/</PackageProjectUrl>
<PackageIconUrl>https://raw.githubusercontent.com/Heleonix/docs/master/images/heleonix-logos/Heleonix-logo-128x128.jpg</PackageIconUrl>

<NoWarn>NU5048</NoWarn>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\LICENSE" Pack="true" PackagePath="/"/>
<None Include="..\..\README.md" Pack="true" PackagePath="/"/>
</ItemGroup>

<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NeutralLanguage>en-US</NeutralLanguage>
<SatelliteResourceLanguages>en-US</SatelliteResourceLanguages>
</PropertyGroup>

<ItemGroup>
<AdditionalFiles Include="..\..\stylecop.json" Link="stylecop.json" />
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
</Project>
57 changes: 0 additions & 57 deletions Heleonix.Extensions.Tests/Heleonix.Extensions.Tests.csproj

This file was deleted.

41 changes: 25 additions & 16 deletions Heleonix.Extensions.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,53 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32901.215
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Heleonix.Extensions", "Heleonix.Extensions\Heleonix.Extensions.csproj", "{B744C864-3D66-4CCA-82DD-E9BD2B92036F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{821F4DCA-092C-422A-AF03-522FDCFF5065}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
LICENSE = LICENSE
Directory.Build.props = Directory.Build.props
README.md = README.md
SharedPackageInfo.props = SharedPackageInfo.props
stylecop.json = stylecop.json
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Heleonix.Extensions.Tests", "Heleonix.Extensions.Tests\Heleonix.Extensions.Tests.csproj", "{B35408E2-D592-4157-997A-21611F54D54D}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{412A5D12-9FA9-4FC3-B9CC-5B7042B3DED6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{EAC2C115-3FA8-481B-9A34-F9058125539E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{BFDDB304-3316-4F3E-B324-F9B54184A48C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{C77EAA2F-73D3-442E-A661-C7BE58190862}"
ProjectSection(SolutionItems) = preProject
.github\workflows\pr-net.yml = .github\workflows\pr-net.yml
.github\workflows\release-net-nuget.yml = .github\workflows\release-net-nuget.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sources", "Sources", "{412A5D12-9FA9-4FC3-B9CC-5B7042B3DED6}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Heleonix.Extensions", "src\Heleonix.Extensions\Heleonix.Extensions.csproj", "{42247168-A2DE-4C04-9D95-0B865B88CA36}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{EAC2C115-3FA8-481B-9A34-F9058125539E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Heleonix.Extensions.Tests", "test\Heleonix.Extensions.Tests\Heleonix.Extensions.Tests.csproj", "{49BBF463-939B-43B9-8DFD-0B4C6BB1DE7B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B744C864-3D66-4CCA-82DD-E9BD2B92036F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B744C864-3D66-4CCA-82DD-E9BD2B92036F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B744C864-3D66-4CCA-82DD-E9BD2B92036F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B744C864-3D66-4CCA-82DD-E9BD2B92036F}.Release|Any CPU.Build.0 = Release|Any CPU
{B35408E2-D592-4157-997A-21611F54D54D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B35408E2-D592-4157-997A-21611F54D54D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B35408E2-D592-4157-997A-21611F54D54D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B35408E2-D592-4157-997A-21611F54D54D}.Release|Any CPU.Build.0 = Release|Any CPU
{42247168-A2DE-4C04-9D95-0B865B88CA36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{42247168-A2DE-4C04-9D95-0B865B88CA36}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42247168-A2DE-4C04-9D95-0B865B88CA36}.Release|Any CPU.ActiveCfg = Release|Any CPU
{42247168-A2DE-4C04-9D95-0B865B88CA36}.Release|Any CPU.Build.0 = Release|Any CPU
{49BBF463-939B-43B9-8DFD-0B4C6BB1DE7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{49BBF463-939B-43B9-8DFD-0B4C6BB1DE7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{49BBF463-939B-43B9-8DFD-0B4C6BB1DE7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{49BBF463-939B-43B9-8DFD-0B4C6BB1DE7B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{B744C864-3D66-4CCA-82DD-E9BD2B92036F} = {412A5D12-9FA9-4FC3-B9CC-5B7042B3DED6}
{B35408E2-D592-4157-997A-21611F54D54D} = {EAC2C115-3FA8-481B-9A34-F9058125539E}
{C77EAA2F-73D3-442E-A661-C7BE58190862} = {BFDDB304-3316-4F3E-B324-F9B54184A48C}
{42247168-A2DE-4C04-9D95-0B865B88CA36} = {412A5D12-9FA9-4FC3-B9CC-5B7042B3DED6}
{49BBF463-939B-43B9-8DFD-0B4C6BB1DE7B} = {EAC2C115-3FA8-481B-9A34-F9058125539E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {573294B1-A3DA-448C-82D2-32CBD25BDE69}
Expand Down
53 changes: 0 additions & 53 deletions Heleonix.Extensions/Heleonix.Extensions.csproj

This file was deleted.

9 changes: 0 additions & 9 deletions Heleonix.Extensions/Properties/AssemblyProperties.cs

This file was deleted.

97 changes: 21 additions & 76 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,84 +1,29 @@
# Heleonix.Extensions

[![Release: .NET / NuGet](https://github.com/Heleonix/Heleonix.Extensions/actions/workflows/release-net-nuget.yml/badge.svg)](https://github.com/Heleonix/Heleonix.Extensions/actions/workflows/release-net-nuget.yml)

Provides predicative and other useful extensions for objects, strings, enumerables etc.

## Install

https://www.nuget.org/packages/Heleonix.Extensions

**These extensions do not throw exceptions, so they can be used without try/catch blocks or extra `if` statements**.
All of the extensions are straightforward, so descriptions provided by intellisense is pretty enough.

## Heleonix.Extensions.ObjectExtensions

### Methods

* `public static bool IsNull(this object instance)`

* `public static bool IsZero(this object instance)`

* `public static bool IsOne(this object instance)`

* `public static bool IsNegative(this object instance)`

* `public static bool IsPositive(this object instance)`

* `public static bool IsEqualTo(this object instance, object other)`

* `public static bool IsAs(this object instance, Type type)`

Determines whether this instance is subclass of or exactly the specified type.

* `public static bool IsTypeOf(this object instance, Type type)`

Determines whether a type of this instance exactly equals the specified type.

## Heleonix.Extensions.EnumerableExtensions

### Methods

* `public static bool IsEmpty<T>(this IEnumerable<T> instance)`

* `public static bool IsNullOrEmpty<T>(this IEnumerable<T> instance)`

## Heleonix.Extensions.ComparableExtensions

### Methods

* `public static bool IsLessThan<T>(this IComparable<T> instance, T value)`

* `public static bool IsLessThanOrEqualTo<T>(this IComparable<T> instance, T value)`

* `public static bool IsGreaterThan<T>(this IComparable<T> instance, T value)`

* `public static bool IsGreaterThanOrEqualTo<T>(this IComparable<T> instance, T value)`

* `public static bool IsInRange<T>(this IComparable<T> instance, T min, T max)`

Determines whether this instance is in range (inclusive) of the provided values.

* `public static bool IsBetween<T>(this IComparable<T> instance, T min, T max)`

Determines whether this instance is between (exclusive) the provided values.

## Heleonix.Extensions.StringExtensions

### Methods

* `public static string FormatWith(this string format, params object[] args)`

Formats the specified format string with the specified arguments.

###### Example

```csharp
var str = "{0} plus {1} equals {2}".FormatWith(1, 2, 3);

// "1 plus 2 equals 3"
```

* `public static string FormatWith(this string format, IFormatProvider formatProvider, params object[] args)`

Formats the specified format string with the specified arguments using a specified format provider.

* `public static bool IsNullOrEmptyOrWhiteSpace(this string instance)`
## Documentation

See [Heleonix.Extensions](https://heleonix.github.io/docs/Heleonix.Extensions)

## Contribution Guideline

1. [Create a fork](https://github.com/Heleonix/Heleonix.Extensions/fork) from the main repository
2. Implement whatever is needed
3. [Create a Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork).
Make sure the assigned [Checks](https://github.com/Heleonix/Heleonix.Extensions/actions/workflows/pr-net.yml) pass successfully.
4. [Request review](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review) from the code owner
5. Once approved, merge your Pull Request via [Squash and merge](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges#squash-and-merge-your-commits)
> **IMPORTANT**
> While merging, enter a [Conventional Commits](https://www.conventionalcommits.org/) commit message.
> This commit message will be used in automatically generated [Github Release Notes](https://github.com/Heleonix/Heleonix.Extensions/releases)
> and [NuGet Release Notes](https://www.nuget.org/packages/Heleonix.Extensions/#releasenotes-body-tab)
6. Monitor the [Release: .NET / NuGet](https://github.com/Heleonix/Heleonix.Extensions/actions/workflows/release-net-nuget.yml)
GitHub workflow to make sure your changes are delivered successfully
7. In case of any issues, please contact [heleonix.sln@gmail.com](mailto:heleonix.sln@gmail.com)
Loading

0 comments on commit 647b1d3

Please sign in to comment.