Skip to content

Commit

Permalink
Fixed Directory Structure (#4)
Browse files Browse the repository at this point in the history
* fixed structure, naming and namespaces
* fixed README example
  • Loading branch information
skrasekmichael authored Mar 16, 2024
1 parent 7c9cb3c commit c31c94f
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public Result SetMemberRole(Guid initiatorId, Guid memberId, TeamRole newRole)
return Errors.ForbiddenToUpdateTeamRoles;

var member = GetTeamMember(memberId);
if (membe is null)
if (member is null)
return Errors.MemberNotFound;

if (member.Role.IsOwner())
Expand All @@ -74,4 +74,4 @@ public TeamMember? GetTeamMember(Guid memberId)

*Note: using railway-oriented programming results in cleaner and shorter code, however, it also brings additional overhead and inability to return early from function, thus making it less performant.*

*Learn more about [when to not use railway-oriented programming](https://fsharpforfunandprofit.com/posts/against-railway-oriented-programming/).*
*Learn more about [when to not use railway-oriented programming](https://fsharpforfunandprofit.com/posts/against-railway-oriented-programming/).*

This file was deleted.

8 changes: 4 additions & 4 deletions RailwayResult.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D27FC398-A54
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RailwayResult", "src\RailwayResult\RailwayResult.csproj", "{C290883E-72EC-433E-BB3F-83B58381F9FF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RailwayResult.Errors", "src\RailwayResult.Errors\RailwayResult.Errors.csproj", "{0E724DCC-EFB9-4D31-B4A4-E15CDFBE92F9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RailwayResult.FunctionalExtensions", "src\RailwayResult.FunctionalExtensions\RailwayResult.FunctionalExtensions.csproj", "{D13BAF96-7FA1-4FD7-A318-77AA18285D9A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{9AF71DD6-A91C-429D-9E17-91DB64571176}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RailwayResult.Tests", "tests\RailwayResult.Tests\RailwayResult.Tests.csproj", "{BF48CBB9-7B8A-4376-9094-D71B093E0660}"
Expand All @@ -18,10 +22,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Directory.Packages.props = Directory.Packages.props
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RailwayResult.Errors", "src\RailwayResult.Errors\RailwayResult.Errors.csproj", "{0E724DCC-EFB9-4D31-B4A4-E15CDFBE92F9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RailwayResult.FunctionExtensions", "RailwayResult.FunctionExtensions\RailwayResult.FunctionExtensions.csproj", "{D13BAF96-7FA1-4FD7-A318-77AA18285D9A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace RailwayResult.FunctionExtensions;
namespace RailwayResult.FunctionalExtensions;

public interface IRuleWithError<T>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<ProjectReference Include="..\RailwayResult.Errors\RailwayResult.Errors.csproj" />
<ProjectReference Include="..\RailwayResult\RailwayResult.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace RailwayResult.FunctionExtensions;
namespace RailwayResult.FunctionalExtensions;

public static partial class ResultExtensions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace RailwayResult.FunctionExtensions;
namespace RailwayResult.FunctionalExtensions;

public static partial class ResultExtensions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace RailwayResult.FunctionExtensions;
namespace RailwayResult.FunctionalExtensions;

public static partial class ResultExtensions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace RailwayResult.FunctionExtensions;
namespace RailwayResult.FunctionalExtensions;

public static partial class ResultExtensions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace RailwayResult.FunctionExtensions;
namespace RailwayResult.FunctionalExtensions;

public static partial class ResultExtensions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace RailwayResult.FunctionExtensions;
namespace RailwayResult.FunctionalExtensions;

public static partial class ResultExtensions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace RailwayResult.FunctionExtensions;
namespace RailwayResult.FunctionalExtensions;

public delegate bool Rule<in T>(T value);

Expand Down

0 comments on commit c31c94f

Please sign in to comment.