Giter VIP home page Giter VIP logo

solidstack's Introduction

SolidStack


Quick links: Docs, Changelog, Nuget

Build status GitHub release MIT license


What is SolidStack?

SolidStack is a .NET framework consisting of several well-divided NuGet packages that allow you to focus on business logic by providing an implementation of very general design patterns useful in every kind of applications such as the Option Pattern, the Builder Pattern, the Repository Pattern, the Unit of Work Pattern and so more. In short, if you're tired of duplicated and unreadable code, this framework is for you!

Available NuGet packages

SolidStack.Core

The SolidStack.Core namespace is the central point of all SolidStack packages, providing very generic concepts that are useful in any type of program, such as object construction, object equality, code flow and more.

Package Description
SolidStack.Core.Guards SolidStack.Core.Guards is an extremely simple, unambiguous and lightweight guard clause library that allow you to write pre-conditions and post-conditions for your methods in a readable way.
SolidStack.Core.Flow SolidStack.Core.Flow focuses on encapsulating the branching logic of your code so you can write a linear and much more readable code flow without having to deal with exceptions, null checks and unnecessary conditions.
SolidStack.Core.Equality SolidStack.Core.Equality is primarily useful when you have to tweak the equality of an object to implement the Value Object Pattern. All you have to do is use one of the provided abstract classes and the complex equality logic will be done for you.
SolidStack.Core.Construction (coming soon...) SolidStack.Core.Construction's only responsibility is to help you construct objects. You can use the Builder Pattern provided implementation to build complex objects in a fluent way.

SolidStack.Domain (coming soon...)

The SolidStack.Domain namespace make it easier when it's time to implement business logic by providing a strong basic implementation of the domain-driven design philosophy.

SolidStack.Infrastructure (coming soon...)

The SolidStack.Infrastructure namespace provides a general implementation of many features that are not releated to business logic like memory deallocation, time, encryption, serialization and so on.

SolidStack.Persistence (coming soon...)

The SolidStack.Testing namespace abstracts how the data is stored so that you can simply switch the way your application stores your data to almost everything such as a SQL database, a NoSQL database, local files, in memory and many more without affecting the rest of your application.

SolidStack.Testing (coming soon...)

The SolidStack.Testing namespace provide classes to help you build highly reusable and readable tests so you can simply write tests on a given interface once and then validate each concrete type of that interface with those same tests.

How do I get started?

Check out our wiki to explore the documentation provided for the packages you want. There is documentation on each package available!

Where can I get it?

First, install NuGet. Then, install the required NuGet packages avalaible on nuget.org using the package manager console:

PM> Install-Package <PackageName>

I have an issue...

First, you can check if your issue has already been tracked here.

Otherwise, you can check if it's already fixed by pulling the develop branch, building the solution and then using the generated DLL files direcly in your project.

If you still hit a problem, please document it and post it here.

How can I contribute?

Contributors are greatly appreciated, just follow the following steps:

  1. Fork the repository
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Create a pull request containing a description and your work and what is the motivation behind it
  6. Submit your pull request so that we can review your changes

License

SolidStack is Copyright © 2018 SoftFrame under the MIT license.

solidstack's People

Stargazers

Israel Santiago avatar Alexander Barbosa avatar dropin avatar Vincent Smith avatar

Watchers

Israel Santiago avatar Maxime Gélinas avatar

solidstack's Issues

Result type fails to map when 'WhenError()' is used before 'WhenSuccess()'

The following code throw the following exception:

await (await this._userManagementService.GetUserInfo())
                .WhenError()
                .MapTo(
                    statusCode => Task.FromResult(
                        new HttpResponseMessage
                        {
                            StatusCode = statusCode
                        }))
                .WhenSuccess()
                .MapTo(
                    async email => await this.Post("tenant/setup", tenantId, new[] { email }))
                .Map();
System.InvalidCastException: Unable to cast object of type 'SolidStack.Core.Flow.Internal.Result.UnresolvedMappableError`3[System.Net.HttpStatusCode,Smo365Api.Services.Dtos.User.UserInfo,System.Threading.Tasks.Task`1[System.Net.Http.HttpResponseMessage]]' to type 'SolidStack.Core.Flow.Internal.Result.ResolvedMappableSuccess`3[System.Net.HttpStatusCode,Smo365Api.Services.Dtos.User.UserInfo,System.Threading.Tasks.Task`1[System.Net.Http.HttpResponseMessage]]'.\r\n   at SolidStack.Core.Flow.Internal.MappableContent`3.TryUseLastMapping()\r\n   at SolidStack.Core.Flow.Internal.Result.UnresolvedMappableError`3.WhenSuccess()\r\n

But this code don't:

await (await this._userManagementService.GetUserInfo())
                .WhenSuccess()
                .MapTo(
                    async email => await this.Post("tenant/setup", tenantId, new[] { email }))
                .WhenError()
                .MapTo(
                    statusCode => Task.FromResult(
                        new HttpResponseMessage
                        {
                            StatusCode = statusCode
                        }))
                .Map();

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.